Close Menu
Content DistilledContent Distilled
  • Tech
    • Ai Gen
    • N8N
    • MCP
  • Javascript
  • Business Ideas
  • Startup Ideas
  • Tech Opinion
  • Blog

Subscribe to Updates

Get the latest creative news from FooBar about art, design and business.

What's Hot

Turn Any GitHub Repo Into AI Tutorials in 5 Minutes

July 14, 2025

5 New NotebookLM Features That Will Transform Your Learning

July 13, 2025

Build SaaS Image Generator: React, Convex & OpenAI Tutorial

July 12, 2025
Facebook X (Twitter) Instagram
  • Tech
    • Ai Gen
    • N8N
    • MCP
  • Javascript
  • Business Ideas
  • Startup Ideas
  • Tech Opinion
  • Blog
Facebook X (Twitter) Instagram Pinterest
Content DistilledContent Distilled
  • Tech
    • Ai Gen
    • N8N
    • MCP
  • Javascript
  • Business Ideas
  • Startup Ideas
  • Tech Opinion
  • Blog
Content DistilledContent Distilled
Home»Tech»N8N»How to Create Zalo Chatbot with N8N – Complete Tutorial
N8N

How to Create Zalo Chatbot with N8N – Complete Tutorial

PeterBy PeterJuly 10, 2025No Comments7 Mins Read
Facebook Twitter Pinterest LinkedIn Tumblr Email
H
H
Share
Facebook Twitter LinkedIn Pinterest Email

Based on a tutorial by MCBII

Are you looking to create an automated Zalo chatbot to streamline your business operations? Or maybe you want to integrate Zalo with other automation workflows?

In this comprehensive guide, I’ll summarize the detailed tutorial from MCBII’s channel on how to use N8N to create a fully functional Zalo chatbot. From basic setup to advanced workflows including AI integration, bulk messaging, and group member management.

Quick Navigation

  • Installing N8N Zalo Node and Initial Configuration (00:00-08:30)
  • Zalo Login via QR Code (08:31-12:15)
  • Creating Basic Workflow – Auto Reply Messages (12:16-18:45)
  • Telegram Integration – Send from Telegram to Multiple Zalo Groups (18:46-28:30)
  • Extract Zalo Group Members to Google Sheets (28:31-35:20)
  • Building AI-Powered Zalo Chatbot (35:21-end)

Installing N8N Zalo Node and Initial Configuration (00:00-08:30)

To get started with Zalo automation, you’ll need to install the Zalo node for N8N. This is a community node developed by Cảng Phạm and is completely free to use.

Important Note: You must self-host N8N to use this Zalo node. If you’re currently using the cloud version, you’ll need to switch to a self-hosted instance on a VPS.

Installation Steps:

  • Install Node: Go to Settings → Community nodes → Install the node with the provided name
  • Create API Key: Navigate to Personal → Settings → N8N API → Create API key (select no expiration)
  • Create Credential: Set up N8N account credential with the API key you just created
  • URL Endpoint: Enter your exact N8N instance URL (without trailing slash)

The Zalo node provides 5 main functional groups:

  • Zalo User: Friend management, user search, accept friend requests
  • Zalo Group: Create groups, add/remove members, get group information
  • Zalo Message: Send messages to individuals or groups
  • Zalo Message Trigger: Listen for incoming messages
  • Zalo Login via QR Code: Authenticate with Zalo

Personal Experience:

I recommend setting up N8N on a VPS from the start if you’re serious about automation. The VPS cost is just a few dollars per month, but the flexibility is significantly higher than the cloud version.

Zalo Login via QR Code (08:31-12:15)

After installing the node and setting up credentials, the next step is to authenticate with Zalo to get a session.

Authentication Process:

  • Select the “Zalo login via QR code” node
  • Choose the N8N account credential you just created
  • If using an overseas VPS, configure a Vietnam proxy
  • Click “Test step” to display the QR code
  • Open Zalo on your phone and scan the QR code
  • After successful login, click Save
Proxy Note: Zalo only works well from Vietnamese IP addresses. If your VPS is overseas, you’ll need to purchase a Vietnam proxy (around $1-2/month).

After successful authentication, the system will create a new “Zalo API” credential in your Credentials section. You can rename this credential for easier management.

Pro Tip:

Name your credentials using the format “Zalo_AccountName” to easily distinguish between multiple Zalo accounts.

Creating Basic Workflow – Auto Reply Messages (12:16-18:45)

Your first workflow will help you understand how Zalo Message Trigger works and how to set up automatic message responses.

Basic Workflow Structure:

  • Zalo Message Trigger: Listen for incoming messages
  • Processing Logic: Distinguish between personal and group messages
  • Zalo Message: Send automatic replies

Message Trigger Configuration:

// Message type distinction:
// type = 0: Personal message (user)
// type = 1: Group message (group)

// Get sender ID:
{{ $json.uidFrom }} // ID of message sender

