Zalo Bot icon

Zalo Bot

Interact with Zalo Bot Platform (bot.zapps.me)

Overview

This node integrates with the Zalo Bot Platform, enabling users to manage and interact with their Zalo bots programmatically. It supports operations such as setting or deleting webhooks, retrieving bot information, receiving updates via long polling, sending messages, photos, stickers, and chat actions.

A common use case for the Set Webhook operation is configuring a URL on your server where Zalo will send event notifications (like incoming messages). This allows real-time interaction with users through your bot without needing to poll for updates continuously.

Practical example:
You want to receive message events from your Zalo bot in your own backend system. By using this node’s Set Webhook operation, you specify your server’s webhook URL and a secret token for security. Once set, Zalo will push updates directly to your endpoint.


Properties

Name Meaning
Webhook URL The HTTPS URL where Zalo will send webhook events (e.g., https://your-domain.com/zalo/webhook). Must be accessible publicly.
Secret Token A secret token used to verify webhook requests. If left empty, the node uses the token stored in credentials.

Output

The node outputs an array of JSON objects corresponding to each input item processed. For the Set Webhook operation, the output JSON contains the response from the Zalo API, which typically includes:

  • ok: Boolean indicating if the request was successful.
  • Additional fields depending on the API response, such as confirmation details.

If the API call fails, the node throws an error unless "Continue On Fail" is enabled, in which case it outputs an error object with the error message.

No binary data is produced by this operation.


Dependencies

  • Requires an API authentication token (bot token) configured in the node credentials.
  • Connects to the Zalo Bot Platform API at https://bot-api.zapps.me or a custom base URL if specified in credentials.
  • The webhook URL must be publicly accessible over HTTPS.
  • Optionally requires a secret token for securing webhook calls, either provided in the node or stored in credentials.

Troubleshooting

  • Missing Bot Token:
    Error: "Missing Bot Token (credentials)"
    Solution: Ensure that the API token is correctly set in the node credentials.

  • Missing Secret Token:
    Error: "Secret Token is required (provide in node or credentials)."
    Solution: Provide a secret token either in the node parameter or in the credentials.

  • Zalo API errors:
    Errors returned by the Zalo API are surfaced with descriptions when available. Common issues include invalid URLs, network problems, or incorrect tokens.

  • Webhook URL not reachable:
    The webhook URL must be accessible from the internet. Use tools like curl or online services to verify accessibility.

  • Invalid webhook URL format:
    Ensure the URL starts with https:// and is correctly formatted.


Links and References

Discussion