Documentation

n8n-nodes-zalo-clean

Clean, transparent Zalo nodes for n8n. No obfuscation. No external server calls. Fully auditable.

Built as a secure replacement for n8n-nodes-mtai-zalo-test-trial (flagged as potential malware).

Nodes

Node Description
Zalo Login (QR) QR-based login. Captures session data and auto-updates credential.
Zalo User Find Zalo user by phone number.
Zalo Send Message Send text message to user or group.

Credential: Zalo Session

Stores session data (cookie JSON, IMEI, user agent). Auto-populated by the Login node.

Install

On your n8n server:

# Navigate to your n8n installation
cd /path/to/n8n

# Install from local path (copy this folder to server first)
npm install /path/to/n8n-nodes-zalo-clean

# Or install from a git repo:
# npm install git+https://github.com/YOUR_USER/n8n-nodes-zalo-clean.git

# Restart n8n
pm2 restart n8n  # or however you run n8n

Docker:

# In your Dockerfile or docker-compose override
RUN cd /usr/local/lib/node_modules/n8n && npm install /app/n8n-nodes-zalo-clean

Setup

1. Create credential

In n8n: Settings → Credentials → Add → "Zalo Session"
Leave fields empty (the Login node fills them).
Note the credential ID from the URL.

2. Set environment variables

# Required for auto-credential-update
N8N_API_KEY=your-n8n-api-key
N8N_HOST_URL=https://your-n8n-instance.com

3. Create Login workflow

Manual Trigger → Zalo Login (QR)
                  ├── Auto Update Credential: true
                  └── Credential ID: (from step 1)

Run this workflow → scan QR with phone → credential auto-updates.

4. Use in SendEmail workflow

Replace the old malicious nodes:

  • n8n-nodes-mtai-zalo-test-trial.zaloUser → zaloUserClean
  • n8n-nodes-mtai-zalo-test-trial.zaloSendMessage → zaloSendMessageClean

Both use the zaloSessionApi credential.

Auto-credential rotation

When Zalo session expires, just run the Login workflow again.
The Login node auto-updates the credential via n8n REST API.
No need to edit any workflow nodes or republish.

Security comparison

This package n8n-nodes-mtai-zalo-test-trial
Source code Readable TypeScript Obfuscated (gulp obfuscate)
Repository Available Empty
External calls None HTTP POST to unknown server
File writes None Writes to vietinsoft_data/
Dependencies zca-js only zca-js + ffmpeg + node-wit + pnpm
Credential handling n8n built-in encryption Plaintext JSON file
IP scanning No Yes (ipify + local network scan)
child_process No Yes

Limitations

  • Uses unofficial Zalo API (zca-js) — account may be banned by Zalo
  • Session cookies expire every few days — requires periodic QR re-login
  • For production, consider Zalo Official Account API + ZNS instead

License

MIT

Discussion