Zalo Web icon

Zalo Web

Zalo Web.

Overview

The "Send Friend Request" operation of the Zalo Web node allows users to send a friend request on the Zalo platform either by specifying a target user's unique ID or their phone number. This node is useful for automating social interactions, such as expanding a contact list or managing connections programmatically within workflows.

Practical examples include:

  • Automatically sending friend requests to new leads collected from a CRM system by their user IDs.
  • Sending friend requests based on phone numbers obtained from marketing campaigns or contact lists.

Properties

Name Meaning
User ID or Phone Number Choose whether to identify the target user by their unique User ID or by their Phone Number. Options: "User ID", "Phone Number".
User ID The unique identifier of the target user or chat. Required when sending a friend request. To find your chat ID, use the @get_id_bot service.
Message A message to accompany the friend request. Required when sending a friend request.

Output

The node outputs a JSON object under the json field containing the result of the friend request operation. This typically includes confirmation data or status information returned by the Zalo API about the sent friend request.

No binary data output is produced by this operation.

Dependencies

  • Requires an active and valid API authentication credential for the Zalo Web API.
  • The node depends on internal session management and login handling to maintain authenticated access.
  • The node uses helper functions to resolve user identifiers when phone numbers are provided (it first finds the user by phone number, then sends the request using the resolved user ID).

Troubleshooting

  • Invalid User ID or Phone Number: If the target user cannot be found or the ID is invalid, the operation will fail. Ensure that the User ID or phone number is correct and that the user exists on Zalo.
  • Authentication Errors: If the API credentials are missing, expired, or invalid, the node will not be able to send friend requests. Verify that the API key or token is correctly configured in n8n credentials.
  • Rate Limits or API Restrictions: Sending too many friend requests in a short time may trigger rate limits or restrictions from Zalo. Implement delays or error handling to manage this.
  • Missing Required Parameters: Both the target user identifier and the accompanying message are required. Omitting these will cause errors.

Links and References

Discussion