npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

n8n-nodes-zalo-stephen

v0.9.19

Published

Các node hỗ trợ Zalo cho n8n

Readme

Banner image

n8n-nodes-zalo

A comprehensive n8n community node package for automating Zalo (Vietnamese messaging platform) workflows. This package enables seamless integration between n8n and Zalo, allowing you to automate messaging, group management, user interactions, and more—all within your own n8n instance with complete data privacy and security.

🔑 Key Features

  • 🔐 Secure Cookie-Based Authentication - Login using JSON cookies with IMEI for secure authentication
  • 💬 Message Automation - Send messages to users or groups programmatically
  • 👥 Group Management - Full control over Zalo groups (create, manage members, change settings)
  • 👤 User Management - Manage friends, block/unblock users, search users
  • 📊 Poll Management - Create and manage polls in groups
  • 🏷️ Tag Management - Organize contacts with tags
  • ⚡ Real-time Triggers - Listen to incoming messages and friend requests
  • 🔒 Privacy-First - All operations run within your n8n instance, no third-party API dependencies
  • 🌐 Proxy Support - Optional proxy configuration for international VPS deployments

📦 Available Nodes

1. Zalo Login 🔐

Authenticate with Zalo using Cookie JSON and IMEI.

Features:

  • Cookie JSON-based authentication
  • Automatic credential creation via n8n API
  • Proxy support for international IPs
  • IP location detection with recommendations

2. Zalo Send Message 💬

Send messages to Zalo users or groups.

Features:

  • Send text messages to users or groups
  • Support for message urgency levels (Default, Important, Urgent)
  • Quote/reply to existing messages
  • File attachments support

3. Zalo Message Trigger 📨

Real-time webhook trigger for incoming Zalo messages.

Event Types:

  • User messages
  • Group messages
  • Self-message listening (optional)

4. Zalo Group 👥

Complete group management operations.

Operations:

  • createGroup - Create a new group
  • getGroupInfo - Get group information
  • getAllGroups - List all groups
  • getGroupMembers - Get group member list
  • addUserToGroup - Add members to group
  • removeUserFromGroup - Remove members from group
  • addGroupDeputy - Add group deputy/admin
  • changeGroupName - Change group name
  • changeGroupAvatar - Change group avatar
  • createNote - Create notes in group

5. Zalo User 👤

Manage user profiles and friend relationships.

Operations:

  • getUserInfo - Get user information
  • getAllFriends - Get all friends list
  • findUser - Search users by phone number
  • sendFriendRequest - Send friend request
  • acceptFriendRequest - Accept friend request
  • blockUser - Block a user
  • unblockUser - Unblock a user
  • changeAccountSetting - Change account settings
  • changeAliasName - Change friend alias name

6. Zalo Poll 📊

Create and manage polls in groups.

Operations:

  • createPoll - Create a new poll
  • getPollInfo - Get poll information
  • getPollVoters - Get poll voters list
  • votePoll - Vote on a poll
  • closePoll - Close a poll

7. Zalo Tag 🏷️

Organize contacts with tags.

Operations:

  • Create, update, and manage contact tags

8. Zalo Friend Trigger 👥

Webhook trigger for friend request events.

Events:

  • New friend requests
  • Friend request accepted

🚀 Installation

Community Nodes (Recommended)

For n8n v0.187+ users, you can install this package directly from the Community Nodes panel:

  1. Open your n8n editor
  2. Go to Settings > Community Nodes
  3. Search for n8n-nodes-zalo-stephen
  4. Click Install
  5. Reload the n8n editor

Manual Installation

You can also install this package manually:

cd YOUR_N8N_INSTALLATION_DIRECTORY
npm install n8n-nodes-zalo-stephen

Note: There's also an Update button available within Community Nodes for easy updates.

📖 Login Guide - Cookie JSON Authentication

This package uses Cookie JSON authentication with IMEI (required). The IMEI must be retrieved from browser localStorage, not from cookies. Follow these detailed steps to get your credentials.

⚠️ Important: Understanding IMEI

IMEI is Required and Must be Provided Manually

  • IMEI is stored in browser localStorage with key z_uuid
  • IMEI is NOT stored in cookies
  • You must retrieve IMEI separately from cookies
  • IMEI is mandatory for authentication

Method 1: Using Zalo Cookies Extension (Recommended) ⭐

The easiest way to get both Cookies and IMEI.