// Get message content:
{{ $json.message.data.content }} // Text content

In the demo workflow, the system automatically responds with “Hello, just testing” when receiving messages. You can customize the response logic based on message content or sender ID.

Real-world Applications:

This workflow can be expanded into auto-reply for fan pages, automated customer service, or notification bots for work groups.

Telegram Integration – Send from Telegram to Multiple Zalo Groups (18:46-28:30)

This workflow allows you to send messages from a Telegram topic to multiple Zalo groups simultaneously – very useful for marketing or bulk notifications.

Workflow Structure:

  • Telegram Message Trigger: Receive messages from specific topic
  • IF Node: Filter messages by chat ID and thread ID
  • Multiple Zalo Message Nodes: Send to different groups

Telegram Message Filtering Configuration:

// IF Conditions:
{{ $json.message.chat.id }} // Chat ID of Telegram group
{{ $json.message.message_thread_id }} // Thread ID of topic

// Get message content:
{{ $json.message.text }} // Message content

In the video demo, the creator sends announcements about the AI Automation Club community from Telegram, and the message gets distributed to 3 different Zalo groups simultaneously.

Note: Each Telegram topic has its own thread ID. You need to get the correct ID for the workflow to function properly.

Why Use Telegram as Intermediary:

According to the creator, sending from Telegram is more stable and avoids direct spam from Zalo. Additionally, Telegram has a better management interface for bot control.

Extract Zalo Group Members to Google Sheets (28:31-35:20)

This workflow helps extract member lists from Zalo groups and save them to Google Sheets for management or analysis purposes.

Process Flow:

  • Get Group Info: Retrieve group information and member list
  • Split Out: Split member list into individual items
  • Loop through Get User Info: Get details for each member
  • Google Sheets: Save information to spreadsheet

Member Data Processing:

// Aggregate node to avoid expression errors:
{{ $json.memberList }} // Member list from group info

// Split out configuration:
// Input: memberList 
// Include: Binary Data = false

// Information retrieved for each user:
// - Display Name
// - Zalo ID  
// - Avatar URL
// - Date of Birth (if available)
Permission Limitation: You can only retrieve member lists when you’re an admin or deputy admin of the group. Regular members don’t have this permission.

In the demo, the system extracts information from 40 members of a test group and saves it to Google Sheets with columns: Display Name, Zalo ID, Avatar. The creator hid date of birth information to protect privacy.

Real-world Applications:

This workflow is useful for member list backups, demographic analysis, or preparing data for targeted marketing campaigns.

Building AI-Powered Zalo Chatbot (35:21-end)

The final workflow is a complete AI chatbot that can answer questions based on data from the creator’s YouTube channel and WordPress site.

AI Chatbot Features:

  • Content Search: Scans database of YouTube videos and WordPress articles
  • Message Classification: Handles text, images, videos, stickers
  • Trigger Conditions: Only activates when mentioned or contains “@AI” keyword
  • AI Agent: Uses Gemini 2.0 Pro for intelligent responses

Trigger Condition Configuration:

// Activation conditions:
1. Message contains "@AI"
2. Message is a mention (reply)
3. Thread ID matches specific group

// Message classification:
{{ $json.msgType }} // text, photo, video, file, sticker

// Get content:
{{ $json.message.data.content }} // Text content

The chatbot is integrated with an AI Agent that has 2 main tools:

  • YouTube Tool: Search within crawled video database
  • WordPress Tool: Search within blog articles from mcba.vn

When receiving questions related to existing content, the bot returns relevant YouTube video links or blog articles. For general questions, the bot uses AI to provide answers.

Current Limitation: The Zalo node doesn’t support sending images yet. The creator mentioned this feature will be updated within the week.

Expansion Potential:

This is a foundation for building customer service bots, FAQ bots, or personal assistant bots. You can integrate additional data sources like CRM, product databases, etc.

This article summarizes the excellent tutorial created by MCBII. If you found this summary helpful, please support the creator by watching the full video and subscribing to their channel.

Join the AI Automation Club Plus community to learn more automation workflows and monetize AI skills. Special offer ends in 9 days!

 

Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
Peter
  • Website

Related Posts

Complete Guide: Installing n8n Automation Platform on Ubuntu VPS

June 30, 2025

Create AI Chatbots Without Code: N8N, Loom & Vercel Guide

May 27, 2025

Deploy Self-Hosted Content Apps with Coolify & Strapi on Vultr

May 24, 2025

Essential n8n Enterprise Features: Advanced Workflow Management

May 16, 2025
Add A Comment
Leave A Reply Cancel Reply

Editors Picks
Top Reviews
Advertisement
Content Distilled
Facebook Instagram Pinterest YouTube
  • Home
  • Tech
  • Buy Now
© 2025 Contentdistilled.com Contentdistilled.

Type above and press Enter to search. Press Esc to cancel.