V2.3.0 Continues not sending audio, image or video (Cloud API)
Welcome!
- [x] Yes, I have searched for similar issues on GitHub and found none.
What did you do?
- Audio: Doesn't work when sent via Chatwoot.
- Image/Video: Doesn't work via Chatwoot nor via Postman. ✅ Tested in multiple installations and different servers.
Tested with many instalations in many servers!
Audio Error LOG and Observations:
Workaround I'm using a combination of:
- Evolution Audio Converter
- N8N for automation
Flow: A Chatwoot dashboard app triggers audio reprocessing. The .oga audio is converted to .ogg. The .ogg is sent back via the API.
(The .mp3 generated by the evolution conversor also is failing to send, even using Cloud Reference! Just the .ogg version works).
- In previous one version, I had to use the official WhatsApp API to send the audio converted to ogg. In this v2.3.0 at least this converted audio version is working. But in short, Evo using Cloud API just does not works with Chatwoot to send audio (or media, as shown below).
AUDIO LOG OUTPUT (Sending via chatwoot):
[Evolution API] [07 - XPTO - API OFICIAL] v2.3.0 212 - Tue May 20 2025 00:50:54 LOG [ChannelStartupService] [object]
{
key: {
fromMe: true,
id: 'wamid.HBgNNTUxMTkzNzQ3NDcwMxUCABEYEjU0MjdGQUZCOTBCRjc2NUQ2RQA=',
remoteJid: '[email protected]'
},
message: {
audioMessage: {
fileName: '5511...74703-1747713053503.mp3',
mediaType: 'audio',
audio: 'https://app.xpto.cloud/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBdHc3IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--ffb7a680ebc3da8843441ef033fc2b051c1fec14/1747713039227.oga';,
id: 'https://app.xpto.cloud/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBdHc3IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--ffb7a680ebc3da8843441ef033fc2b051c1fec14/1747713039227.oga';,
type: 'link',
mimetype: 'audio/ogg'
}
},
messageType: 'audioMessage',
messageTimestamp: 1747713054,
instanceId: 'bb0081fa-cadd-4930-a3ab-4476e6a96e99',
webhookUrl: undefined,
status: 'PENDING',
source: 'unknown'
}
After pending status, here goes the error (that just jumps on the screen apparently random and intermittently but at high frequency):
[Evolution API] v2.3.0 212 - Tue May 20 2025 00:50:54 ERROR [unhandledRejection] [object]
{
origin: Promise {
<rejected> { status: 400, error: 'Bad Request', message: [Array] }
},
stderr: 2
}
[Evolution API] v2.3.0 212 - Tue May 20 2025 00:50:54 ERROR [unhandledRejection] [object]
{
status: 400,
error: 'Bad Request',
message: [ 'Method not available on WhatsApp Business API' ]
}
- In version 2.2.3, Chatwoot showed: "🚨 Não foi possível enviar a mensagem. Verifique sua conexão."
- In 2.3.0, no error message appears in Chatwoot when audio fails.
Image and video Error LOGS:
- Chatwoot fails to send any image or video (JPG, PNG, MP4 ...).
- Failure also happens when trying via Postman.
Error LOG (Sending via Chatwoot):
[Evolution API] [Emanuel - Api Oficial] v2.3.0 212 - Tue May 20 2025 03:07:18 ERROR [ChannelStartupService] [object]
TypeError: Cannot read properties of undefined (reading '0')
at ys.sendMessageWithTyping (/evolution/dist/main.js:222:479)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async ys.mediaMessage (/evolution/dist/main.js:222:2745)
at async Ne.sendAttachment (/evolution/dist/main.js:82:10593)
at async Ne.receiveWebhook (/evolution/dist/main.js:84:232)
at async Ai.dataValidate (/evolution/dist/main.js:295:67396)
at async /evolution/dist/main.js:295:108103
[Evolution API] v2.3.0 212 - Tue May 20 2025 03:07:18 ERROR [ChatwootService] [object]
{
status: 400,
error: 'Bad Request',
message: [ "TypeError: Cannot read properties of undefined (reading '0')" ]
}
Whether jpeg, png, mp4, all them give this same error!
Error LOG Sending via Postman (urls withou extension (e.g. .png) like Amazon S3 URLs):
{
"status": 400,
"error": "Bad Request",
"response": {
"message": [
"TypeError: e.mimetype?.startsWith is not a function"
]
}
}
Sending via Postman using url with extension:
{
"status": 400,
"error": "Bad Request",
"response": {
"message": [
"TypeError: Cannot read properties of undefined (reading '0')"
]
}
}
I keep dreaming of the day when Evolution will work flawlessly with the Cloud API...
Honestly, it's frustrating and sometimes makes me want to give up entirely — but since it's free and offers great features integrated with Chatwoot... We carry on with hope.
- Not to mention the message duplication behavior in Chatwoot, which continues to happen, but I haven't had time to observe a pattern yet.
What did you expect?
Send the things.
What did you observe instead of what you expected?
Workaround.
Screenshots/Videos
No response
Which version of the API are you using?
V2.3.0
What is your environment?
Windows
Other environment specifications
No response
If applicable, paste the log output
No response
Additional Notes
No response
Good morning, Emanuel! How are you?
Man, I was having the same issue. To temporarily work around it and be able to send audio messages through Chatwoot, I created an automation in N8N that sends the audio using the WhatsApp Business Cloud node.
It seems to be a bug in Evolution that's causing this error.
What I do is simply take the audio URL and send it through the WhatsApp node. Note: it's important to filter the message type as outgoing, the attachments, and the name of the inbox.
In Chatwoot, I set up a webhook that triggers on every new message created. From there, I filter which messages I want to send through the WhatsApp Cloud API node — and that’s it!
This temporary solution is working for me for now. I hope this was helpful in some way.
Bro, as i've said, i use a similar solution. Tough i nedd first to convert de chatwoot audio, cause API Cloud (or whats node) doesn't send .oga audio (chatwoot v3 with Amazon S3 storage). Are you being able to send the original Chatwoot áudio?
Here is my actual solution:
The data comes from a dashboard app that i created with AI and integrated with Chatwoot dashboard app, it clones the user conversation, and when user clicks on "Reenviar" my N8N recives the data from de message (therefore media link). The message created on a high message volume would breake, bro...
And besides, as i said, a need to convert the original chatwoot audio first beefore sending it (yeah, i'm using oficial API Reference).
Hello, you cand send template messages via EVO 2? I'm try with chatwoot and directly via API, but isn't work. In v1 the API docs have a method sendTemplateMessage, but in v2 i can't see it anymore, but the methos is present in src. Any info about?
Hello, you cand send template messages via EVO 2? I'm try with chatwoot and directly via API, but isn't work. In v1 the API docs have a method sendTemplateMessage, but in v2 i can't see it anymore, but the methos is present in src. Any info about?
Integrations → Channel → Cloud API → Send Message
Hello, you cand send template messages via EVO 2? I'm try with chatwoot and directly via API, but isn't work. In v1 the API docs have a method sendTemplateMessage, but in v2 i can't see it anymore, but the methos is present in src. Any info about?
Integrations → Channel → Cloud API → Send Message
hey man, its not showing up to me: https://doc.evolution-api.com/v2/en/integrations/cloudapi is this the right website?
Look for in Postman
Any news?
Chatwoot isn't sending audio here. Any news?
@TheEmanuelSampaio @pedroramosuerj @agencia904 @Fotonnn @drauber
I hit the same problem and found a simple workaround: make sure the public media URL ends with the correct file extension that matches the mimetype (e.g., .png, .jpg, .mp4). When the URL includes the proper extension, the send works reliably.
Example (v2 POST /message/sendMedia/{instance}):
{ "number": "5588997189036", "mediatype": "image", "mimetype": "image/png", "fileName": "foto.png", "media": "https://meu-cdn.com/foto.png" }
This fixes the error on my side.
@TheEmanuelSampaio @pedroramosuerj @agencia904 @Fotonnn @drauber
I hit the same problem and found a simple workaround: make sure the public media URL ends with the correct file extension that matches the mimetype (e.g., .png, .jpg, .mp4). When the URL includes the proper extension, the send works reliably.
Example (v2 POST /message/sendMedia/{instance}):
{ "number": "5588997189036", "mediatype": "image", "mimetype": "image/png", "fileName": "foto.png", "media": "https://meu-cdn.com/foto.png" }
This fixes the error on my side.
Yes, this is a workaround for the problem
This works because the way that the code was written, it will work only if the last URL part is something with an extension (file.mp4)
The error happens because of very poorly written and tested code Here is the root cause: https://github.com/EvolutionAPI/evolution-api/blob/1a1d9fc9574c3ba3a660dc769595d029b66b11a8/src/api/integrations/channel/meta/whatsapp.business.service.ts#L1246-L1250
The error is still happening on the actual version (v2.3.2)
- If your URL is a signed URL from AWS or any URL that has query params, it will try to get the mimeType from the "URL" without removing the query params.
- Even removing the query params, has a case where the URL could not even have the filename/extension (Google Drive public download URLs, for example)
So the real and definitive solution would be to just get the mimetype sent on the request body instead of trying to "extract" from the URL
Then, if you want, you can add a fallback if mimetype not on the body, try to extract it from the URL
@DavidsonGomes, the issue was closed as completed.
But I looked into the main branch and develop branch, and the mediatype seems to be "extracted" in the same way, instead of trying to first get the mimetype from the request body.
Was the issue really solved?
@leomeneguzzi no, the issue persists
Was able to workaround my specific issue. Evo 2.3.2.
For some reason it wouldnt send the PDF files as PDF to whatsapp - it sent the file, without an extension. Solution was to sent the HTTP request body in a single json instead of n8n's json fields. (Specify Body -> using JSON)
So instead of filling each field, sent the request as:
{ "number":"{{ $('Evolution Incoming').item.json.body.data.key.remoteJid.replace(/\D/g, '') }}", "options":{"presence":"composing"}, "mediatype":"document", "mimetype":"application/pdf", "media":"https://mylink.com/myfile.pdf", "fileName":"myfile.pdf" }
then... magic.pdf! Everything works.
Still seems to be an evolution api problem.