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 interact programmatically with various features of a Zalo OA. Specifically, the "Lấy Thông Tin Đơn Hàng" (Get Order Information) operation allows retrieving detailed information about a specific order by its ID.

Common scenarios for this node include:

  • Fetching order details to display or process in workflows.
  • Automating customer support by retrieving order status and details.
  • Integrating Zalo OA order data with other systems like CRMs or inventory management.

Practical example:

  • A workflow triggers when a new message arrives from a user, then uses this node to fetch the order details by order ID to provide personalized responses or update internal records.

Properties

Name Meaning
ID Đơn Hàng The unique identifier of the order to retrieve details for. This is a required string input.

Output

The node outputs JSON data containing the response from the Zalo OA API for the requested order information. The structure typically includes fields describing the order such as order ID, items, shipping details, status, total amount, and other metadata provided by the Zalo OA API.

If an error occurs during the API call, the output JSON will contain an error flag set to true, an error message, and possibly additional response data with details from the API.

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/v3.0/oa.
  • Depends on the axios HTTP client library for making API requests.

Troubleshooting

  • Common issues:

    • Invalid or expired access token leading to authentication errors.
    • Incorrect or non-existent order ID causing the API to return errors or empty results.
    • Network connectivity problems preventing API calls.
  • Error messages and resolutions:

    • "Error getting product info: ..." or similar messages indicate failure in fetching data; verify the order ID and ensure the access token has proper permissions.
    • If the API returns permission-related errors, confirm that the Zalo OA app has granted necessary scopes and the token is valid.
    • For unexpected API changes or failures, consult the latest Zalo OA API documentation and update credentials or parameters accordingly.

Links and References

Discussion