Actions7
Overview
This node acts as a webhook trigger for contact and group-related events from a WSAPI service. It listens for updates on contacts or groups, such as changes in contact information or group details, and triggers workflows accordingly. This is useful for automating processes that depend on real-time updates to contact or group data, like syncing contact lists, updating CRM records, or managing group memberships.
For example, when a contact's information is updated, the node can trigger a workflow to update that contact's details in another system. Similarly, when a group is modified, it can initiate actions like notifying team members or adjusting permissions.
Properties
| Name | Meaning |
|---|---|
| Contact & Group Events | Select which events to listen for: "Contact" (contact information updated), "Group" (group information updated) |
| Parse Event Data | Whether to parse the event data for easier access to individual fields (true/false) |
| Include Raw Event | Whether to include the original webhook payload in the output (true/false) |
| Webhook Authentication | Enable custom header authentication for incoming webhooks (true/false) |
| Auth Header Name | The name of the HTTP header used for webhook authentication (e.g., "X-Webhook-Auth") |
| Auth Header Value | The expected value of the authentication header to validate incoming requests |
Output
The node outputs JSON data representing the event received. The structure includes:
instanceId: Identifier of the instance sending the event.receivedAt: Timestamp when the event was received.eventType: Type of the event ("contact" or "group").- Parsed event data fields merged directly into the output if parsing is enabled.
- If parsing is disabled, the raw
eventDataobject is included under theeventDatakey. - Optionally, the original raw webhook payload is included under
rawEventif enabled.
No binary data output is produced by this node for contact/group events.
Dependencies
- Requires an API key credential to optionally download media files if the event type involves media (not applicable here since contact/group events do not involve media).
- If webhook authentication is enabled, the node expects a custom HTTP header with a specific value to authorize incoming webhook calls.
- No additional external services are required beyond the WSAPI webhook source.
Troubleshooting
- Webhook Authentication Failure: If authentication is enabled but the incoming request does not contain the correct header or value, the node will ignore the webhook without triggering. Ensure the webhook sender includes the correct header and value.
- Unsupported Event Types: The node only triggers on selected event types. If the webhook sends an event type not selected in the node settings, it will be ignored.
- Missing Event Data: If the webhook payload lacks
eventTypeoreventData, the node will not trigger. - Media Download Errors: Not applicable for contact/group events, but if enabled for other event types, failures downloading media will be recorded in the output under a
downloadErrorfield.
Links and References
- n8n Webhook Trigger Documentation
- WSAPI official documentation (refer to your WSAPI provider for webhook event details)