Zalo icon

Zalo

Zalo Node

Overview

This node implements the "Send Friend Request" operation for an API resource. It allows users to send a friend request message to another user identified by either their user ID or phone number. The node supports sending the friend request with either a predefined message format or a raw JSON payload.

Common scenarios where this node is useful include automating social network interactions, integrating friend request workflows into larger automation processes, or bulk sending friend requests with customized messages.

Practical examples:

  • Automatically sending a welcome friend request message to new users imported from a CRM.
  • Sending personalized friend requests in bulk using raw JSON data for advanced customization.
  • Integrating friend request sending as part of a marketing campaign workflow.

Properties

Name Meaning
Send Option Choose between sending the friend request message as "Raw Json" or as a "Message" (predefined format).
User ID Or Phone Number The identifier of the user to whom the friend request will be sent. Can be either a user ID or a phone number.
Message The text message to accompany the friend request when using the predefined message format.

Output

The node outputs JSON data representing the result of the friend request sending operation. This typically includes confirmation details such as success status, any returned IDs, or error information if the request failed.

The node does not output binary data.

Dependencies

  • Requires access to the target API service that handles friend requests.
  • Needs appropriate API authentication credentials configured in n8n (e.g., an API key or token).
  • Depends on internal modules for HTTP requests and response handling (bundled within the node).

Troubleshooting

  • Missing Required Fields: Ensure that the "User ID Or Phone Number" and "Message" fields are provided when required. Missing these will cause errors.
  • Invalid User Identifier: If the user ID or phone number is invalid or not found, the API may return an error. Verify the correctness of the identifier.
  • Authentication Errors: If API credentials are missing or incorrect, the node will fail to authenticate. Check credential configuration.
  • API Rate Limits: Sending too many friend requests in a short time may trigger rate limiting. Implement delays or batch processing.
  • Malformed Raw JSON: When using the "Raw Json" option, ensure the JSON is correctly formatted; otherwise, the API may reject the request.

Common error messages usually relate to validation failures, authentication issues, or API response errors. Review the error details in the node's execution logs to identify the cause.

Links and References

  • Refer to the API provider’s documentation for friend request endpoints and message formatting.
  • n8n documentation on creating and configuring custom nodes: https://docs.n8n.io/integrations/creating-nodes/
  • Best practices for handling API authentication in n8n workflows.

Discussion