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 to send promotional or customer service messages that include images to users. Specifically, the "Gửi Tin Tư Vấn Kèm Ảnh" operation allows sending a message containing both text and an image to a specified user ID on Zalo.

Typical use cases include:

  • Sending personalized promotional content with images to customers.
  • Providing customer support messages enriched with visual aids.
  • Marketing campaigns where visual content improves engagement.

For example, a business can use this node to send a promotional message about a new product launch along with its image directly to targeted users on Zalo.

Properties

Name Meaning
User ID The unique identifier of the recipient user who will receive the message.
Promotional Text The textual content of the consultation or promotional message to be sent.
Image Source The source type of the image to send: either a direct URL or an attachment ID previously uploaded to Zalo OA.
Image URL The URL of the image to be included in the message (required if Image Source is "URL").
Image ID The ID of the image already uploaded to Zalo OA (required if Image Source is "Attachment ID").
Message Type The category of the message: "Customer Service" for consultation messages or "Promotion" for advertising messages.

Output

The node outputs JSON data representing the response from the Zalo OA API after attempting to send the message. This typically includes status information such as success confirmation, message IDs, or error details if the request failed.

No binary data output is produced by this operation.

Dependencies

  • Requires an active and valid API access token credential for Zalo Official Account.
  • The node uses HTTP POST requests to the Zalo OA API endpoints.
  • Proper permissions must be granted to the API token, including rights to send messages and access user information.
  • Network connectivity to https://openapi.zalo.me is necessary.

Troubleshooting

  • Common Issues:

    • Invalid or expired access tokens will cause authentication failures.
    • Incorrect user IDs may result in errors or messages not being delivered.
    • Using an invalid image URL or an incorrect attachment ID will cause the API to reject the message.
    • Insufficient permissions on the API token can prevent message sending.
  • Error Messages:

    • Errors related to access tokens usually suggest checking token validity and refreshing if needed.
    • Image-related errors recommend verifying the image URL format or confirming the attachment ID exists and is accessible.
    • If the API returns permission errors, ensure the Zalo OA app has the required scopes enabled.
  • Resolution Tips:

    • Refresh or reauthenticate the API credentials if token expiration is suspected.
    • Double-check all input parameters, especially user ID and image references.
    • Confirm that the Zalo OA account has granted the necessary permissions for messaging.
    • Review API response messages for specific error codes and consult Zalo OA API documentation accordingly.

Links and References

Discussion