Show / hide languages:

🔌 Connecting AI Agents to Your World

A 6-week syllabus for wiring AI agents into Email, Calendar, CRM, Support, and Social Media — built for Chiang Mai solopreneurs and small teams.

หลักสูตร 6 สัปดาห์สำหรับเชื่อม AI agent เข้ากับอีเมล ปฏิทิน CRM ฝ่ายดูแลลูกค้า และโซเชียลมีเดีย — ออกแบบสำหรับเจ้าของกิจการคนเดียวและทีมเล็กในเชียงใหม่

为期 6 周的课程,教你把 AI 代理接入邮箱、日历、CRM、客户支持和社交媒体 — 专为清迈的独立创业者和小团队设计。

📚 6 weeks 🇹🇭 Bilingual TH/EN 🎯 Level: AI-curious → builder 🛠️ Hands-on labs

🎯 Course Overview

🇬🇧 What you'll build

By the end of week 6 you'll have a working AI agent stack that handles routine work across five live systems — Gmail, Google Calendar, your CRM, your support inbox, and at least one social channel.

Each week pairs concepts (OAuth, MCP, webhooks) with a concrete lab you can ship the same afternoon.

🇹🇭 ภาพรวมหลักสูตร

หลักสูตรนี้สอนคุณให้ เชื่อม AI agent เข้ากับเครื่องมือที่คุณใช้ทำงานทุกวัน — อีเมล ปฏิทิน CRM ระบบดูแลลูกค้า และโซเชียลมีเดีย

แทนที่จะใช้ AI เป็นแค่ "ที่ค้นหา" คุณจะสร้างผู้ช่วย AI ที่ทำงานจริง — ตอบลูกค้า จัดประชุม อัพเดท CRM โพสต์โซเชียล — ในขณะที่คุณทำอย่างอื่น

🇨🇳 你将搭建什么

到第 6 周结束时,你会拥有一套真正能干活的 AI 代理,覆盖五个真实系统 — Gmail、Google 日历、你的 CRM、客户支持收件箱,以及至少一个社交账号。

每周把概念(OAuth、MCP、Webhook)和当天就能交付的实战练习配对学习。

💡 The Sabrina Ramonov staircase — why this syllabus is sequenced this way

Most AI learners stop at Step 1 (prompts) or Step 2 (projects). This course pushes you to Step 3 (tools/MCP) and Step 4 (proactive agents), because that's where AI starts replacing real work hours instead of just answering questions.

คนเรียน AI ส่วนใหญ่หยุดอยู่ที่ขั้น 1 (พรอมต์) หรือขั้น 2 (โปรเจกต์) หลักสูตรนี้พาคุณไปต่อที่ ขั้น 3 (เครื่องมือ/MCP) และ ขั้น 4 (agent แบบ proactive) เพราะนั่นคือจุดที่ AI เริ่มทำงานแทนชั่วโมงทำงานจริง ๆ ไม่ใช่แค่ตอบคำถาม

多数学习 AI 的人停在第 1 步(提示词)或第 2 步(项目)。本课程会把你推到 第 3 步(工具 / MCP) 和 第 4 步(主动型代理),因为那才是 AI 真正替你省下工时、而不只是答题的地方。

1
Prompts
2
Projects / Context
3
Tools & MCP
4
Proactive agents

🗺️ How it all connects

Three pictures explain the whole architecture: the hub-and-spoke layout, how OAuth grants limited keys, and how events flow from real systems into agent actions.

สามภาพอธิบายสถาปัตยกรรมทั้งหมด — รูปแบบ hub-and-spoke, OAuth มอบกุญแจจำกัดสิทธิ์อย่างไร, และเหตุการณ์จากระบบจริงเดินทางสู่การทำงานของ agent อย่างไร

三张图说清整个架构:中心–辐条布局、OAuth 如何颁发受限钥匙,以及事件如何从真实系统流向代理动作。

1. The hub-and-spoke layout

📧 Email Gmail · Outlook 📅 Calendar Google · Outlook 🤝 CRM HubSpot · SF 🎧 Support Intercom · Zendesk 📱 Social LinkedIn · X · IG 🤖 AI Agent Claude · GPT · Local LLM OAuth+MCP OAuth+API MCP server webhook Zapier
One agent at the center. Five systems on the spokes. Each edge uses OAuth + a different integration style. agent ตัวเดียวอยู่ตรงกลาง ระบบ 5 ตัวอยู่รอบนอก แต่ละเส้นใช้ OAuth + วิธีเชื่อมที่ต่างกัน 中心一个代理,五个系统在辐条上。每条线都用 OAuth 加上不同的接入方式。

