Lección 6 · Módulo 5: Omnichannel Integration: WhatsApp, Telegram and MCP
Project: an omnichannel assistant that books, invoices and updates the CRM
Why this matters
Clients reach a small business on WhatsApp and Telegram, while bookings, invoices and client notes sit in separate places and slowly fall behind. An assistant that answers both apps, books the slot, sends the invoice and updates the client record gives the owner those hours back, as long as it remembers each client through From the lesson: One brain, many channels: shared memory across WhatsApp, Telegram and webOne memory store that every channel reads and writes, so a client's history follows them between apps.Review that lesson and stays within clear limits.
Key ideas
- Two doors, one workflow. Messages from WhatsApp and Telegram are normalized, meaning reshaped into one format, so every later step handles them the same way. Example: a WhatsApp number and a Telegram ID that belong to one client both resolve to customer 42.
- The agent never touches the apps. It only receives what the workflow passes to it, and it reaches the calendar, invoices and CRM through an From the lesson: MCP explained: how one server gives agents tools on 50+ platformsa standard way for an AI agent to plug into outside apps and use their actions as toolsReview that lesson server. Adding a third channel therefore changes the workflow, not the agent.
- Memory follows the customer. Notes are filed under the customer ID, not the app, so a chat started on WhatsApp is still known on Telegram. Only a short summary, the booking and the CRM stage are kept, not every message.
- A person guards big money. The agent drafts every invoice, but anything over 300 dollars waits for a From the lesson: Human in the loop: approvals, limits and logs for safe autonomyA person checks and approves risky actions before the agent completes them, with limits and logs kept.Review that lesson, here the owner. The workflow uses a a workflow step that sends a message, then pauses until someone replies to show her Approve and Reject buttons. Example: a 120-dollar invoice goes out at once, while a 340-dollar one waits.
Try it before you watch
A draft invoice is for 450 dollars and the limit is 300. Does it go straight to the client, and who decides?
Show answerHide answer
No. It waits for the owner, because the workflow pauses and asks her to approve or reject it before anything is sent. This shows the limit is enforced by the workflow itself, not left to the agent's judgement.
Words to know
- CRM: customer relationship management software, a shared address book with each client's notes, status and history.
- Webhook: a web address that another service calls by itself when something happens, such as a new message arriving.
- Normalize: reshape data from different sources into the same fields, so one set of steps can handle all of them.
- Idempotency key: a unique label for one action, so if the same action arrives twice, the workflow recognizes it and skips the repeat.
What to watch for
- Both apps into one entry. Notice that WhatsApp and Telegram share one path, and that the customer lookup runs before the agent does.
- Where the money rule lives. Find the 300-dollar limit in the agent's instructions and again as a pause in the workflow.
- The duplicate test. See which steps stop a second booking, and check that the calendar is searched again just before booking.
Apréndelo con tu tutor en la pizarra en vivo
Puntos clave del video
Lena's busy evening
- A one-person photo studio and one tired owner
- Clients message on WhatsApp and Telegram
- Bookings, invoices and the CRM fall behind
- Today: one assistant that handles all three
layout: side
parts:
lena: {chip: Lena, sub: "Photo studio", icon: camera}
bride: {chat: "Can I book Friday?"}
steps:
- at: "Meet Lena"
highlight: lena
- at: "photography studio"
note: "one person, one studio"
- at: "out shooting"
spokes: {of: lena, items: [Shooting, Phone full]}
- at: "A bride on WhatsApp"
send: bride
- at: "A company on Telegram"
spokes: {of: lena, items: [Telegram, Invoice]}
- at: "Her calendar is out of date"
note: "the calendar is out of date"
- at: "bookings, invoices and CRM"
spokes: {of: lena, items: [Bookings, CRM]}
- at: "isn't paid for"
note: "unpaid hours"
- at: "build her one assistant"
highlight: lena
note: "one assistant"
- at: "brings together everything"
note: "everything from this module" What you will build
- Wire WhatsApp and Telegram into one agent workflow
- Give the agent booking, invoicing and CRM tools through MCP
- Add shared memory and safety checks before money moves
layout: side
parts:
agent: {chip: Agent, sub: "One AI agent", icon: bot}
steps:
- at: "three things working together"
highlight: agent
- at: "both messaging apps feed"
spokes: {of: agent, items: [One workflow]}
- at: "an MCP server"
note: "one MCP server"
- at: "standard plug"
note: "MCP: a standard plug"
- at: "booking, invoicing"
spokes: {of: agent, items: [Booking, Invoicing, CRM]}
- at: "client address book"
note: "CRM: client address book"
- at: "shared memory and safety"
spokes: {of: agent, items: [Shared memory, Safety checks]}
- at: "money-related messages"
highlight: agent
note: "no blind money messages" The whole system on one page
- Two channels in, one workflow, one agent
- Memory keeps each client's story
- MCP server reaches calendar, invoices and CRM
layout: wide
direction: LR
components:
cust: {kind: user, label: Client}
wa: {kind: mobile, label: WhatsApp}
tg: {kind: mobile, label: Telegram}
flow: {kind: worker, label: n8n workflow}
agent: {kind: llm, label: AI agent}
mem: {kind: database, label: Memory}
mcp: {kind: gateway, label: MCP server}
cal: {kind: external, label: Calendar}
inv: {kind: external, label: Invoicing}
crm: {kind: database, label: CRM}
links: [cust->wa, cust->tg, wa->flow, tg->flow, flow->agent, agent->mem, agent->mcp, mcp->cal, mcp->inv, mcp->crm]
steps:
- at: "two front doors"
show: [cust, wa, tg]
- at: "one n8n workflow"
show: all
- at: "a message arrives"
flow: ["cust>wa: Book Friday?", "wa>flow", "flow>agent"]
- at: "reads the memory"
flow: ["agent>mem: who is this?", "mem>agent: Sara, 2 shoots"]
- at: "through the MCP server"
flow: ["agent>mcp", "mcp>cal: free slot", "cal>mcp", "mcp>crm: status", "mcp>agent", "agent>flow", "flow>wa", "wa>cust: Booked"]
- at: "Notice the agent never talks"
show: all
highlight: [agent, wa]
note: "the agent never talks to WhatsApp"
- at: "adding a third channel"
show: all
highlight: [flow]
note: "a third channel plugs in here" Step 1: one entry workflow
- WhatsApp webhook and Telegram trigger, side by side
- Normalize: same fields from both apps
- Look up one customer ID per person; unknown sender = new lead
layout: side
parts:
entry: {chip: "Customer message", sub: "WhatsApp or Telegram"}
steps:
- at: "Start with the entry"
highlight: entry
- at: "WhatsApp webhook"
spokes: {of: entry, items: [WhatsApp webhook]}
- at: "doorbell address"
note: "a webhook is a doorbell"
- at: "Telegram trigger"
spokes: {of: entry, items: [Telegram trigger]}
- at: "normalizes the message"
spokes: {of: entry, items: [Normalize message]}
- at: "look up the customer ID"
spokes: {of: entry, items: [Find customer ID]}
- at: "one client record"
note: "one person, one customer ID"
- at: "every later step trusts these fields"
note: "every field matters"
- at: "create a new lead"
note: "unknown sender = new lead"
- at: "the AI agent"
spokes: {of: entry, items: [AI agent]} Step 2: the agent's instructions
You are Lena Studio's booking assistant.
Tools: check_slots, book_slot, send_invoice,
update_crm, get_prices.
Always confirm date, time and package before booking.
Never invent prices; use the get_prices tool.
Invoices over 300 dollars need the owner's approval.
Reply in the client's language, under 60 words. Step 3: tools through MCP
- One MCP server, many apps behind it
- Calendar: check and book slots
- Invoicing: create and send invoices
- CRM: update stage and notes
layout: side
parts:
agent: {chip: "AI agent", sub: "one agent, many tools"}
steps:
- at: "In lesson five"
highlight: agent
- at: "dozens of platforms"
note: "many apps, one server"
- at: "many apps behind it"
note: "same idea, real tools"
- at: "an MCP server that has"
spokes: {of: agent, items: [MCP server]}
- at: "Google Calendar"
spokes: {of: agent, items: [Calendar]}
- at: "Stripe or Zoho"
spokes: {of: agent, items: [Invoicing]}
- at: "HubSpot"
spokes: {of: agent, items: [CRM]}
- at: "discovers the tools"
note: "the agent finds each tool itself"
- at: "permissions it needs"
note: "only the rights each tool needs"
- at: "shouldn't delete events"
note: "calendar: book, never delete"
- at: "wipe your client list"
note: "no wiping the client list" Worked example: Sara books and pays
Message 1 - morning, WhatsApp
"Can I book a shoot on Friday?"
Customer: Sara (found by phone number)
Memory: 2 earlier shoots, nothing open
check_slots: 10:00 taken, 14:00 free
Sara says "yes" -> book_slot Fri 14:00
CRM stage: Booked
Message 2 - evening, Telegram
"Can you send my invoice?"
Customer: Sara (found by Telegram ID)
Memory: booked Fri 14:00
send_invoice: 150 dollars, under 300
CRM stage: Invoiced
Message 2 arrives again
Same action key -> ignored Shared memory, seen from the client's side
- Same client, two apps, one conversation
- Memory keyed by customer ID, not by app
- Stores a summary, the booking and the CRM stage
layout: side
parts:
mem: {chip: "Shared memory", sub: "one notebook for Sara"}
steps:
- at: "Sara's side"
highlight: mem
- at: "chatting on WhatsApp"
spokes: {of: mem, items: [WhatsApp]}
- at: "switches to Telegram"
spokes: {of: mem, items: [Telegram]}
- at: "one conversation with Lena"
note: "one client, one conversation"
- at: "keyed by her customer ID"
note: "keyed by customer ID, not app"
- at: "a short summary"
spokes: {of: mem, items: [Summary, Booking, CRM stage]}
- at: "every single word"
note: "a summary, not every word"
- at: "keyed by phone number"
note: "phone number: a stranger"
- at: "arrive as a stranger"
note: "she explains everything again" Step 4: safety before money
- Small invoices go out automatically
- Big invoices wait for Lena's approval on Telegram
- Booking needs an explicit "yes" from the client
- Every action is logged with time and channel
layout: side
parts:
draft: {chip: "Invoice drafted", sub: "by the agent"}
steps:
- at: "An assistant that touches money"
highlight: draft
- at: "a human in the loop"
note: "a person decides the risky cases"
- at: "drafts every invoice"
spokes: {of: draft, items: ["Over 300 dollars"]}
- at: "sent straight to the client"
spokes: {of: draft, items: ["Send to client"]}
- at: "goes to Lena first"
spokes: {of: draft, items: ["Owner approves"]}
- at: "send-and-wait option"
note: "Approve or Reject buttons"
- at: "Bookings get a similar check"
note: "client must say yes"
- at: "log every action"
note: "time, channel and tool"
- at: "that log is your evidence"
note: "the log is your evidence" Common mistake: acting twice
- Same booking made twice when a message is retried
- Duplicate contacts in the CRM
- Fix: check right before acting, search before creating
- Use an idempotency key per action
layout: side
parts:
msg: {chip: "Same message", sub: "arrives twice"}
steps:
- at: "the trap that bites"
highlight: msg
- at: "delivers the same message twice"
note: "same message, twice"
- at: "make the agent retry"
note: "a slow call also retries"
- at: "ends up booked into two slots"
spokes: {of: msg, items: [Same booking]}
- at: "fills with duplicate contacts"
spokes: {of: msg, items: [Duplicate contacts]}
- at: "three parts"
note: "three fixes"
- at: "Check the calendar again"
note: "check again before booking"
- at: "Search the CRM"
note: "search before creating"
- at: "idempotency key"
note: "one ticket per action"
- at: "unique ticket number"
note: "like a receipt number"
- at: "the second one is simply ignored"
highlight: msg
note: "second copy ignored" Recap
- One workflow and one agent serve every channel
- MCP gives the agent booking, invoicing and CRM tools
- Shared memory plus approvals make it safe to sell
layout: side
parts:
core: {chip: "One assistant", sub: "every channel, one agent"}
steps:
- at: "Let's wrap up"
highlight: core
- at: "enters one workflow"
spokes: {of: core, items: [One workflow]}
- at: "the MCP server gives"
spokes: {of: core, items: [MCP tools]}
- at: "checking and booking slots"
spokes: {of: core, items: [Booking, Invoices, CRM]}
- at: "Third, shared memory keyed by customer"
spokes: {of: core, items: [Shared memory]}
- at: "approval steps for big invoices"
note: "approvals for big invoices"
- at: "protection against double actions"
note: "no double actions"
- at: "Lena now gets her evenings back"
highlight: core
note: "evenings back"
- at: "answers in minutes"
note: "answers in minutes, not mornings" Your exercise
- Build the assistant with a WhatsApp test number and a Telegram bot
- Run three test chats: book, invoice, switch channel
- Send a duplicate message and confirm only one booking
- Write down one thing that broke and how you fixed it
layout: side
parts:
build: {chip: "Your build", sub: "test it before clients do"}
steps:
- at: "Now it's your turn"
highlight: build
- at: "a small business you know"
note: "your own business or Lena's"
- at: "WhatsApp test number"
spokes: {of: build, items: [WhatsApp test]}
- at: "your Telegram bot"
spokes: {of: build, items: [Telegram bot]}
- at: "Run three test conversations"
spokes: {of: build, items: [Three chats]}
- at: "starts on WhatsApp"
note: "switch channel mid-chat"
- at: "send the same message twice"
spokes: {of: build, items: [Duplicate test]}
- at: "only one booking appears"
note: "one booking only"
- at: "write down one thing"
spokes: {of: build, items: [Write it down]}
- at: "demo story"
note: "your first demo story" Transcripción
Lena's busy evening. Meet Lena. She runs a small photography studio on her own. During the day she's out shooting, and by evening her phone is full. A bride on WhatsApp wants a Friday slot. A company on Telegram asks for last month's invoice. Her calendar is out of date, and her bookings, invoices and CRM notes fall behind. Every hour she spends answering messages is an hour she isn't paid for. In this project lesson, we'll build her one assistant that handles all three: it answers on both apps, books the shoot, sends the invoice and updates her client records. It brings together everything from this module.
What you will build. By the end of this lesson you'll have three things working together. First, both messaging apps feed one agent workflow, so there's a single place to fix and improve. Second, the agent gets real tools through an MCP server. MCP, the Model Context Protocol, is a standard plug that lets an agent use outside apps, the way a USB port fits many devices. Here the tools are booking, invoicing and updating the CRM. A CRM, or customer relationship management tool, is just your client address book with notes and a status for each person. Third, the agent gets a shared memory and safety checks, so it never sends money-related messages blindly.
The whole system on one page. Here's the full picture before we build it. Lena's clients reach her through two front doors, WhatsApp and Telegram. Both doors lead into one n8n workflow, which hands every message to a single AI agent. Watch what happens when a message arrives from Sara asking for Friday. The agent first reads the memory, which keeps each client's story, to learn who Sara is and what she's booked before. Then it acts through the MCP server: it finds a free slot in the calendar, updates Sara's status in the CRM, and the reply travels back the same way it came. Notice the agent never talks to WhatsApp directly. That's what makes adding a third channel easy later.
Step 1: one entry workflow. Start with the entry. In n8n, add the WhatsApp webhook you set up in lesson two. A webhook is like a doorbell address: Meta rings it every time a message comes in. Next to it, add the Telegram trigger from lesson three. Both feed a step that normalizes the message, meaning it turns two different formats into the same few fields: channel, sender, text and any attachment. Then look up the customer ID. Sara's phone number and her Telegram ID both point to one client record. Take your time here, because every later step trusts these fields. If the lookup finds nobody, create a new lead instead of guessing, and only then hand the message to the AI agent.
Step 2: the agent's instructions. Now the agent itself. In n8n, the AI Agent node needs a system prompt, which is the standing job description it reads before every message. Keep it short and specific, like this one. It names the five tools the agent may use. It forces a confirmation before booking, so a vague "maybe Friday" never becomes a real appointment. It forbids invented prices and points to the price tool, because a model will happily make up a number if you let it. And it sets a money limit that needs Lena's approval. Write yours for your own client's business. A plumber, a tutor or a beauty salon would only change the tools and the price list.
Step 3: tools through MCP. In lesson five you saw how one MCP server can expose tools from dozens of platforms. Here we use exactly that, one server with many apps behind it. Connect the agent to an MCP server that has Google Calendar to check and book slots, an invoicing app such as Stripe or Zoho Invoice to create and send invoices, and a CRM such as HubSpot to update each client's stage and notes. The nice part is that the agent discovers the tools and their inputs on its own, so you don't build a separate HTTP node for each action. Give each tool only the permissions it needs. The calendar may book slots but shouldn't delete events, and the CRM shouldn't wipe your client list.
Worked example: Sara books and pays. Here's the whole flow traced step by step, with no code. Message one arrives in the morning on WhatsApp: Sara asks to book a shoot on Friday. The workflow finds her customer record from her phone number, and the memory shows two earlier shoots and nothing open. The agent checks the slots: ten o'clock is taken, two in the afternoon is free. Sara answers yes, so the agent books it and the CRM stage moves to booked. Message two arrives in the evening on Telegram, asking for her invoice. Her Telegram ID points to the same customer, so the memory already knows about the Friday booking. The invoice is a hundred and fifty dollars, under the limit, so it goes out without approval, and the CRM moves to invoiced. Finally, Telegram delivers that second message again. It carries the same action key, so it's simply ignored, and we'll see why in a moment. In your real build, the agent and MCP tools do these steps, but the shape is identical.
Shared memory, seen from the client's side. Let's look at it from Sara's side. In the morning she's on the sofa, chatting on WhatsApp about her shoot. In the evening she's at her desk and switches to Telegram, because that's what she has open. To her, it's the same client, two apps and one conversation with Lena's studio. What makes that possible is the notebook in the middle: the shared memory, keyed by her customer ID and not by the app. It stores a short summary, her booking and her CRM stage, rather than every single word. So what would happen if memory were keyed by phone number instead? The Telegram message would arrive as a stranger, and she'd have to explain everything again.
Step 4: safety before money. An assistant that touches money needs a human in the loop for the risky cases. Here's the rule. The agent drafts every invoice, but only small ones are sent straight to the client. Anything over three hundred dollars goes to Lena first: the Telegram node's send-and-wait option sends her Approve and Reject buttons and pauses the run until she taps one. Bookings get a similar check: the client must answer a clear yes to the date, time and package. Finally, log every action with the time, the channel and the tool used. When a client disputes a charge months later, that log is your evidence.
Common mistake: acting twice. Here's the trap that bites almost every first build. WhatsApp sometimes delivers the same message twice, and a slow tool call can make the agent retry. Without protection, Sara ends up booked into two slots, and the CRM fills with duplicate contacts. The fix has three parts. Check the calendar again right before booking, not just at the start of the chat. Search the CRM before creating a contact. And attach an idempotency key to each action. That's a unique ticket number, like a receipt number, so if the same action arrives twice, the second one is simply ignored.
Recap. Let's wrap up. First, every channel enters one workflow and talks to one agent, so you fix things once and add new channels cheaply. Second, the MCP server gives that agent its real abilities: checking and booking slots, sending invoices and moving clients through the CRM. Third, shared memory keyed by customer, approval steps for big invoices, and protection against double actions are what turn a demo into something you can confidently sell to a real business. Lena now gets her evenings back, and her clients get answers in minutes instead of the next morning.
Your exercise. Now it's your turn. Build this assistant for a small business you know, or use Lena's studio. Use the WhatsApp test number from lesson one, the webhook from lesson two and your Telegram bot from lesson three. Run three test conversations: one that books a slot, one that asks for an invoice, and one that starts on WhatsApp and continues on Telegram. Then send the same message twice on purpose and check that only one booking appears in the calendar. Finally, write down one thing that broke and how you fixed it. That note is the start of the demo story you'll tell your first paying client.
Explora las animaciones
Las animaciones del video, exactas y en vivo: reprodúcelas, pausa, arrastra el control deslizante o salta a un paso a tu propio ritmo.
Loading the animation...
Loading the animation...
Loading the animation...
Loading the animation...
Loading the animation...
Loading the animation...
Loading the animation...
Loading the animation...
Loading the animation...
Loading the animation...
Responde todas las preguntas y luego comprueba. Apruebas con 70%; puedes intentarlo las veces que quieras.
Resumen de la lección
- Lectura
- Video visto
- Cuestionario aprobado (70%)
- One workflow and one agent serve every channel
- MCP gives the agent booking, invoicing and CRM tools
- Shared memory plus approvals make it safe to sell