OpenWA Trigger icon

OpenWA Trigger

Starts workflow when OpenWA events occur

OpenWA Trigger

AI-generated

Summary

Listen for incoming WhatsApp events and messages from an OpenWA session and trigger a workflow upon receiving matching webhooks. Supports server-side filtering, event deduplication, and optional HMAC-SHA256 signature verification via Webhook Secret.

Inputs

  • sessionId (required) — The ID of the OpenWA session from which to receive events. Choose from the list or specify an ID using an expression.
  • events (required) — One or more WhatsApp event types to listen for, such as message.received, message.ack, group.join, or session.status.
  • webhookSecret — Optional shared secret (minimum 16 characters) registered with OpenWA to verify incoming deliveries via HMAC-SHA256 and the X-OpenWA-Signature header; deliveries failing verification are rejected with 401 Unauthorized.
  • filters — Server-side filters specified as a JSON object (e.g., {"conditions":[{"field":"type","operator":"is","value":["text"]}]}) that the OpenWA gateway applies to incoming message events to reduce unwanted deliveries. Filters support fields like sender, recipient, body, type, isGroup, kind, and more. Each Trigger registers its own webhook with specific filters; changes cause auto re-registration upon activation.
  • deduplicateDeliveries — When enabled, the node drops repeated deliveries of the same event identified by the envelope's idempotencyKey to avoid duplicated executions. This is a best-effort de-duplication; it has no effect on n8n versions 2.19.2 and later due to internal changes, so downstream workflows should also handle duplicates keyed on idempotencyKey.

Output shape

a single record envelope per event

Each output item contains one envelope per event with properties: event, timestamp, sessionId, idempotencyKey, deliveryId, and the event payload under data. For example, message fields are found in data. Use idempotencyKey to manage de-duplication across retries and crash replays; deliveryId identifies individual delivery attempts.

Examples

Example 1: Trigger a workflow whenever a new WhatsApp message is received

Set Session Name or ID to your session and set Events to ["Message Received"].

Example 2: Secure incoming webhook events with a shared secret

Select your session and target events, then enter a Webhook Secret of 16 or more characters to enforce HMAC-SHA256 signature verification.

Example 3: Filter incoming events to text messages only

Configure target events and provide a JSON filter object: {"conditions":[{"field":"type","operator":"is","value":["text"]}]}.

Links

Discussion