Course resource

Messaging Bot Setup

Putting an AI assistant on WhatsApp, Telegram or similar — and the compliance rules that decide whether you can.

Read this before building

Messaging platforms are far more regulated than email. Getting this wrong gets your number banned, not just ignored.

WhatsApp Business: message templates must be pre-approved, businesses generally cannot initiate outside a service window after a user message, opt-in is required and must be demonstrable, and there are per-conversation charges. The rules change; check the current Business Policy before you build.

Telegram: far fewer restrictions, no approval process, free. This is why it is the right place to learn.

Build on Telegram first. Get the logic right where mistakes are cheap, then port to WhatsApp once you know what you are building.

The shape

Incoming message
  -> is this a known user? (context lookup)
  -> AI: what are they asking?
  -> answer from the knowledge base, or route to a human
  -> log

The knowledge base

The bot knows only what you give it. See the Knowledge File Optimizer — one topic per file, summary at the top, no contradictions, dates in the content.

For a customer-facing bot the minimum is: what you sell, prices, hours, location, delivery, returns, and the five questions you answer most.

The instructions

# ROLE
You answer questions for [BUSINESS] on [PLATFORM].

# STYLE
- Short. This is a phone screen, not an email.
- 2-3 sentences per reply unless asked for detail.
- Plain, warm, not corporate.
- One question at a time.

# RULES
- Answer ONLY from the knowledge files.
- If they are not covered, say: "Let me get a colleague to help with that"
  and trigger a handoff.
- Never quote a price, date or availability not in the files.
- Never promise a refund, discount or delivery date.
- Never ask for card details, passwords or ID numbers.
- If someone seems upset, hand off to a human immediately.
- If asked whether you are a bot, say yes.

# HANDOFF
Trigger a handoff when: they ask for a human, they are upset, the question
is outside the files, or they mention a complaint, legal issue or refund.

The escape hatch

Every bot needs an obvious route to a human. This is the single thing that decides whether customers tolerate it.

Nothing damages a brand faster than a bot that will not let you out.

The first message

Hi — I'm [BUSINESS]'s automated assistant. I can help with [THREE THINGS].
For anything else, type HUMAN and someone will pick this up.
[Hours if relevant]

Say it is automated. People work out within two messages anyway, and pretending otherwise loses trust you cannot recover.

Compliance checklist

Testing

Cost

Per-conversation charges plus AI cost per message. Both scale with success.

Expected conversations/month
Platform cost per conversation
AI messages per conversation
AI cost per conversation
Monthly total
At 5x volume

After launch

Reviewed Handoff rate Top handoff reason Files updated
Back to dashboard