Zalo OA Trigger icon

Zalo OA Trigger

Nhận webhook từ Zalo OA

Zalo OA Trigger

AI-generated

Summary

Listen for specified event types from a Zalo Official Account by setting up a webhook trigger in n8n. Validate incoming webhook requests using the OA Secret Key and optionally include metadata in the event outputs.

Inputs

  • OA Secret Key (required) — The secret key from the Zalo Official Account management page, used to validate webhook requests.
  • Các Loại Sự Kiện (required) — The types of Zalo OA events to listen for, such as user follow, unfollow, text messages, images, files, locations, stickers, GIFs, button clicks, link clicks, or all events.
  • Get Metadata — Toggle whether to retrieve additional metadata information with events.
  • Callback URL — Callback URL used for Multi-Account Chat Manager setups; leave empty if not used.

Output shape

An array of event data objects representing incoming Zalo OA events matching the selected event types.

Each output item is wrapped inside workflowData with a JSON object including event_type, original_event, message (if any), timestamp, and possibly metadata if enabled. The node also handles webhook handshake challenges and returns appropriate HTTP status codes for validation and errors.

Examples

Example 1: User selects 'Người Dùng Follow OA' and 'Người Dùng Gửi Tin Nhắn Văn Bản' in event types, provides the OA Secret Key, and enables Get Metadata. The node triggers whenever a user follows the OA or sends a text message, outputting detailed event data including metadata fields if requested.

Set 'OA Secret Key' to your Zalo OA secret, select desired events, optionally enable 'Get Metadata', and supply 'Callback URL' if needed.

Links

Discussion