Overview
The WhatsApp Multi-Session Trigger node is designed to receive incoming messages from WhatsApp via a webhook. This node is particularly useful for applications that need to handle real-time messaging, such as chatbots, customer support systems, or any service that interacts with users on WhatsApp. By setting up this trigger, users can automate workflows based on the messages received, allowing for immediate responses or actions based on user interactions.
Common Scenarios:
- Chatbots: Automatically respond to user inquiries in real-time.
- Customer Support: Capture and log messages from customers for further processing or response.
- Notifications: Send alerts or updates to users based on their interactions.
Properties
| Name | Meaning |
|---|---|
| Webhook Path | Custom path for the webhook (default is /webhook/whatsapp-webhook). |
| Session ID Filter | Filters incoming messages to only trigger for a specific session ID (leave empty for all). |
| Message Type Filter | Filters messages by type; options include All Messages, Text Messages Only, Media Messages Only, and Status Updates Only. |
| Include System Messages | Determines whether to include system messages (e.g., user joined or left group). |
Output
The output of the node is structured as a JSON object containing various fields related to the incoming message. The key fields include:
id: Unique identifier for the message.session_id: Identifier for the session associated with the message.from: Sender's information.to: Recipient's information.message_type: Type of the message (text, media, etc.).timestamp: Time when the message was sent.is_group: Indicates if the message is part of a group chat.message: The content of the message.- Additional fields may include media details, location data, and system message indicators.
If the node can output binary data, it will typically represent media files or attachments sent through WhatsApp.
Dependencies
This node requires an active WhatsApp account configured to send and receive messages via webhooks. Users must also ensure they have set up the necessary API keys or authentication tokens to connect to the WhatsApp service.
Troubleshooting
Common issues users might encounter include:
- Webhook Not Triggering: Ensure the webhook URL is correctly set and accessible. Check network configurations and firewall settings.
- Message Filtering Issues: If messages are not being processed as expected, verify the filters applied (session ID, message type) to ensure they match the incoming data.
- Missing Data: If certain fields are not appearing in the output, check the structure of the incoming message to confirm that those fields are present.
Common error messages may include:
- "No webhook response": This indicates that the conditions set by the filters were not met, and thus no action was taken. To resolve this, review the filter settings.