Zalo OA icon

Zalo OA

Tương tác với Zalo Official Account API

Overview

This node integrates with the Zalo Official Account (OA) API, enabling users to perform various operations related to managing messages, followers, tags, articles, products, categories, and orders within a Zalo OA. Specifically, the "Kiểm Tra Trạng Thái Tin Nhắn" (Check Message Status) operation allows users to query the current status of a sent message by providing its message ID.

Common scenarios for this node include:

  • Verifying if a message sent via Zalo OA has been delivered, read, or failed.
  • Automating message status checks in workflows to trigger subsequent actions based on message delivery.
  • Managing customer interactions by tracking message states.

Practical example:

  • After sending a promotional message to a user, use this node to check whether the message was successfully delivered or read, and then update your CRM or trigger follow-up communications accordingly.

Properties

Name Meaning
Message ID The unique identifier of the message whose status you want to check.

Output

The node outputs a JSON object containing the response from the Zalo OA API regarding the message status. This typically includes fields such as the message ID, status code, status description, timestamps, and any error information if applicable.

If an error occurs during the API call, the output JSON will contain:

  • error: true
  • message: Description of the error encountered.
  • response: The raw response data from the API, if available.
  • note and suggestion: Additional guidance to resolve common issues.

The node does not output binary data for this operation.

Dependencies

  • Requires an active Zalo Official Account API access token credential configured in n8n.
  • Uses the Zalo OA API endpoint at https://openapi.zalo.me/v2.0/oa/message/status.
  • The API call is made via HTTP POST with JSON payload containing the message_id.
  • Proper permissions must be granted to the access token, specifically the permission to manage and query message statuses.

Troubleshooting

  • Common Issues:

    • Invalid or expired access token leading to authentication errors.
    • Incorrect or non-existent message ID causing the API to return errors.
    • Insufficient permissions on the access token for querying message status.
    • Network or connectivity issues preventing API calls.
  • Error Messages and Resolutions:

    • "Lỗi khi gọi API kiểm tra trạng thái tin nhắn: <error message>": Indicates failure in calling the message status API. Check that the access token is valid and has the required permissions.
    • API response status codes and messages are logged; reviewing these can help identify issues like rate limits or malformed requests.
    • Note about API changes: The node uses the v3.0 API endpoint which requires POST method instead of GET. Ensure your configuration aligns with this.
    • Suggestions often recommend verifying access rights and ensuring the message ID is correct and corresponds to a message sent by the OA.

Links and References


This summary is based solely on static analysis of the provided source code and property definitions.

Discussion