Auto Marketing — Multi-Agent Architecture với n8n
Bài 8/21Thực hành

Bài 8 — Routing lệnh Telegram: /product, /media, /draft, /publish

Thiết kế bộ lệnh chuẩn cho toàn hệ thống 5 lớp — contract giữa user và Manager Agent.

20 min
Mục tiêu bài học
  • Định nghĩa 8 lệnh Telegram chuẩn
  • Switch node route theo command prefix
  • Ghi command log vào Google Sheet tab Commands
Workflow IF/Switch phân nhánh — pattern routing lệnh Telegram
Mỗi lệnh map tới intent cho Manager Agent ở Bước 2docs.n8n.io

Bộ lệnh chuẩn hệ thống

  • /product — nhập sản phẩm mới (text hoặc kèm ảnh)
  • /media — upload ảnh/video vào Google Drive
  • /draft — tạo bản thảo Google Docs từ mô tả
  • /generate — AI tạo caption đa kênh
  • /schedule — lên lịch đăng từ Sheet
  • /publish — đăng ngay lên MXH / Sage Marketing
  • /report — báo cáo metrics tuần
  • /help — liệt kê lệnh

Format /product nâng cao

/product
name: Khóa Auto Marketing Pro
price: 1990000
desc: Khóa n8n + AI Agent + Google Workspace + MXH
platforms: facebook,youtube,tiktok,linkedin
tone: professional
drive_folder: /Marketing/Products/SKU-001

Bài tập thực hành

  • Thêm Switch 8 nhánh vào wf-input-normalizer
  • Tạo tab Commands trên Google Sheet: timestamp, chat_id, command, args
  • Test /help và /product — verify log trên Sheet

Tiếp tục lộ trình

Hoàn thành từng bài thực hành để xây hệ Auto Marketing Multi-Agent của riêng bạn.

Bài 8 — Routing lệnh Telegram: /product, /media, /draft, /publish — Auto Marketing — Multi-Agent Architecture với n8n | Sage Marketing