2. OAuth — the valet-key handshake

👤 You 🔐 Google / MS Auth consent screen 🤖 AI Agent holds token 📧 Gmail API scope: readonly ① I approve ② token (scoped) ③ read only "valet key" — agent can start the car, can't open the trunk
① You consent. ② Auth server issues a scoped token. ③ Agent uses the token — limited to what you approved. ① คุณอนุญาต ② Auth server ออก token พร้อมขอบเขต ③ agent ใช้ token — จำกัดเฉพาะที่คุณอนุญาต ① 你授权 ② 授权服务器签发带范围的令牌 ③ 代理使用该令牌 — 只能做你允许的事

3. The event loop — webhook → agent → action

💬 New ticket Zendesk fires event 📡 Webhook POST /agent 🤖 Agent RAG + tool-call conf >= 0.96? ✅ Auto-reply close ticket 🙋 HITL escalate wait for human Confidence threshold splits the path — auto-resolve OR human review
An event fires → webhook hits the agent → agent retrieves context → decides: auto-resolve (high confidence) or escalate (HITL). เกิดเหตุการณ์ → webhook ส่งเข้า agent → agent ดึง context → ตัดสิน: ตอบอัตโนมัติ (มั่นใจสูง) หรือส่งให้คน (HITL) 触发事件 → Webhook 推给代理 → 代理检索上下文 → 决策:自动处理(高置信度)或交人工(HITL)

🧱 Six Foundations You Need Before Connecting Anything

Before you grant an AI agent access to your live Gmail or CRM, you must understand these six ideas. Skip them and you'll leak credentials, duplicate records, or send 400 apology emails to your customers at 3 AM.

ก่อนจะให้ AI agent เข้าถึง Gmail หรือ CRM จริงของคุณ ต้องเข้าใจ 6 แนวคิดนี้ก่อน ข้ามไปแล้วคุณอาจทำ credential รั่ว สร้างข้อมูลซ้ำ หรือส่งอีเมลขอโทษลูกค้า 400 ฉบับตอนตีสาม

在让 AI 代理接触你真实的 Gmail 或 CRM 之前,必须先理解下面这六个概念。跳过它们的代价是:泄露凭证、生成重复记录,或者凌晨三点给客户连发四百封道歉邮件。

1

OAuth & Scopes

A security framework that gives an agent limited, delegated access to your account without ever seeing your password.

🔑 Like giving a valet a key that starts the ignition but won't open the trunk or glovebox.

Example: Granting calendar.readonly scope so the agent can check availability but can't delete meetings.

2

MCP (Model Context Protocol)

A standardized client–server protocol that defines how AI models securely connect to external tools and data sources.

🔌 A universal USB port for AI agents — one plug, hundreds of compatible tools.

Example: One MCP server lets your Claude agent query Postgres, read GitHub, and search Slack — no custom API wrappers.

3

Tool-Calling vs RAG

Tool-calling lets the agent do things (run a function); RAG lets it look up things (retrieve text from a knowledge base).

📚 RAG = open-book exam. Tool-calling = the student also has a phone to call experts during the test.

Example: RAG pulls the refund policy. Tool-calling actually issues the refund in Stripe.

4

Webhooks vs Polling

Webhooks push events the moment they happen; polling repeatedly asks "anything new?" on a timer.

📱 Webhook = a text when food arrives. Polling = opening the front door every 5 minutes to check.

Example: A Zendesk webhook fires the agent the instant a VIP ticket lands — no wasted API calls.

5

Idempotency & Safe Writes

A property that means running the same command twice produces the same result as running it once.

🛗 Pressing the elevator button five times doesn't summon five elevators.

Example: Attaching an idempotency key to a CRM create_contact call so a network retry doesn't make two Bobs.

6

Human-in-the-Loop (HITL)

A pattern where the agent pauses at high-risk steps and waits for a human to approve or correct.

📝 A junior staffer drafts the contract; the manager signs before it goes out.

Example: Agent drafts a refund response over 1,000 THB, but escalates to you before sending.

🔗 The Five Connector Domains

Each week from week 2 onward zooms in on one connector. Here's the map of what you'll learn for each.

