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 various types of messages to users or groups on the Zalo platform. Specifically, for the Zalo OA resource and the Gửi Tin Nhắn File (Send File Message) operation, it allows sending a file message to a specific user who follows the OA.

Typical use cases include:

  • Sending important documents or files directly to customers or followers via Zalo.
  • Automating customer service workflows where files need to be shared.
  • Transactional messaging that includes attachments such as invoices or contracts.

For example, a business can automatically send a PDF contract file to a user after they complete a form on a website.

Properties

Name Meaning
Message Type The category of the message being sent. Options:
- Tin Tư Vấn (Customer Service)
- Tin Giao Dịch (Transaction)
- Tin Truyền Thông Cá Nhân (Promotion)
User ID The unique identifier of the recipient user who will receive the file message.
ID File The identifier of the file that has been previously uploaded to the Zalo OA system.

Output

The node outputs a JSON object containing the response from the Zalo OA API after attempting to send the file message. This typically includes status information about the message delivery, any error codes, and descriptive messages.

If the operation is successful, the output confirms the message was sent; if not, it contains error details to help diagnose issues.

The node does not output binary data for this operation; it only handles references to files already uploaded to Zalo OA.

Dependencies

  • Requires an active and valid API access token for the Zalo Official Account, which must be configured in n8n credentials.
  • Uses the Zalo OA API v3.0 endpoints for sending messages.
  • Relies on the file having been uploaded beforehand to Zalo OA, identified by the "ID File" property.
  • Requires proper permissions granted to the OA app, including message sending rights.

Troubleshooting

  • Common Issues:

    • Invalid or expired access token: Ensure the API key/token is current and properly configured.
    • Incorrect User ID: Verify the recipient's user ID is correct and that the user follows the OA.
    • Invalid File ID: Confirm the file ID corresponds to a file successfully uploaded to Zalo OA.
    • Insufficient permissions: Make sure the OA app has the necessary rights to send messages.
  • Error Messages:

    • Errors returned from the Zalo API will appear in the output JSON under error fields.
    • Typical errors include authentication failures, invalid parameters, or permission denials.
    • To resolve, check the token validity, parameter correctness, and OA app configuration.

Links and References


This summary is based on static analysis of the node's source code and provided property definitions, focusing on the "Zalo OA" resource and "Gửi Tin Nhắn File" operation.

Discussion