Z-API Trigger icon

Z-API Trigger

Triggers workflow on Z-API webhook events

Z-API Trigger

AI-generated

Summary

Triggers a workflow in response to incoming Z-API webhook events, filtering messages and status updates by type, phone number, and group membership.

Inputs

  • event (required) — The event type to listen for (e.g., all events, message received, message status, connection status, chat presence, connection/disconnection).
  • options.filterPhone — Filter to trigger only for messages from this specific phone number (digits only).
  • options.filterGroup — Filter to trigger only for group messages (uses chatId ending with @g.us).
  • options.ignoreStatus — Ignore status/stories messages (defaults to true).
  • options.onlyText — Filter to trigger only for text messages (defaults to false).

Output shape

A list of one item containing an object with the original webhook payload and a _metadata object.

The _metadata object includes receivedAt timestamp, eventType, isGroup flag, phone number, and messageId.

Examples

Example 1: Trigger on all incoming text messages

Event: All Events; Options: Only Text Messages = true

Example 2: Trigger only for messages from a specific phone number

Event: Message Received; Options: Filter by Phone = 1234567890

Example 3: Trigger for group messages but ignore status updates

Event: Message Received; Options: Filter by Group = true; Options: Ignore Status Messages = true

Links

Discussion