Actions32
- Account Actions
- Group Actions
- Journal Actions
- Queue Actions
- Sending Actions
- Service Actions
- Receiving Actions
Sending → Send File By URL
AI-generatedSummary
Send a file from a public URL to a specified WhatsApp chat.
Inputs
- chatId (required) — The WhatsApp chat identifier where the file will be sent.
- urlFile (required) — Direct URL to the file to be transmitted.
- fileName (required) — Suggested filename for the transmitted file.
- caption — Optional text caption accompanying the file.
Output shape
JSON object representing the result of the sendFileByUrl API call (typically includes success status and message metadata).
The exact fields depend on Green API response; may include message ID, status, etc. Errors are propagated as node errors.
Examples
Example 1: Upload an image from a public URL and send it to a contact
chatId: 123456789, urlFile: https://example.com/img.png, fileName: img.png, caption: 'Check this out'
Example 2: Send a PDF document with a custom name
chatId: 987654321, urlFile: https://my.site.com/doc.pdf, fileName: report.pdf, caption: ''
Example 3: Include a caption while sending a video
chatId: 11223344, urlFile: https://vidsite.com/clip.mp4, fileName: clip.mp4, caption: 'Demo video'