n8n-nodes-zalo-automation
v1.0.1
Published
n8n community node for Zalo automation via secure backend API
Maintainers
Readme
n8n-nodes-zalo-automation
n8n community node for Zalo automation. This node provides a simple interface to automate Zalo actions through a secure backend API.
Features
- ✅ Send Messages - Send messages via Zalo
- ✅ Follow Users - Follow Zalo users
- ✅ Add Friends - Send friend requests on Zalo
- ✅ Secure - All business logic and licensing handled server-side
- ✅ Simple - Easy-to-use interface with clear error messages
Installation
Via n8n UI
- Go to Settings → Community Nodes
- Click Install a community node
- Enter:
n8n-nodes-zalo-automation - Click Install
Via npm (CLI)
npm install n8n-nodes-zalo-automationThen restart n8n.
Authentication
This node requires Zalo API credentials to authenticate with the backend service.
Setting Up Credentials
Get Your API Key:
- Visit https://aiviethub.com
- Sign up or log in to your account
- Navigate to API Keys section
- Create a new API key or copy an existing one
Configure Credentials in n8n:
- Go to Credentials in n8n (Settings → Credentials)
- Click Add Credential
- Search for "Zalo API"
- Enter your API key
- Save the credential with a name (e.g., "My Zalo API")
Use in Workflow:
- Add the Zalo Automation node to your workflow
- Select your Zalo API credential from the dropdown
- The API key is stored securely and can be reused across multiple nodes
Benefits of Using Credentials
✅ Reusable: Use the same credential across multiple Zalo Automation nodes
✅ Secure: API keys are encrypted and stored securely
✅ Easy Management: Update API key in one place, affects all nodes
✅ Better Organization: Separate authentication from node configuration
Node Parameters
Credentials (Required)
- Type: Credential selector
- Description: Select your Zalo API credential
- Setup: Configure in Settings → Credentials → Add Credential → Zalo API
- Security: API key is encrypted and stored securely
Action (Required)
- Type: Dropdown
- Options:
send_message- Send a message via Zalofollow_user- Follow a Zalo useradd_friend- Send a friend request on Zalo
Payload (Optional)
- Type: JSON editor
- Description: JSON object with action-specific parameters
- Example for send_message:
{ "to": "user_id_or_phone", "message": "Hello from n8n!" } - Example for follow_user:
{ "userId": "zalo_user_id" } - Example for add_friend:
{ "friendId": "zalo_user_id" }
Usage Examples
Example 1: Send a Message
- Configure Credentials (first time only):
- Go to Settings → Credentials
- Add Zalo API credential with your API key
- Add Node:
- Add Zalo Automation node to workflow
- Select your Zalo API credential
- Set Action to
Send Message - Set Payload:
{ "to": "user123", "message": "Hello from n8n automation!" } - Execute the workflow
Example 2: Follow a User
- Add Zalo Automation node
- Select your Zalo API credential
- Set Action to
Follow User - Set Payload:
{ "userId": "zalo_user_456" } - Execute the workflow
Example 3: Add a Friend
- Add Zalo Automation node
- Select your Zalo API credential
- Set Action to
Add Friend - Set Payload:
{ "friendId": "zalo_user_789" } - Execute the workflow
Output
On successful execution, the node returns:
{
"action": "send_message",
"result": {
"messageId": "msg_1234567890",
"status": "sent",
"timestamp": "2024-01-01T12:00:00.000Z",
"payload": { ... }
}
}Error Handling
The node provides clear, actionable error messages for common issues:
- Invalid API Key - Check your API key and ensure it's correct
- License Expired - Renew your subscription at aiviethub.com
- Feature Not Allowed - Upgrade your plan to access this feature
- Instance Mismatch - Contact support if you need to transfer your license
All errors include links to support and upgrade pages.
Pricing & Licensing
This node requires a valid subscription to use. Pricing plans:
- Free Plan: Send messages only
- Elite Plan: Send messages + Follow users
- Premium Plan: All features (Send messages + Follow users + Add friends)
Get your API key and manage your subscription at https://aiviethub.com
Architecture
This node is a thin client that communicates with a secure backend API:
- Backend URL:
https://api-n8n.aiviethub.com/zalo/execute - Authentication: Bearer token (API key)
- Instance Binding: Automatic (uses n8n workflow ID)
Important: This node does NOT contain any business logic or license validation. All security, licensing, and Zalo API integration is handled by the backend service.
Support
- Documentation: https://aiviethub.com/docs
- Support Email: [email protected]
- Issues: GitHub Issues
License
MIT
Changelog
1.0.0 (2024-01-01)
- Initial release
- Support for send_message, follow_user, add_friend actions
- API key authentication
- Comprehensive error handling
