Zalo OA icon

Zalo OA

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

Overview

This node interacts with the Zalo Official Account (OA) API, specifically providing various operations to manage and communicate through a Zalo OA. The "Lấy Danh Sách Tag" operation retrieves a list of tags associated with the OA, which can be used for organizing or segmenting followers.

Typical use cases include:

  • Fetching tags to display or select from in workflows that involve tagging users.
  • Managing user segmentation by retrieving available tags before assigning or removing them.
  • Automating marketing or communication strategies based on user tags.

For example, you might use this node to get the first 10 tags starting from an offset of 0, then use those tags to assign to users or filter messages.

Properties

Name Meaning
Số Lượng Tối Đa The starting position (offset) from which to begin fetching the tag list (number).
Số Lượng The number of tags to retrieve (count) (number).

Output

The output JSON contains the response from the Zalo OA API's tag list endpoint. It includes:

  • data.tags: An array of tag objects, each with at least:

    • tag_id (string): The unique identifier of the tag.
    • tag_name (string): The name of the tag.
    • display_info (string): A formatted string combining ID and name for easy display, e.g., "ID: 12345 - Name: VIP".
  • usage_guide: An object containing usage instructions and examples on how to use tag_id or tag_name when assigning or removing tags in other node operations.

If an error occurs, the output JSON will contain:

  • error: true
  • message: Description of the error.
  • response: The raw API response data if available.
  • suggestion: Recommendations to resolve the issue.

Dependencies

  • Requires an API authentication token credential for Zalo OA API access.
  • Uses the Axios HTTP client library to make REST API calls.
  • The node expects proper permissions granted to the API token to access tag information.

Troubleshooting

  • Common issues:

    • Invalid or expired access token leading to authorization errors.
    • Insufficient permissions on the Zalo OA app to read tags.
    • Network connectivity problems causing request failures.
  • Error messages:

    • Errors returned from the API are logged and included in the output JSON under message.
    • If the v3.0 API call fails, the node attempts a fallback to the v2.0 API.
    • Suggestions are provided in error outputs to check access token validity and permissions.
  • Resolution tips:

    • Ensure the API token is valid and has the required scopes.
    • Verify the OA app has granted permission to manage tags.
    • Check network connectivity and retry if transient errors occur.

Links and References

Discussion