Zalo OA Trigger icon

Zalo OA Trigger

Nhận webhook từ Zalo OA

Zalo OA Trigger

AI-generated

Summary

Waits for events from a Zalo Official Account (OA) via webhook. Triggers the workflow when selected events occur (e.g., user follows/unfollows, sends messages/media, clicks buttons/links). Outputs event data including event type and relevant details. Optionally includes metadata if enabled. Uses OA Secret Key for verification. Callback URL is for Multi-Account Chat Manager setup (leave empty if unused).

Inputs

  • oaSecretKey (required) — OA Secret Key from Zalo OA management (password field). Used to verify incoming webhook requests.
  • events (required) — Multi-select of event types to listen for. Options: follow, unfollow, user_send_text, user_send_image, user_send_file, user_send_location, user_send_sticker, user_send_gif, user_click_button, user_click_link, or all. Default: all.
  • getMetadata — If true, includes additional metadata in the output. Default: false.
  • callbackUrl — URL for Multi-Account Chat Manager webhook processing. Leave empty if not using this feature.

Output shape

When an event triggers, returns an array with one item containing JSON data. Includes at minimum: event_type (string matching selected event), and event-specific fields (e.g., message text for user_send_text). If getMetadata is true, includes additional metadata fields. Exact structure depends on the event type and Zalo OA API.

Output is passed to subsequent workflow nodes as workflow data. The node itself returns a webhook response (status 200 on success, 401/405 on error) but this is not exposed to the workflow.

Examples

Example 1: Trigger when a user sends a text message to the Zalo OA

Set oaSecretKey to your OA's secret key. Set events to ['user_send_text']. Leave getMetadata unchecked and callbackUrl empty unless using Multi-Account Chat Manager.

Example 2: Trigger on any event with metadata

Set oaSecretKey, leave events as default (all), enable getMetadata, and configure callbackUrl only if managing multiple accounts via Chat Manager.

Links

Discussion