n8n-nodes-mochi-zalo
v1.0.0
Published
n8n community nodes for Zalo personal API — send messages, manage groups/friends, listen to events. Built on mochi-zalo.
Maintainers
Readme
mochi-zalo-n8n-nodes
n8n community nodes for Zalo personal messaging API
Automate Zalo messaging with n8n — send messages, manage groups and friends, listen to real-time events.
Built on mochi-zalo, a secure modular Zalo personal API library.
Installation
In your n8n instance, go to Settings → Community Nodes → Install and enter:
mochi-zalo-n8n-nodesNodes
| Node | Type | Description | |------|------|-------------| | Zalo Message | Action | Send text, link, image; delete/forward messages | | Zalo User | Action | Get info, find by phone, block/unblock, manage friends | | Zalo Group | Action | Create groups, manage members, change name | | Zalo Poll | Action | Create polls, get results, lock polls | | Zalo Message Trigger | Trigger | Fires when a message is received (user or group) | | Zalo Friend Trigger | Trigger | Fires on friend request / added / removed events |
Credentials
Create a Zalo Personal API credential with:
| Field | Required | Description | |-------|----------|-------------| | Cookie | Yes | Session cookie JSON from Zalo login | | IMEI | Yes | Device IMEI from login session | | User Agent | Yes | Browser user-agent string | | Proxy | No | HTTP proxy URL |
Getting Credentials
Use mochi-zalo to log in with QR code and save your session:
import { Zalo, saveSession } from 'mochi-zalo';
const zalo = new Zalo();
const api = await zalo.loginQR({}, (event) => {
// Display QR code from event.data
console.log(event.data);
});
// Save session to file
await saveSession(api, './session.json');Security
This package is built on mochi-zalo which includes:
- HTTP redirect URL whitelist (Zalo domains only)
- Bounded QR scan loops (no infinite recursion)
- No phone-home telemetry (removed checkUpdate)
- Per-credential API singleton (no global state between executions)
License
MIT © Cong Dinh
