Overview
This node triggers workflows based on various 2Chat WhatsApp events such as new messages, group joins, message reactions, and conversation starts. It is useful for automating responses, notifications, or processing WhatsApp interactions in real-time. For example, it can trigger a workflow when a new WhatsApp message is received or when a participant joins a WhatsApp group.
Use Case Examples
- Trigger a workflow when a new WhatsApp message is received on a connected number to automatically log the message or send an alert.
- Trigger a workflow when someone joins a WhatsApp group to welcome the new participant or update a CRM system.
- Trigger a workflow when a WhatsApp message reaction is received to analyze user engagement.
Properties
| Name | Meaning |
|---|---|
| Events | The specific 2Chat WhatsApp event to listen for, such as new messages, group joins, or message reactions. This determines what triggers the workflow. |
| WhatsApp Number Name or ID | Limits the trigger to a specific WhatsApp number connected to 2Chat. The user can select from a list or specify an ID via expression. |
| WhatsApp Group Name or ID | Limits the trigger to a specific WhatsApp group for group-related events. This option appears only for group events and when a WhatsApp number is selected. The user can select from a list or specify an ID via expression. |
Output
JSON
event- The event type that triggered the webhook, e.g., 'whatsapp.message.new'.receivedAt- Timestamp when the webhook event was received.- ``
*
* `` - Additional event-specific data received from 2Chat webhook payload.
Dependencies
- Requires 2Chat API credentials for authentication to manage webhook subscriptions and receive events.
Troubleshooting
- Webhook creation may fail if the event parameter is missing or invalid; ensure an event is selected.
- Webhook existence check might fail due to network or API issues; verify API credentials and connectivity.
- Webhook deletion might fail if the webhook ID is missing or already deleted; ensure proper cleanup in workflows.
Links
- n8n Expressions Documentation - Documentation on how to use expressions to specify dynamic values for properties like WhatsApp Number or Group ID.