WaliChat Trigger
AI-generatedOverview
This node, named WaliChat Trigger, is designed to start an n8n workflow when specific events occur in a WaliChat WhatsApp environment. It acts as a webhook listener that subscribes to various WhatsApp-related events such as incoming or outgoing messages, message status updates, group changes, contact updates, and more.
Common scenarios where this node is beneficial:
- Automating responses or processing when new WhatsApp messages are received.
- Tracking delivery and read statuses of outbound messages.
- Reacting to group membership changes or chat updates.
- Monitoring user status updates or contact information changes.
- Integrating WhatsApp channel messages into broader workflows.
Practical examples:
- Automatically logging inbound customer inquiries from WhatsApp into a CRM system.
- Sending notifications or triggering follow-up actions when a message delivery fails.
- Updating internal databases when group participants change.
- Processing poll votes or meeting event updates sent via WhatsApp messages.
Properties
| Name | Meaning |
|---|---|
| Webhook name | Internal name for the webhook (max 30 characters) used for your reference to identify this webhook configuration. |
| WhatsApp number | Optionally restrict webhook events to a specific WhatsApp number/device. If left empty, events from all WhatsApp numbers in your account will be subscribed to. |
| Events | The list of WhatsApp event types to subscribe to. Multiple can be selected. Options include: - New Inbound Message Received - New Outbound Message Delivered - Message Read or Played by User - Message Delivery Failed - Group Updated - Message Updated (Poll Votes, Meeting Events) - Message Reaction Added/Removed - New User Status Published - New Channel Message Received - Chat Updated (Assigned, Resolved, etc.) - WhatsApp Session Changes - Contact Information Updated |
| Sample event to notify | Select a sample event matching your use case to test and configure the webhook JSON data structure during workflow setup. This helps preview the kind of data the webhook will receive. |
Output
The node outputs the webhook payload as JSON data under the json field. This data represents the event details sent by WaliChat when one of the subscribed events occurs. The structure of this JSON depends on the event type but generally includes relevant metadata and content related to the WhatsApp event.
No binary data output is produced by this node.
Example output JSON (simplified):
{
"event": "message:in:new",
"deviceId": "12345",
"message": {
"id": "abc123",
"type": "text",
"content": "Hello, world!",
"from": "+1234567890",
"timestamp": 1680000000
}
}
Dependencies
- Requires an API key credential for authenticating with the WaliChat API.
- Uses the WaliChat REST API to:
- Load available WhatsApp devices/numbers.
- Register, check, and delete webhooks.
- Environment variable
N8N_RUNTIME_CLIENTmay affect behavior (used internally). - No additional external dependencies beyond standard HTTP requests.
Troubleshooting
Webhook registration errors:
- If no webhook URL is available, ensure the workflow is activated and the webhook URL is generated.
- At least one event must be selected; otherwise, registration will fail.
- A 409 conflict error indicates the webhook already exists; this is not necessarily a problem.
- Other HTTP errors from the API will include messages indicating the cause (e.g., invalid device ID).
Device loading issues:
- If no WhatsApp numbers/devices appear in the dropdown, verify your WaliChat account has connected devices.
- Network or authentication errors may prevent loading devices.
Event subscription problems:
- Ensure the selected events are supported and correctly spelled.
- If no events are selected, the webhook cannot be created.
General errors:
- Axios HTTP errors are caught and logged; check the error messages for hints.
- Deleting non-existent webhooks returns success to avoid blocking workflow deactivation.
Links and References
- WaliChat API Documentation (for detailed API endpoints and event descriptions)
- n8n Webhook Node Documentation
- WhatsApp Business API Concepts (for understanding WhatsApp event types)
This summary is based solely on static analysis of the provided source code and property definitions.