Skip to content
MotherBot
Core Features

Chatbots

Build automated conversation flows that respond 24/7 — handle FAQs, collect leads, qualify prospects, and route to agents.

How Chatbots Work

A chatbot is a visual flow: when a contact sends a message matching a trigger, MotherBot runs the connected node sequence automatically — no agent required.
  • Pick a channel when you build the bot — WhatsApp, Messenger, Instagram, Telegram, LINE, Viber, website chat, SMS, RCS or email.
  • The builder locks anything the chosen channel can't send: templates, WhatsApp Flows, catalogues and in-chat payments are WhatsApp-only.
  • Reply buttons and lists work everywhere. On WhatsApp and Telegram they're real tappable buttons; on the other channels they're sent as a numbered list, and the contact replies with the number or the option's text.
  • A Telegram bot also gets Telegram's own message kinds, listed under "Telegram only" in the message picker: inline keyboards, polls and quizzes, albums, stickers, GIFs, video notes, contact cards, venues, live locations and dice.
  • Multiple chatbots can be active simultaneously on the same number.
  • The highest-priority matching chatbot wins when triggers overlap.
  • Variables let you store data collected during the conversation and reuse it in later nodes.
  • Contact fields (name, phone, email, and custom fields) are available automatically — no setup needed.
  • Hand off to a human agent at any point in the flow.

Creating a Chatbot

1

Open Chatbots → New Chatbot

Click New Chatbot, give it a name and optional description. A name like "Lead Capture — EN" helps manage multiple bots.
2

Choose the channel

On the Start node, pick the channel this bot answers on. It has to be connected before the bot can go live, and it decides which nodes and message types the builder offers.
3

Set a trigger

Choose when the chatbot activates:
TriggerWhen it fires
Keyword MatchContact's message contains a specific word or phrase (e.g. "pricing", "hi").
Exact MatchContact's message exactly equals the keyword (case-insensitive).
Any MessageFires on every incoming message — use with high priority or specific conditions.
Session StartFirst time a contact ever messages your number (great for welcome messages).
Regex PatternAdvanced: fires when the message matches a regular expression.
4

Build the node sequence

Add nodes from the sidebar and connect them. Each node executes in order when the flow reaches it.

Available Node Types

NodeDescription
Send MessageSend a free-text or rich-media reply within the 24h session window.
Send TemplateSend a Meta-approved template — works outside the 24h window. WhatsApp only.
Ask QuestionSend a prompt and wait for the contact's reply, saving it to a variable.
Condition / IfBranch the flow based on variable values, contact fields, or custom field values.
Set VariableStore a static value or formula result into a named variable.
HTTP RequestCall an external API and map response fields to variables.
Add / Remove TagTag or untag the contact for segmentation.
Update ContactWrite a collected value back to a contact field or custom field.
Assign to AgentTransfer the conversation to the next available agent.
End ConversationClose the chatbot session (contact can re-trigger by messaging again).
DelayWait N seconds before the next node executes.
AI ReplyGenerate a response using your configured AI provider (OpenAI, Gemini, etc.).

Variables Reference

Variables use double-brace syntax in any message, question, or condition text. Contact fields are pre-populated automatically at the start of every chatbot session — you don't need an "Ask Question" node to access them.
── Contact fields (always available) ───────────────────
  {{contact_name}}      Contact's display name
  {{contact_first_name}} First name
  {{contact_last_name}} Last name
  {{contact_phone}}     WhatsApp id — digits only, no "+" (e.g. 12125551234)
  {{contact_email}}     Email address (empty string if not set)
  {{contact_city}}      City
  {{contact_country}}   Country
  {{contact_language}}  Language code (e.g. en, hi)
  {{contact_notes}}     Internal notes
  {{contact_tags}}      Comma-separated tags (e.g. "vip, lead")

