Green API Trigger
AI-generatedOverview
This node acts as a webhook trigger for Green API, an enhanced WhatsApp integration. It listens for various WhatsApp-related events such as incoming messages, calls, group updates, and media messages. The node filters incoming webhook data based on user-selected event types and additional filters like chat type, keywords, message length, and sender. It outputs structured event data for use in workflows, optionally including full message data, metadata, and raw webhook data. This node is useful for automating responses, logging, or processing WhatsApp events in real-time.
Use Case Examples
- Trigger workflow on receiving a new WhatsApp message containing specific keywords like 'help' or 'urgent'.
- Automate actions when a new group is created or participants change in a WhatsApp group.
- Log detailed metadata and raw data of incoming media messages for analysis or archiving.
Properties
| Name | Meaning |
|---|---|
| Events | Select which WhatsApp event types will trigger the webhook. Examples include incoming messages, calls, group updates, and media messages. |
| Filters | Filters to refine which messages trigger the webhook, including chat type (all, group, private), keywords, message length limits, and sender filter. |
| Options | Additional options to customize the output, such as including full message data, metadata, auto-detecting media types, and including raw webhook data. |
Output
JSON
eventType- Type of the WhatsApp event that triggered the webhook.messageId- Unique identifier of the message involved in the event.chatId- Identifier of the chat where the event occurred.senderId- Identifier of the sender of the message or event.senderName- Name of the sender.messageType- Type of the message, e.g., textMessage, imageMessage.timestamp- Timestamp of when the event occurred.messageText- Text content of the message, if applicable.metadataisFromMe- Boolean indicating if the message was sent by the user.chatName- Name of the chat.senderContactName- Contact name of the sender.downloadUrl- URL to download media content, if available.caption- Caption of media messages, if any.fileName- Name of the file in media messages.fileSize- Size of the file in media messages.mimeType- MIME type of the media file.location- Location data shared in the message, if any.contact- Contact information shared in the message, if any.poll- Poll or vote data shared in the message, if any.
rawData- Complete raw webhook data received from Green API, included if the option is enabled.
Dependencies
- An API key credential for Green API authentication
Troubleshooting
- If no webhook data is received, the node outputs a test message for manual execution to help with debugging.
- If the event type received is not among the selected events, the webhook response is suppressed to avoid unnecessary workflow triggers.
- Filters such as keywords, chat type, message length, and sender filter must be correctly configured; otherwise, valid events might be ignored.
- Ensure the Green API credential is correctly set up to authenticate webhook events.