Step 1: Install Zalo Cookies Extension

  1. Open Chrome Web Store: Zalo Cookies Extension
  2. Click Add to Chrome to install
  3. Pin the extension to your toolbar for easy access

Step 2: Login to Zalo Web

  1. Open Zalo Web in your browser
  2. Login with your Zalo account credentials
  3. Wait until you're fully logged in (you should see your chat list)

Step 3: Extract Cookies and IMEI

  1. Click the Zalo Cookies extension icon in your browser toolbar
  2. The extension will automatically display:
    • Cookies JSON - A JSON array in a text area
    • IMEI - A separate field showing the z_uuid value
  3. Copy both values:
    • Click Copy button next to Cookies JSON (or select all and copy)
    • Copy the IMEI value

What the extension shows:

┌─────────────────────────────────────┐
│  Zalo Cookies Extension            │
├─────────────────────────────────────┤
│  Cookies JSON:                      │
│  [{"name":"...","value":"..."},...] │
│  [Copy Button]                      │
├─────────────────────────────────────┤
│  IMEI:                              │
│  abc123xyz789...                    │
│  [Copy Button]                      │
└─────────────────────────────────────┘

Method 2: Using Cookie Editor Extension (Alternative)

If you prefer Cookie Editor or Zalo Cookies Extension is not available:

Step 1: Install Cookie Editor Extension

  1. Install Cookie Editor Extension
  2. Login to Zalo Web

Step 2: Export Cookies

  1. Click the Cookie Editor extension icon
  2. Navigate to Export tab
  3. Select format: JSON
  4. Copy the exported JSON array

Step 3: Get IMEI from Browser Console

Important: IMEI must be retrieved separately from localStorage!

  1. On the Zalo Web page, press F12 (or right-click → Inspect) to open Developer Tools
  2. Click the Console tab
  3. Type or paste this command and press Enter:
    localStorage.getItem('z_uuid')
  4. The console will display a string value like: "abc123xyz789..."
  5. Copy this value - this is your IMEI

Console Example:

> localStorage.getItem('z_uuid')
< "550e8400-e29b-41d4-a716-446655440000"

Method 3: Manual Export (Advanced Users)

For users who want complete control:

Step 1: Export Cookies Manually

  1. Open Zalo Web and login
  2. Press F12 → Go to Application tab (Chrome) or Storage tab (Firefox)
  3. In the left sidebar: Cookieshttps://chat.zalo.me
  4. Select all cookies visible in the list
  5. Manually format as JSON array:
    [
      {
        "name": "cookie_name_1",
        "value": "cookie_value_1",
        "domain": ".zalo.me",
        "path": "/"
      },
      {
        "name": "cookie_name_2",
        "value": "cookie_value_2",
        "domain": "chat.zalo.me",
        "path": "/"
      }
    ]

Step 2: Get IMEI from Console

Follow the same steps as Method 2, Step 3 above.

Step 4: Configure the Login Node in n8n

Now that you have both Cookies JSON and IMEI, configure the Zalo Login node:

Basic Configuration

  1. Add Zalo Login Node to your workflow
  2. Fill in required fields:
    • Cookie JSON: Paste the entire cookies JSON array you copied
    • IMEI: Paste the IMEI value (the z_uuid from localStorage)
    • User Agent: Leave empty (will be extracted automatically) OR paste from browser DevTools
    • Proxy: Leave empty unless using international VPS

Node Configuration Example:

┌─────────────────────────────────────┐
│  Zalo Login                        │
├─────────────────────────────────────┤
│  Cookie JSON:                       │
│  [{"name":"c_user","value":"123"}   │
│   ,{"name":"xs","value":"abc"}]     │
│                                     │
│  IMEI:                              │
│  550e8400-e29b-41d4-a716-...        │
│                                     │
│  User Agent: (optional)             │
│  [empty - auto extract]             │
│                                     │
│  Proxy: (optional)                  │
│  [empty]                            │
└─────────────────────────────────────┘

Advanced: Auto Credential Creation

