zalo-official

n8n node for Zalo Official Account (OA) integration

Package Information

Downloads: 7 weekly / 17 monthly
Latest Version: 0.1.0
Author: blueskys9

Documentation

n8n-nodes-zalo

This is an n8n community node that lets you use Zalo Official Account (OA) in your n8n workflows.

Zalo is a popular messaging platform in Vietnam. This node allows you to interact with Zalo Official Accounts.

n8n is a fair-code licensed workflow automation platform.

Installation

Follow the installation guide in the n8n community nodes documentation.

Community Nodes (Recommended)

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

Manual Installation

To get started install the package in your n8n root directory:

npm install n8n-nodes-zalo

For Docker-based deployments add the following line before the font installation command in your n8n Dockerfile:

RUN cd /usr/local/lib/node_modules/n8n && npm install n8n-nodes-zalo

Credentials

You need to create a Zalo Official Account and get API credentials:

  1. Go to Zalo for Developers
  2. Create or select your Official Account
  3. Get your OA ID, App ID, App Secret, and Access Token

Operations

Zalo Node

Message

  • Send Text: Send a text message to a user
  • Send Image: Send an image to a user
  • Send File: Send a file to a user

User

  • Get Info: Get information about a user

Zalo Trigger Node

Triggers when events occur in your Zalo Official Account:

  • User Send Text: When a user sends a text message
  • User Send Image: When a user sends an image
  • User Send File: When a user sends a file
  • User Send Sticker: When a user sends a sticker
  • Follow: When a user follows your OA
  • Unfollow: When a user unfollows your OA

Compatibility

Tested with n8n version 1.0.0+

Usage

Example: Auto-reply to messages

  1. Add Zalo Trigger node
  2. Select events: user_send_text
  3. Add Zalo node
  4. Set Resource: Message
  5. Set Operation: Send Text
  6. Set User ID: {{ $json.sender.id }}
  7. Set Message: Thanks for your message!

Example: Get user info when they follow

  1. Add Zalo Trigger node
  2. Select events: follow
  3. Add Zalo node
  4. Set Resource: User
  5. Set Operation: Get Info
  6. Set User ID: {{ $json.follower.id }}

Resources

Development

To make changes to this node:

# Install dependencies
npm install

# Build the node
npm run build

# Run in development mode
npm run dev

License

MIT

Discussion