ตั้งแต่สัปดาห์ที่ 2 เป็นต้นไป แต่ละสัปดาห์จะเจาะลึก connector หนึ่งตัว นี่คือแผนที่ว่าจะได้เรียนอะไรในแต่ละตัว

从第 2 周开始,每周聚焦一个连接器。下表是你在每个连接器中将学到的内容。

System Standard Integration Tools You'll Use Top Gotcha
📧 Email
Gmail · Outlook
Native workspace connector or MCP server with OAuth Claude Gmail connector, gws CLI, Lindy Overbroad mail.send scope = compliance risk
📅 Calendar
Google · Outlook
OAuth + Calendar API, or native Gemini/Copilot Claude Calendar connector, Todoist, Cal.com MCP Timezone math & mid-task auth expiry crashes
🤝 CRM
HubSpot · Salesforce · Pipedrive
MCP server, native AI builder, or Zapier Salesforce Agentforce, HubSpot MCP, Zapier "Token tax" — huge CRM schemas eat the context window
🎧 Customer Support
Intercom · Zendesk · Freshdesk
Native helpdesk AI agent + webhook handoff Intercom Fin, Zendesk AI Agents, eesel AI PII leakage & hallucinated refund policies
📱 Social Media
LinkedIn · X · IG · FB
Platform API + scheduling tool, or Zapier triggers Buffer, FeedHive, Grok (X), Zapier Strict rate limits + expensive APIs → runaway-loop cost risk

📅 Week-by-Week Syllabus

🎓
Each week now has a dedicated lesson page แต่ละสัปดาห์มีหน้าเรียนเฉพาะของตัวเอง 每周都有专属课页 Interactive walkthroughs, Python code with copy buttons, and a per-week visualization. Built on the same Ollama + Hermes 3 stack from the Mac/Windows extras series. Walkthrough แบบ interactive, โค้ด Python พร้อมปุ่ม copy และภาพประกอบของแต่ละสัปดาห์ ใช้ stack เดียวกับ Mac/Windows extras (Ollama + Hermes 3) 交互式逐步演示、可一键复制的 Python 代码、每周一张可视化图。基于 Mac/Windows 进阶系列的同一套 Ollama + Hermes 3 技术栈。
📋 Open plans index →
1

Foundations — OAuth, MCP, and the agent staircase

Foundations

สัปดาห์ที่ 1 · พื้นฐาน — เข้าใจก่อนเชื่อมต่อ

Concepts
  • OAuth flow & scopes
  • MCP architecture
  • Tool-calling vs RAG
  • The 4-step staircase
Lab
  • Connect Gmail to Claude via Connectors
  • Ask: "Summarize my unread emails"
  • Inspect granted scopes
English vocab
  • scope, consent, token
  • authorize, revoke, expire
  • "Grant read-only access"
🎓 Open Week 1 lesson →
2

📧 Email — your agent's first job

Connector

สัปดาห์ที่ 2 · อีเมล — งานแรกของ AI agent

Concepts
  • IMAP vs Gmail API
  • Labels & filters as agent inputs
  • Draft-then-confirm pattern (HITL)
Lab
  • Daily 8am email briefing in Claude Code (scheduled task)
  • Auto-draft replies to FAQs from your business inbox
  • Flag urgent messages from regulars
Chiang Mai use case
  • Hotel/homestay owner: auto-reply to room availability questions
  • Tutor: triage parent emails into "urgent / can wait / FYI"
Gotcha
  • Never grant mail.send in week 1 — start with drafts only
🎓 Open Week 2 lesson →
3

📅 Calendar — let the agent book for you

Connector

สัปดาห์ที่ 3 · ปฏิทิน — ให้ AI จัดประชุมให้

Concepts
  • Free/busy queries
  • Timezone (ICT vs UTC) hazards
  • Conflict detection
Lab
  • Email → calendar agent: read meeting requests, suggest 3 slots
  • Book the confirmed slot & send invite
Chiang Mai use case
  • Yoga studio booking agent — handle DST quirks for foreign students
  • Teacher: auto-block grading hours every Friday
Gotcha
  • Always ask the agent to confirm local time before booking
🎓 Open Week 3 lesson →
4

🤝 CRM — agent-driven sales hygiene

Connector

สัปดาห์ที่ 4 · CRM — ดูแลข้อมูลลูกค้าให้อัตโนมัติ

