Actions9
Overview
This node allows you to manage Zalo users by interacting with the Zalo platform through various user-related operations. Specifically, for the "Gửi lời mời kết bạn" (Send Friend Request) operation, it sends a friend request to a specified Zalo user along with a custom message.
Common scenarios where this node is beneficial include automating social engagement workflows, such as:
- Automatically sending friend requests to new contacts collected from other sources.
- Personalizing connection requests with custom messages to increase acceptance rates.
- Managing large-scale outreach campaigns on Zalo without manual intervention.
Example: You have a list of potential customers' Zalo user IDs and want to send them personalized friend requests with a welcoming message automatically.
Properties
| Name | Meaning |
|---|---|
| User ID | The unique identifier of the Zalo user to whom the friend request will be sent. |
| Message | The text message that accompanies the friend request, allowing personalization. |
Output
The node outputs an array of JSON objects, each corresponding to an input item processed. For the "sendFriendRequest" operation, each output JSON contains:
status: A string indicating the success status, typically"Thành công"(Success).response: The raw response object returned from the Zalo API after sending the friend request.
The output is paired with the input item index to maintain traceability.
No binary data output is produced by this operation.
Dependencies
- Requires valid Zalo API credentials including authentication cookies, device IMEI, and user agent strings.
- These credentials must be configured in n8n prior to using the node.
- Internally uses the
zca-jslibrary to interact with the Zalo API.
Troubleshooting
- Invalid Credentials or Authentication Failure: If the node throws an error about missing or invalid API instance, verify that the Zalo API credentials are correctly set up and contain valid cookie, IMEI, and user agent information.
- User ID Not Found or Invalid: Errors may occur if the provided User ID does not exist or is incorrect. Double-check the User ID values.
- Message Too Long or Invalid Format: Ensure the message complies with any length or content restrictions imposed by Zalo.
- API Rate Limits or Temporary Failures: If requests fail intermittently, consider implementing retry logic or check Zalo API rate limits.
- Use the "Continue On Fail" option in the node settings to handle errors gracefully per item.
Links and References
- Zalo Official Developer Documentation
- n8n Documentation - Creating Custom Nodes
- zca-js GitHub Repository (Note: Replace with actual repo if available)