WSAPI Trigger icon

WSAPI Trigger

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

Overview

This node triggers workflows based on real-time call events received via a webhook from a WebSocket API (WSAPI). It listens for specific call-related events such as incoming call offers, call acceptances, and call terminations. When one of the selected call events occurs, the node captures the event data and optionally processes it for easier access.

Common scenarios where this node is beneficial:

  • Automating responses or logging when an incoming call is offered.
  • Triggering follow-up actions once a call is accepted.
  • Performing cleanup or notifications after a call terminates.

Practical example:

A customer support system could use this node to start a workflow whenever a new call offer arrives, automatically logging the call details and notifying available agents. Similarly, it can track call acceptance to update call status dashboards or trigger post-call surveys upon termination.


Properties

Name Meaning
Call Events Select which call events to listen for:
- Call Offer: Incoming call offer received
- Call Accept: Call was accepted
- Call Terminate: Call was terminated
Parse Event Data Whether to parse the eventData field based on event type 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 HTTP header name used for webhook authentication (required if authentication enabled)
Auth Header Value Expected value for the authentication header (required if authentication enabled)

Output

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

  • instanceId: Identifier of the WSAPI instance sending the event.
  • receivedAt: Timestamp when the event was received.
  • eventType: The type of call event (e.g., "call_offer", "call_accept", "call_terminate").
  • Parsed event data fields merged directly into the output object if parsing is enabled.
  • If parsing is disabled, the raw eventData object is included under the eventData property.
  • Optionally, the full original webhook payload is included under rawEvent if requested.

No binary data output is generated for call events.


Dependencies

  • Requires a valid API key credential for the WSAPI service if media auto-download is enabled (not applicable here since call events do not involve media).
  • The node expects to receive webhook POST requests at a configured endpoint.
  • Optional webhook authentication requires setting a custom header name and expected value to secure incoming webhook calls.

Troubleshooting

  • Webhook Authentication Failure: If enabled, ensure that incoming webhook requests include the correct custom header with the expected value. Otherwise, the node will ignore the request without responding.
  • Missing Event Data: The node ignores webhook calls missing eventType or eventData fields.
  • Unselected Event Types: If the incoming event type is not among the selected call events, the node will not trigger.
  • Parsing Disabled: If parsing is disabled, users must handle nested event data manually.
  • No Media Download: This node does not download media for call events; enabling media auto-download has no effect here.

Links and References

Discussion