Concepts
  • Idempotency keys
  • Pipeline stages as state machine
  • Trimming MCP tool schemas (token tax)
Lab
  • HubSpot MCP: log meeting transcripts into the right contact
  • Qualify inbound leads & update pipeline stage
Chiang Mai use case
  • Co-working space: tag tourists vs long-stay nomads automatically
  • Tour operator: log every WhatsApp inquiry as a deal
Gotcha
  • 429 rate limits — batch writes & honor Retry-After
🎓 Open Week 4 lesson →
5

🎧 Customer Support — 70% ticket auto-resolve

Connector

สัปดาห์ที่ 5 · ฝ่ายดูแลลูกค้า — ตอบลูกค้าอัตโนมัติ 70%

Concepts
  • Confidence thresholds & auto-close
  • Adversarial reviewer agent
  • PII redaction
Lab
  • Wire help-docs RAG + tool-calling for account actions
  • Build a 3-agent setup: responder · closer · adversarial reviewer
Chiang Mai use case
  • Thai/English bilingual reply auto-detection
  • Refund or reschedule a guesthouse booking (HITL above 1,000 THB)
Gotcha
  • Hallucinated refund rules — ground every policy answer in retrieved docs
🎓 Open Week 5 lesson →
6

📱 Social Media + Capstone

Connector + Capstone

สัปดาห์ที่ 6 · โซเชียลมีเดีย + โครงงานรวบยอด

Concepts
  • API rate limits & cost ceilings
  • Scheduling vs posting
  • Sentiment monitoring loops
Lab
  • Buffer + Claude: weekly content plan from your blog RSS
  • Brand mention monitor → Slack ping
Capstone
  • Build one end-to-end flow: inbound DM → support agent → CRM update → calendar booking → confirmation email
  • Present to the class — what worked, what didn't
Gotcha
  • Always cap daily spend — runaway loops can burn $50+ in minutes
🎓 Open Week 6 lesson →

📝 Assessment & Outcomes

🇬🇧 How you'll be assessed

• Weekly labs (60%) — submit a screen recording of the agent running

• Capstone (30%) — one stitched flow across all five connectors

• Class share-back (10%) — at least one real-world gotcha you hit

🇹🇭 วิธีประเมินผล

• แล็บประจำสัปดาห์ (60%) — ส่งวิดีโอแสดง agent ทำงานจริง

• โครงงานรวบยอด (30%) — รวมระบบทั้งหมดเข้าด้วยกัน

• การมีส่วนร่วม (10%) — แบ่งปัน gotchas ที่เจอจริง

🇨🇳 评分方式

• 每周实战 (60%) — 提交代理运行的屏幕录像

• 总结项目 (30%) — 一条贯穿全部五个连接器的完整流程

• 课堂分享 (10%) — 至少一个你亲身踩过的坑

✅ By the end of this course, you will be able to:

Connect, scope, and safely operate AI agents across five live business systems — and explain to a non-technical colleague (in Thai or English) exactly what the agent can and cannot do.

เชื่อมต่อ กำหนดสิทธิ์ และดูแล AI agent ในระบบธุรกิจจริงทั้ง 5 ตัวได้อย่างปลอดภัย — และอธิบายให้เพื่อนร่วมงานที่ไม่ใช่สายเทคนิคเข้าใจ (เป็นภาษาไทยหรืออังกฤษ) ได้ว่า agent ทำอะไรได้และทำอะไรไม่ได้

能在五个真实业务系统中接入、限定权限、并安全地运行 AI 代理 — 还能用泰语或英语向不懂技术的同事说清楚:代理能做什么、不能做什么。

⚠️ Pre-requisites

You should have completed the Windows local-AI stack or Mac local-AI stack tutorial, or be comfortable using Claude/ChatGPT projects with basic prompts. No prior coding required — Python is helpful for week 4 onward.

ควรเรียนจบ Windows local-AI stack หรือ Mac local-AI stack มาก่อน หรือใช้ Claude/ChatGPT projects กับพรอมต์พื้นฐานได้คล่อง ไม่จำเป็นต้องเขียนโค้ดมาก่อน — Python จะช่วยตั้งแต่สัปดาห์ที่ 4 เป็นต้นไป

建议先完成 Windows 本地 AI 栈 或 Mac 本地 AI 栈教程,或者能熟练使用 Claude / ChatGPT projects 加基础提示词。不需要编程基础 — 从第 4 周起会用到一些 Python。