Overview
This node acts as a trigger for WhatsApp-related events within n8n workflows. It listens for specific types of WhatsApp events (such as messages received, group changes, media uploads, etc.) and initiates workflow execution when these events occur. This is particularly useful for automating responses to WhatsApp activity, monitoring group membership, handling incoming messages, or reacting to media uploads.
Practical examples:
- Automatically respond to new WhatsApp messages.
- Log when users join or leave a WhatsApp group.
- Trigger actions when media is uploaded in a chat.
- Monitor and react to group setting changes.
Properties
| Name | Type | Meaning |
|---|---|---|
| Event | options | Type of event to listen to. Options include: User joined/left group, message received, etc. |
Output
The node outputs a JSON object under the field json. The structure is:
{
"data": {}
}
- The actual content of
datawill depend on the specific event and implementation details not visible in this static analysis. For manual triggers, it appears to be an empty object.
If the node supports binary data output, it is not evident from the provided code.
Dependencies
- External Service: Requires integration with WhatsApp via a client library (details abstracted in the bundled code).
- n8n Configuration: No explicit API keys or environment variables are shown, but WhatsApp connectivity typically requires authentication/configuration outside this node.
Troubleshooting
Common issues:
- No events triggered: Ensure the WhatsApp client is properly configured and connected.
- Manual mode returns empty data: In manual activation mode, the output is a placeholder; real events require active listening.
- Missing permissions: If the WhatsApp account lacks necessary permissions (e.g., to read group info), some events may not fire.
Error messages:
- Errors are not explicitly handled in the provided code, but failures in registration or connection to WhatsApp services could result in generic connection errors.