zalo-automation

n8n community node for Zalo automation via secure backend API

Package Information

Released: 9 mo ago
Downloads: 3 weekly / 18 monthly
Latest Version: 1.0.1
Author: AiVietHub

Available Nodes

Documentation generating…

Documentation

n8n-nodes-zalo-automation

npm version
npm downloads

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

  1. Go to Settings → Community Nodes
  2. Click Install a community node
  3. Enter: n8n-nodes-zalo-automation
  4. Click Install

Via npm (CLI)

npm install n8n-nodes-zalo-automation

Then restart n8n.

Authentication

This node requires Zalo API credentials to authenticate with the backend service.

Setting Up Credentials

  1. 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
  2. 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")
  3. 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 Zalo
    • follow_user - Follow a Zalo user
    • add_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

  1. Configure Credentials (first time only):

    • Go to Settings → Credentials
    • Add Zalo API credential with your API key
  2. 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!"
    }
    
  3. Execute the workflow

Example 2: Follow a User

  1. Add Zalo Automation node
  2. Select your Zalo API credential
  3. Set Action to Follow User
  4. Set Payload:
    {
      "userId": "zalo_user_456"
    }
    
  5. Execute the workflow

Example 3: Add a Friend

  1. Add Zalo Automation node
  2. Select your Zalo API credential
  3. Set Action to Add Friend
  4. Set Payload:
    {
      "friendId": "zalo_user_789"
    }
    
  5. 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

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

Discussion