Package Information
Downloads: 358 weekly / 358 monthly
Latest Version: 1.0.2
Author: baoplh
Documentation
n8n-nodes-zalo-bot
Community node for n8n to integrate with Zalo Bot Platform.
Installation
Community Node (Recommended)
In n8n, go to Settings > Community Nodes and install:
@baoplh/n8n-nodes-zalo-bot
Manual Install
cd ~/.n8n/nodes
npm install @baoplh/n8n-nodes-zalo-bot
Then restart n8n.
Features
Zalo Bot Node
Bot Operations:
getMe- Get bot informationgetUpdates- Get updates from botsetWebhook- Configure webhookdeleteWebhook- Delete webhookgetWebhookInfo- Get webhook information
Message Operations:
sendMessage- Send text messagesendPhoto- Send photosendSticker- Send stickersendChatAction- Show typing status
Zalo Bot Trigger (Webhook)
Webhook trigger to receive events from Zalo Bot:
- Auto-register webhook on activation
- Validate requests with secret token
- Support all event types
- Requires public URL (for production)
Zalo Polling Bot Trigger ⭐
Polling trigger to receive messages from Zalo Bot without public URL:
- ✅ No public domain required - Perfect for local development and testing
- ✅ Works behind firewall/NAT
- ✅ Easy setup - Just activate and start receiving messages
- Configurable polling interval (default: 3000ms)
- Support multiple event types (message, text, photo, sticker)
- Auto-start/stop with workflow activation
Use Cases:
- 🔧 Local development and testing
- 🏠 Self-hosted n8n without public domain
- 🔒 Secure environments with restricted network access
- 💡 Quick prototyping without webhook setup
Configuration
Credentials
Create a new credential with type Zalo Bot API:
- Access Token: Your bot token (format:
BOT_ID:SECRET_TOKEN) - Secret Key: (Optional) Key for webhook signature verification
Get Bot Token
- Visit Zalo Bot Platform
- Create a new bot or select an existing one
- Copy the Bot Token from dashboard
Usage Examples
Send Message
- Add Zalo Bot node
- Select Resource: Message
- Select Operation: sendMessage
- Enter Chat ID and Text
Receive Webhook
- Add Zalo Bot Trigger node
- Configure Secret Token (auto-generated if left empty)
- Activate workflow
- Webhook will be automatically registered
- Note: Requires n8n with public HTTPS URL
Polling Mode - No Public URL Required! 🚀
Perfect for local development and self-hosted instances:
- Add Zalo Polling Bot Trigger node
- Configure Polling Interval (default: 3000ms)
- Shorter interval = faster response, more API calls
- Longer interval = slower response, fewer API calls
- Select event types to listen for:
message- All messagestext- Text messages onlyphoto- Messages with photossticker- Sticker messages
- Activate workflow - That's it! No webhook configuration needed
Comparison:
| Feature | Webhook Trigger | Polling Trigger |
|---|---|---|
| Public URL | ✅ Required | ❌ Not Required |
| Real-time | ✅ Instant | ⚠️ Near real-time |
| Setup | Complex | Simple |
| Firewall | Must allow inbound | Works anywhere |
| Best for | Production | Development/Testing |
Development
Build
pnpm run build
Development mode
pnpm run dev
Publish
# Patch version
pnpm run release:patch
# Minor version
pnpm run release:minor
# Major version
pnpm run release:major
License
MIT