Actions21
- Message Actions
- Group Actions
- Chat Actions
- Contact Actions
Overview
This node enables sending WhatsApp messages and files via the Green API service. Specifically, the "Send File By URL" operation allows users to send a file directly from an internet URL to a specified WhatsApp chat. This is useful for automating the distribution of images, documents, or other media hosted online without needing to upload them manually.
Common scenarios include:
- Automatically sending promotional images or brochures hosted on a website.
- Sharing reports or documents stored in cloud storage accessible by URL.
- Distributing event flyers or invitations via WhatsApp groups or individual chats.
Example: Sending a product catalog PDF hosted at https://example.com/catalog.pdf to a customer’s WhatsApp number with an optional caption.
Properties
| Name | Meaning |
|---|---|
| Mode | Operation mode: "Action" (execute WhatsApp actions) or "Listen for Incoming Webhook" (trigger). |
| Chat ID | Identifier of the WhatsApp chat to send the file to. Format: phone@c.us for private, groupId@g.us for groups. |
| File URL | The direct URL of the file to be sent. |
| File Name | The name to assign to the sent file (e.g., image.jpg). |
| Caption | Optional text caption accompanying the file. |
| Quoted Message ID | Optional ID of a message to quote in the reply. |
Output
The node outputs JSON data representing the response from the Green API after attempting to send the file. This typically includes status information about the message delivery.
No binary data output is produced by this operation since the file is sent by URL rather than upload.
Dependencies
- Requires valid credentials for the Green API service, including an instance ID and an API token.
- The node makes HTTP POST requests to Green API endpoints.
- No additional environment variables are needed beyond the configured credentials.
Troubleshooting
- Error: "Failed to send file" — Usually caused by invalid file URL, incorrect chat ID format, or network issues. Verify the URL is accessible and the chat ID is correct.
- Invalid Credentials — Ensure the API token and instance ID are correctly set in the node credentials.
- File Name Missing or Invalid — The file name must be provided and should include an appropriate extension matching the file type.
- Quoted Message ID Errors — If quoting a message, ensure the quoted message ID exists in the target chat.
To resolve errors, check the error message details which include the data sent to the API for easier debugging.
Links and References
- Green API Documentation — Official API docs for message sending and file operations.
- WhatsApp Chat IDs Format — Explanation of chat ID formats for private and group chats.