Overview
This node, named "Whapi Trigger," is designed to handle events from the Whapi service via webhooks. It listens for specific event updates (such as messages or group-related events) and triggers workflows in n8n when those events occur. This is useful for automating processes that depend on real-time updates from Whapi, such as responding to new messages, monitoring group changes, or integrating Whapi events into other systems.
Practical examples include:
- Automatically processing incoming messages to create support tickets.
- Monitoring group membership changes to update user databases.
- Triggering notifications or logging when certain message or group events happen.
Properties
| Name | Meaning |
|---|---|
| Authentication | Method of authenticating with Whapi; currently supports "Access Token" authentication. |
| Trigger On | Specifies which types of events to listen for. Options include: |
| - Messages Events | |
| - Groups Events |
Output
The node outputs data received from the webhook as JSON. The output structure corresponds directly to the body of the webhook POST request sent by Whapi. Each trigger execution returns an array of JSON objects representing the event data.
No binary data output is produced by this node.
Dependencies
- Requires a valid API authentication token (access token) for Whapi.
- Depends on the Whapi service's webhook infrastructure.
- The node internally uses HTTP requests to manage webhook registration and deletion on the Whapi platform.
- No additional external dependencies beyond standard HTTP and webhook handling.
Troubleshooting
- Webhook Registration Failure: If the node fails to register the webhook URL with Whapi, ensure the provided access token is valid and has sufficient permissions.
- Event Not Triggering: Verify that the selected event types ("Trigger On") match the events being sent by Whapi.
- Webhook URL Accessibility: The webhook URL must be publicly accessible by Whapi. If running locally, use tunneling services like ngrok.
- Error Logs: Errors during webhook creation or deletion are logged to the console; check n8n logs for details.
- Duplicate Webhooks: The node attempts to avoid duplicate webhook registrations by checking existing URLs before creating new ones.
Links and References
- Whapi Official Documentation (replace with actual URL if known)
- n8n Webhook Node Documentation
- Using Webhooks in n8n