Enable automatic credential creation via n8n API:

  1. Enable Auto Create Credential: Toggle ON
  2. Set Credential Name: Default is "Zalo API Credentials"
  3. Configure n8n Account Credential:
    • URL: Your n8n instance URL (default: http://localhost:5678)
    • API Key: Found in n8n Settings → API → Generate API Key
  4. Execute the node - Credentials will be created automatically!

Note: If auto-creation fails, the node output will show manual creation instructions with all required values.

📋 Cookie JSON Format Reference

Your Cookie JSON must follow this exact format:

[
  {
    "name": "cookie_name_1",
    "value": "cookie_value_1",
    "domain": ".zalo.me",
    "path": "/"
  },
  {
    "name": "cookie_name_2",
    "value": "cookie_value_2",
    "domain": "chat.zalo.me",
    "path": "/"
  }
]

Format Requirements:

  • Must be a valid JSON array (starts with [ and ends with ])
  • Each cookie is an object with name, value, domain, and path
  • Domain should be .zalo.me or chat.zalo.me
  • Path is typically /
  • All cookies should be from the same Zalo session

✅ Quick Reference Checklist

Before executing the Login node, ensure you have:

  • [ ] Cookie JSON: Valid JSON array with all cookies from Zalo Web session
  • [ ] IMEI: Copied from localStorage.getItem('z_uuid') (required!)
  • [ ] Cookies exported while actively logged in to Zalo Web
  • [ ] All cookies have domain .zalo.me or chat.zalo.me
  • [ ] (Optional) User Agent - can be auto-extracted
  • [ ] (Optional) Proxy - only if VPS has non-Vietnamese IP

⚠️ Important Notes & Troubleshooting

IMEI Requirements

  • IMEI is MANDATORY - Login will fail without it
  • ✅ IMEI is stored in localStorage, NOT in cookies
  • ✅ Use localStorage.getItem('z_uuid') in browser console
  • ❌ Don't try to extract IMEI from cookie values

Cookie Requirements

  • ✅ Export cookies while you're logged in (active session)
  • ✅ Cookies must include all session cookies (typically 10-20 cookies)
  • ✅ Domain must be .zalo.me or chat.zalo.me
  • ❌ Expired cookies will cause authentication failure
  • ❌ Missing important cookies (like session tokens) will fail

Common Errors and Solutions

Error: "Missing required params: IMEI"

  • Solution: Make sure you copied the IMEI from localStorage.getItem('z_uuid'), not from cookies

Error: "Cookie validation failed"

  • Solution: Re-export cookies while actively logged in to Zalo Web. Ensure all cookies are included.

Error: "Login failed: Missing required params"

  • Solution: Check that Cookie JSON is a valid JSON array format, and IMEI is not empty

Login works but messages fail

  • Solution: Cookies may be expired. Re-export fresh cookies and update credentials.

Proxy Configuration

When to use Proxy:

  • Your VPS/server is located outside Vietnam
  • Zalo requires additional verification for non-Vietnamese IPs
  • You're experiencing connection timeouts

Proxy Format:

https://username:password@proxy-host:port

Example:

https://user:[email protected]:8080

The Login node will detect your IP location and recommend proxy usage if needed.

🔄 Common Workflows

Workflow 1: Auto-Reply to Messages

Zalo Message Trigger → Function (Process Message) → Zalo Send Message

Use Case: Automatically reply to incoming messages with predefined responses.

Workflow 2: Group Member Management

Schedule Trigger → Zalo Group (getGroupMembers) → Process Data → Zalo Group (addUserToGroup/removeUserFromGroup)

Use Case: Automatically manage group members based on conditions.

Workflow 3: Message Forwarding

Zalo Message Trigger → Filter (Check Conditions) → Zalo Send Message (Forward to Another User/Group)

Use Case: Forward messages from one user/group to another.

Workflow 4: Friend Request Automation

Zalo Friend Trigger → Function (Check User Info) → Zalo User (acceptFriendRequest)

Use Case: Automatically accept friend requests based on criteria.

Workflow 5: Poll Management

Schedule Trigger → Zalo Poll (createPoll) → Zalo Send Message (Notify Group)

Use Case: Create and manage polls on a schedule.

Workflow 6: Bulk Message Sending

Google Sheets (Get Contacts) → Loop → Zalo Send Message

Use Case: Send messages to multiple contacts from a spreadsheet.

⚠️ Warning and Disclaimer

Please read this carefully before using the Zalo nodes:

⚠️ Important Disclaimer: The use of this library may violate Zalo's Terms of Service. Using automation tools with Zalo could result in your account being disabled or banned. We are not responsible for any consequences that may arise from using this package. Please use at your own risk and discretion.

🙏 Credits

We would like to extend our gratitude to:

  • ZCA-JS - The underlying library that makes Zalo automation possible

📝 License

MIT License

👨‍💻 Author

🤝 Contributing

Contributions, issues, and feature requests are welcome! Feel free to check the GitHub repository.


Made with ❤️ for the n8n community