WSAPI Trigger icon

WSAPI Trigger

Trigger on WSAPI webhook events (messages, chats, calls, users, etc.)

Overview

This node acts as a webhook trigger for WebSocket API (WSAPI) events related to chat activities. It listens for specific chat event types such as changes in chat settings (mute, pin, archive, ephemeral) and chat presence updates (typing, recording, paused). When one of the selected events occurs, the node triggers and outputs the event data.

Common scenarios where this node is beneficial include:

  • Automating workflows based on chat status changes, e.g., sending notifications when a user starts typing or stops.
  • Tracking chat setting modifications to update external systems or logs.
  • Integrating chat presence information into dashboards or CRM systems.

Practical example: A support team wants to be notified whenever a chat is muted or unmuted, or when a participant starts typing, so they can monitor engagement in real-time.

Properties

Name Meaning
Chat Events Select which chat events to listen for. Options: "Chat Setting" (settings changed), "Chat Presence" (presence updated)
Parse Event Data Whether to parse the eventData field for easier access to its 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 Custom header name used for webhook authentication (string, required if auth enabled)
Auth Header Value Expected value for the authentication header (string, required if auth enabled)

Output

The node outputs JSON data representing the received chat event with the following structure:

  • instanceId: Identifier of the WSAPI instance.
  • receivedAt: Timestamp when the event was received.
  • eventType: The type of chat event triggered (e.g., "chat_setting", "chat_presence").
  • Parsed event data fields merged from eventData if parsing is enabled.
  • Optionally, the raw webhook payload under rawEvent if inclusion is enabled.

No binary data output is produced for chat events specifically.

Dependencies

  • Requires an API key credential for the WSAPI service if media auto-download is enabled (not applicable here since chat events do not download media).
  • Optional webhook authentication via custom HTTP headers requires configuration of header name and expected value.
  • No additional external services are explicitly required for basic chat event triggering.

Troubleshooting

  • Webhook Authentication Failure: If authentication is enabled but the incoming request does not contain the expected header or value, the webhook will silently ignore the request without response. Ensure the correct header name and value are configured and sent by the webhook source.
  • Event Filtering: If no workflow execution occurs, verify that the selected chat events match those sent by the WSAPI webhook. Events outside the selected list are ignored.
  • Missing Event Data: If the webhook payload lacks eventType or eventData, the node will not trigger. Confirm the webhook source sends complete event data.
  • Parsing Disabled: If "Parse Event Data" is disabled, the event data remains nested under eventData and may require manual extraction in subsequent nodes.

Links and References

Discussion