── Contact context (read-only) ─────────────────────────
  {{contact_opted_in}}  "yes" or "no"
  {{contact_blocked}}   "yes" or "no"
  {{contact_source}}    How they arrived (organic, import, campaign, api…)
  {{contact_channel}}   whatsapp | messenger | instagram
  {{contact_created_at}}        Date added (YYYY-MM-DD)
  {{contact_last_message_at}}   Last message date (YYYY-MM-DD)
  {{contact_messages_sent}}     Count of messages sent to them
  {{contact_messages_received}} Count of messages they sent

── Custom fields (cf1–cf10, if defined in Contacts → Custom Fields) ──
  {{cf1}}               Value of your first custom field (e.g. Company Name)
  {{cf2}}               Value of your second custom field (e.g. Invoice Number)
  ... up to {{cf10}}

── Session variables (set during this conversation) ───
  {{order_id}}          Set via "Set Variable" or "Ask Question" node
  {{city}}              Captured via "Ask Question"
  {{api_price}}         Extracted from an HTTP Request response

── System variables ────────────────────────────────────
  {{org_id}}            Your organization ID (useful in HTTP Request URLs)

Tip

Custom field values reflect what's stored on the contact at the time the chatbot session starts. If you update a custom field mid-session via "Update Contact", the variable updates immediately and subsequent nodes see the new value.

Collecting and Saving Data

1

Ask Question node

Send a prompt and store the contact's next reply in a variable name you choose. Set the input type (free text, number, email, phone, date) — invalid replies trigger a retry message.
2

Writing back to contact fields

After collecting a value, add an Update Contact node to persist it — for example, saving a collected company name to cf1 so it's available in future sessions and campaigns.
3

HTTP Request → variable mapping

After calling an external API, map JSON response paths to variables:
Response: { "order": { "status": "shipped", "eta": "June 20" } }

Map:
  order.status  →  {{order_status}}
  order.eta     →  {{delivery_date}}
Then use {{order_status}} in a Send Message node: "Your order is {{order_status}}, arriving {{delivery_date}}."

Sending a template from a flow

A Send Templatenode can personalise every part of an approved template, not just its body — and each part is a separate slot, because WhatsApp counts each one's variables independently.

  • Body variables — one field per {{n}} in the template's body.
  • Header variables — a text header's own {{1}}, {{2}} … numbered separately from the body's.
  • Header image, video or document — a link that can itself be a variable, so each contact receives their own invoice, ticket or product shot rather than one shared banner.
  • Link button values — appended to a dynamic URL button, so each person's button opens their own page.
  • Coupon codes, catalogue buttons and carousel cards are filled in automatically from the approved template.

Tip

Header media links must be public. WhatsApp downloads the file from that URL itself, so a variable in the header link has to resolve to a direct https:// file link — not a Drive or Dropbox sharing page. If it resolves to nothing and your template was approved with a sample image, that sample is used; if it wasn't, the send is stopped and you get a chatbot error alert naming the node, rather than a rejection from WhatsApp that names neither.

Tip

The payload is rebuilt from the template as WhatsApp has approved it today, every time the node runs. Edit a template to add or remove a variable and your existing flows keep sending correctly — you don't have to reopen and re-save every node that uses it.

Priority and Conflict Resolution

If two chatbots have overlapping triggers, the one with the lower priority number wins. Set priority in the chatbot settings panel. Recommended ordering:
  • Priority 1 — Opt-out / STOP handler (always highest priority)
  • Priority 2 — Session start / Welcome bot
  • Priority 3–9 — Feature-specific bots (pricing, support, order lookup, etc.)
  • Priority 10+ — Catch-all / fallback bot

Testing Your Chatbot

  • Set the chatbot Status to Active, then message the bot's channel yourself — your WhatsApp number, the Telegram bot, the website widget, whichever it runs on.
  • Check the Conversations log to see which nodes fired and what variables were set.
  • Use a test tag to limit the chatbot to specific contacts while testing: add a Condition node at the start that checks if contact_name equals your name.
  • Disable the chatbot while editing to prevent partial flows from reaching real users.
  • Check Session Variables in the contact's chatbot state to debug what values were captured.

Tip

Build your flow top-down: Start node → welcome message → first question → condition → branch A / branch B. Add the End Conversation node to every branch so sessions close cleanly.