Bài 18/21Thực hành
Bài 18 — POST bài lên Sage Marketing (Composer API)
Gửi JSON sản phẩm + caption + media URL → Sage Marketing composer → đa kênh 6 platform.
35 min
Mục tiêu bài học
- Viết JSON body POST create post Sage Marketing
- Map Drive media_url + Docs caption vào variants
- Nhận sage_post_id → ghi Sheet
JSON POST mẫu — tạo bài Sage Marketing
{
"title": "Auto Marketing SKU-001",
"master_caption": "Khóa học n8n + AI Agent + Google Workspace",
"media_url": "https://drive.google.com/uc?id=DRIVE_FILE_ID",
"platforms": ["facebook", "instagram", "youtube", "tiktok", "linkedin"],
"variants": {
"facebook": { "caption": "...", "hashtags": ["#startup"] },
"youtube": { "title": "Auto Marketing Pro", "description": "...", "is_short": true },
"tiktok": { "caption": "...", "privacy": "public" }
},
"scheduled_at": "2026-07-10T07:00:00+07:00",
"source": "n8n-auto-marketing",
"product_id": "SKU-001"
}Workflow wf-sage-publish
[Manager Tool: publish_social OR /publish command]
→ [Sheets Lookup Posts + Products]
→ [Google Docs Get caption] + [Drive get media URL]
→ [HTTP POST https://sagemkt.io.vn/api/internal/publish]
→ [Sheets Update sage_post_id, agent_status=scheduled]
→ [Telegram: ✅ Đã gửi Sage Marketing — xem Calendar]Bài tập
- Kết nối ≥2 tài khoản MXH trên Sage Marketing dashboard
- POST 1 bài test qua wf-sage-publish
- Verify bài xuất hiện trên Sage Calendar + Sheet sage_post_id
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.