Actions6
- Message Actions
- File Actions
Overview
This n8n node allows you to send a text message via the Zalo Official Account (OA) API. It is designed for scenarios where you need to automate communication with users on Zalo, such as sending notifications, alerts, or chat messages from workflows. The node supports both authenticated and anonymous messaging, making it suitable for customer support bots, marketing campaigns, or transactional notifications.
Practical examples:
- Sending order confirmations to customers on Zalo.
- Notifying users about account activity or promotions.
- Engaging with anonymous users in a chat-based support flow.
Properties
| Name | Meaning |
|---|---|
| Authentication | Select the authentication method. Options: Parameter Credentials, Predefined Credentials. |
| Base URL | The base URL that serves the API. Only shown if "Parameter Credentials" is selected. |
| Access Token | OA access token required for API calls. Only shown if "Parameter Credentials" is selected. |
| Send To Anonymous | Whether the user is anonymous or not. If true, use "Anonymous ID" and "Conversation ID"; if false, use "User ID". |
| User ID | User ID of Zalo. Required if "Send To Anonymous" is false. |
| Anonymous ID | The ID representing the anonymous user. Required if "Send To Anonymous" is true. |
| Conversation ID | The ID of the conversation. Required if "Send To Anonymous" is true. |
| Text | Text content you want to send to the user. This is the main message body. |
Output
The node outputs a JSON object containing the response from the Zalo OA API after attempting to send the text message. The structure typically includes:
{
"data": {
// Information about the sent message, such as message ID, status, etc.
},
"error": {
// Error details if the request failed.
}
}
- If the operation is successful, expect fields like message ID, recipient info, and status.
- If there is an error, the output will include error codes and messages from the Zalo API.
Dependencies
- Zalo Official Account API: Requires a valid OA access token.
- n8n Credentials: You may need to configure credentials in n8n, especially if using "Predefined Credentials".
- Environment Variables: None explicitly required unless your n8n instance manages secrets this way.
Troubleshooting
Common issues:
- Invalid Access Token: Ensure the provided OA access token is correct and has not expired.
- Missing Required Fields: Make sure to provide all necessary fields based on whether the recipient is anonymous or identified by User ID.
- API Rate Limits: Excessive requests may be throttled by Zalo's API.
Error messages:
"Invalid OA access token": Check and update your access token."Missing required parameter: userID/anonymousID/conversationID": Ensure you have filled out the correct recipient information depending on the anonymity setting."Permission denied": Verify your OA account permissions and scopes.