Zalo OA icon

Zalo OA

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

Overview

The "Zalo OA" node integrates with the Zalo Official Account (OA) API, enabling automation of various interactions and management tasks related to a Zalo OA. Specifically, the "Chuẩn Bị Upload Video" (Prepare Upload Video) operation prepares the system for uploading a video by specifying its name and size in bytes. This step is typically required before the actual video upload process to allocate resources or obtain an upload token from Zalo's API.

This node is beneficial in scenarios where users want to automate content publishing workflows on Zalo OA, such as scheduling videos for broadcast, managing media assets, or integrating Zalo OA video uploads into larger marketing automation pipelines.

Example use cases:

  • Preparing a video file for upload to Zalo OA before sending it as a message.
  • Automating batch uploads of videos to a Zalo OA for content management.
  • Integrating video upload preparation into multi-step workflows involving other Zalo OA operations like messaging or article creation.

Properties

Name Meaning
Tên Video The name/title of the video to be uploaded.
Kích Thước Video (byte) The size of the video file in bytes. This informs the API about the video file size.

Output

The output JSON structure contains the response data returned by the Zalo OA API after preparing the video upload. Typically, this includes information such as an upload URL, upload token, or confirmation that the video can be uploaded. The exact fields depend on Zalo's API response but generally provide necessary details to proceed with the actual video upload.

If the node supports binary data output (not explicitly shown for this operation), it would represent the video file or related media content. However, for the "prepare upload video" operation, the output is purely JSON metadata related to the upload preparation.

Dependencies

  • Requires an active connection to the Zalo Official Account API via an API key credential (access token).
  • The node uses the axios library for HTTP requests.
  • The base API endpoint used is https://openapi.zalo.me/v2.0/oa.
  • Proper OAuth access token with permissions to manage media uploads on the Zalo OA is mandatory.
  • No additional environment variables are indicated beyond the API credentials.

Troubleshooting

  • Common issues:

    • Invalid or expired access token leading to authentication errors.
    • Incorrect video size or name parameters causing API validation failures.
    • Network connectivity problems preventing communication with Zalo API.
  • Error messages:

    • Errors returned from the API will be included in the output JSON under an error field with descriptive messages.
    • If the node encounters missing binary data properties (for other upload operations), it throws an error indicating the missing property.
  • Resolutions:

    • Ensure the API token is valid and has the required permissions.
    • Verify that the video size matches the actual file size in bytes.
    • Confirm the video name is correctly set and not empty.
    • Check network connectivity and firewall settings.
    • Review Zalo OA API documentation for any changes in the upload preparation endpoint.

Links and References

Discussion