Zalo Bot icon

Zalo Bot

Interact with Zalo Bot Platform

Overview

This node integrates with the Zalo Bot Platform, allowing users to manage bot-related functions such as setting or deleting webhooks, retrieving bot information, and handling inbound events. Specifically, the deleteWebhook operation enables users to remove the webhook URL registered with their Zalo bot.

Deleting a webhook is useful when you want to stop receiving inbound event notifications from Zalo temporarily or permanently. For example, if you are updating your workflow or changing the webhook URL, you might delete the existing webhook first. However, note that after deletion, inbound events will stop until you either reactivate the workflow or manually set a new webhook.

Practical scenarios:

  • Temporarily disabling inbound event triggers during maintenance.
  • Removing an outdated webhook before registering a new one.
  • Stopping all inbound events for a bot without deleting the bot itself.

Properties

Name Meaning
Debug Mode When enabled, returns the full API request URL and status for debugging purposes. Useful for troubleshooting API calls.
Confirm Delete A safety confirmation toggle. Must be enabled to proceed with deleting the webhook. Warns that deleting the webhook stops all inbound events and triggers will not auto-register again until the workflow is reactivated or webhook is manually set again.

Output

The node outputs a JSON array where each element corresponds to the response of the executed API call. For the deleteWebhook operation, the output JSON contains:

  • response: The parsed JSON response from the Zalo Bot API indicating success or failure of the webhook deletion.
  • debug (optional): If debug mode is enabled or an error occurs, this includes the called URL (with sensitive tokens redacted) and HTTP status code.

Example output structure:

[
  {
    "response": {
      "ok": true,
      "message": "Webhook deleted successfully"
    },
    "debug": {
      "url": "https://bot-api.zapps.me/bot<REDACTED_TOKEN>/deleteWebhook",
      "status": 200
    }
  }
]

No binary data is produced by this operation.

Dependencies

  • Requires an active API authentication token credential for the Zalo Bot Platform.
  • Uses the external Zalo Bot API endpoint at https://bot-api.zapps.me.
  • Requires network access to call the Zalo Bot API.
  • No additional environment variables or n8n configurations beyond the API credential are needed.

Troubleshooting

  • Error: Confirmation not enabled
    If you attempt to delete the webhook without enabling the "Confirm Delete" property, the node throws an error instructing you to enable it. This is a safeguard to prevent accidental webhook removal.

  • API call failures
    If the API call fails (e.g., invalid token, network issues), the node returns the raw response and debug info if debug mode is enabled. Check the returned HTTP status and message for details.

  • Webhook not deleted
    Ensure the API token has sufficient permissions and the webhook exists. Also, confirm that the "Confirm Delete" flag is set to true.

  • Inbound events stop after deletion
    This is expected behavior. To resume inbound events, either reactivate the workflow or manually set the webhook again using the corresponding operation.

Links and References

Discussion