Actions21
- Message Actions
- Group Actions
- Chat Actions
- Contact Actions
Overview
This node integrates with Green API to send WhatsApp messages and perform related messaging actions. It supports sending text messages, files (by URL or upload), polls, locations, contacts, forwarding messages, editing, and deleting messages within WhatsApp chats. Additionally, it can listen for incoming WhatsApp webhook events from Green API to trigger workflows based on customizable filters.
Common scenarios:
- Automating customer support by sending WhatsApp notifications or replies.
- Broadcasting messages or polls to groups or individual users.
- Forwarding important messages automatically between chats.
- Listening for specific incoming messages or events to trigger further automation.
- Managing WhatsApp group participants and settings.
Practical example:
- A business sends order updates via WhatsApp text messages to customers.
- A workflow triggers when a customer sends a message containing "help" and responds automatically.
- Polls are sent to gather customer feedback.
- Files such as invoices or images are sent directly from URLs or uploaded files.
Properties
| Name | Meaning |
|---|---|
| Mode | Select between Action (execute WhatsApp actions) or Listen for Incoming Webhook (trigger workflows on incoming webhooks). |
| Webhook Filters | Collection of filters applied when in trigger mode to selectively process incoming webhook events: - Chat ID Filter: comma-separated chat IDs to allow. - Chat Type Filter: all, group only, or private only. - Filter Logic: combine filters with AND or OR. - Instance ID Filter: filter by specific instance. - Message Content Contains: case-insensitive substring match. - Message Type Filter: select one or more message types (audio, contact, document, extended text, image, location, poll, quoted, sticker, text, video). - Sender Filter: filter by sender ID. - Webhook Type Filter: filter by webhook event types (delivery receipt, incoming messages, message status, outgoing messages). |
| Resource | For action mode, select the resource to operate on: Message, Group, Chat, or Contact. |
| Operation | For action mode and selected resource, choose the operation to perform. For Resource=Message and Operation=Send, this means sending a text message. Other operations include sending files, polls, locations, contacts, forwarding messages, editing, deleting, etc. |
| Chat ID | The target chat identifier (e.g., 972501234567@c.us for private chat or 972501234567-1581234048@g.us for group chat). Required for sending messages and related operations. |
| Message | Text content of the message to send (required for sending text messages and polls). |
| Quoted Message ID | Optional ID of a message to quote/reply to when sending messages. |
Additional properties relevant to sending specific message types (only shown when applicable):
| Name | Meaning |
|---|---|
| File URL | URL of the file to send (for sending files by URL). |
| File Name | Name of the file being sent (for sending files by URL). |
| Caption | Optional caption for files or uploads. |
| Poll Options | Comma-separated list of options for polls (2-12 options). |
| Multiple Answers | Boolean indicating if multiple answers are allowed in polls. |
| Location Name | Name/title of the location (optional). |
| Address | Address string for the location (optional). |
| Latitude | Latitude coordinate for location messages (required). |
| Longitude | Longitude coordinate for location messages (required). |
| Phone Contact | Phone number of the contact to send (international format without +). |
| First Name | First name of the contact (optional). |
| Middle Name | Middle name of the contact (optional). |
| Last Name | Last name of the contact (optional). |
| Company | Company name of the contact (optional). |
Output
The node outputs an array of JSON objects representing the response from the Green API for each executed action. The structure depends on the specific operation but generally includes confirmation details or data returned by the API about the sent message or performed action.
If used as a webhook trigger, the output JSON contains the incoming webhook payload from Green API, filtered according to the configured webhook filters.
The node does not output binary data directly; any file sending is handled via API calls with file data included in requests.
Dependencies
- Requires a valid Green API account with:
- An instance ID.
- An API token for authentication.
- The node uses HTTP POST requests to Green API endpoints.
- Requires n8n credentials configured with the necessary API keys/tokens for Green API.
- For file upload operations, access to local filesystem may be required to read files specified by path.
- Node uses standard n8n helper methods for HTTP requests and reading binary data.
Troubleshooting
- Error sending messages or files: Usually caused by invalid chat IDs, missing required parameters, or network/API errors. Check that chat IDs are correctly formatted (
phone@c.usfor private,chatId@g.usfor groups). - File read errors: When sending files by upload, ensure the file path is correct and accessible by n8n.
- Webhook filtering issues: If no workflows trigger on incoming webhooks, verify filter settings and logic (AND vs OR). Empty filters allow all events.
- Authentication errors: Ensure API credentials (instance ID and token) are correctly set up and have sufficient permissions.
- Node misconfiguration: Using the node in "trigger" mode as an action will throw an error instructing to use it as a trigger node instead.
- Message quoting failures: Quoted message ID must be valid and exist in the chat.
Links and References
- Green API Documentation – Official API docs for WhatsApp integration.
- WhatsApp Business API Guide – General WhatsApp API reference.
- n8n Documentation – For configuring credentials and using nodes.
This summary covers the "Message" resource with the "Send" operation in action mode, describing how to send WhatsApp messages via Green API using this node.