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 🙏

© 2025 – Pkg Stats / Ryan Hefner

n8n-nodes-zalo-v1

v2.1.9

Published

n8n node for Zalo automation

Downloads

1,604

Readme

n8n-nodes-zalo-v1

This is an n8n community node that allows you to interact with Zalo messaging platform in your n8n workflows.

n8n is a fair-code licensed workflow automation platform.

Installation

Follow the installation guide in the n8n community nodes documentation.

Community Node Installation

  1. Go to Settings > Community Nodes
  2. Select Install
  3. Enter n8n-nodes-zalo-v1 in the Enter npm package name field
  4. Agree to the risks and select Install

Troubleshooting: "The specified package could not be loaded"

If you encounter this error, it's a known n8n issue with stale files. Fix it by running:

./fix-n8n-install.sh

Or manually:

# Stop n8n
docker stop <your-n8n-container>

# Clear nodes directory
docker exec <container> rm -rf /home/node/.n8n/nodes/*

# Start n8n
docker start <your-n8n-container>

# Then install via n8n UI again

See TROUBLESHOOTING.md for more details.

Manual Installation

To install the node locally for development:

# Clone the repository
git clone https://github.com/TechxnixLLC/n8n-nodes-zalo-v1.git
cd n8n-nodes-zalo-v1

# Install dependencies
npm install

# Build the node
npm run build

# Link the node to n8n
npm link
cd ~/.n8n/nodes
npm link n8n-nodes-zalo-v1

Features

Main Node: Zalo User

The Zalo User node supports the following operations:

Message Resource

  • Send Message - Send text messages to users or groups
  • Send Sticker - Send stickers
  • Send Image - Send images
  • Send Link - Share links

Friend Resource

  • Send Friend Request - Send friend requests
  • Accept Friend Request - Accept incoming friend requests
  • Get All Friends - Retrieve list of all friends
  • Block User - Block specific users

Group Resource

  • Create Group - Create new groups
  • Add User to Group - Add users to existing groups
  • Remove User from Group - Remove users from groups
  • Change Group Name - Update group names
  • Create Poll - Create polls in groups

Get Resource

  • Get All Friends - Get list of friends
  • Get All Groups - Get list of groups
  • Get User Info - Get information about specific users
  • Get Last Message - Retrieve last message from a thread

Trigger Node: Zalo User Trigger

The trigger node listens for real-time events:

  • New Message - Trigger on new messages
  • Friend Request - Trigger on friend requests
  • Group Event - Trigger on group events
  • All Events - Trigger on any Zalo event

Filter Options

  • Filter by specific user IDs
  • Filter by specific group IDs
  • Keyword filtering
  • Option to exclude self messages

Credentials

To use this node, you need to set up Zalo User API credentials:

Authentication Methods

  1. QR Code (Recommended for first-time setup)

    • Scan QR code with Zalo mobile app
  2. Cookie (For automated workflows)

    • Extract cookie from browser after logging into Zalo Web
    • Open browser console and run: document.cookie
    • Copy the entire cookie string

Required Fields

  • Authentication Method: Choose QR Code or Cookie
  • Cookie: Your Zalo session cookie (if using Cookie method)
  • IMEI: Device identifier (optional, auto-generated if not provided)
  • User Agent: Browser user agent string

Usage Example

Send a Message Workflow

  1. Add the Zalo User node to your workflow
  2. Select Message as the resource
  3. Choose Send Message operation
  4. Enter the recipient's Thread ID
  5. Select Thread Type (User or Group)
  6. Enter your Message text
  7. Execute the node

Listen for New Messages

  1. Add the Zalo User Trigger node
  2. Select New Message as event type
  3. Set polling interval (default: 5 seconds)
  4. Optionally configure filters
  5. Activate the workflow

Important Notes

⚠️ Placeholder Implementation

This is a template/starter implementation with placeholder responses. To make it fully functional, you need to:

  1. Integrate with actual Zalo API:

    • Use official Zalo API from https://developers.zalo.me
    • Or integrate with libraries like zalo-api-final
    • Or implement browser automation
  2. Replace placeholder responses in:

    • nodes/ZaloUser/ZaloUser.node.ts
    • nodes/ZaloUser/ZaloUserTrigger.node.ts
  3. Implement real authentication in credentials

QR Login Node

The package includes a dedicated Zalo Login node that handles authentication:

  • Login with QR Code - Displays QR code in terminal for scanning
  • Login with Cookies - Authenticate using existing credentials
  • Validate Credentials - Check if session is still valid

Uses the zca-js library (v2.0.4) for lightweight, reliable Zalo API access without requiring a browser.

API Integration Options

Option A: zca-js (Recommended - Already Included)

npm install zca-js

Lightweight Zalo API wrapper with built-in authentication. See: https://www.npmjs.com/package/zca-js

Option B: Official Zalo API

npm install axios

Register your app at https://developers.zalo.me and use OAuth tokens.

Option C: Community Libraries

npm install zalo-api-final

Use community-maintained Zalo libraries.

Development

Build the project

npm run build

Watch mode for development

npm run dev

Lint the code

npm run lint
npm run lintfix

Format the code

npm run format

Resources

License

MIT

Support

For issues and questions:

Version History

0.1.0

  • Initial release
  • Basic node structure with placeholder implementations
  • Support for Message, Friend, Group, and Get resources
  • Trigger node for real-time events
  • Zalo Login node with QR code authentication
  • zca-js integration for reliable API access
  • Cookie and credential-based authentication methods

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request