Every small business that sells over chat has the same late-night problem: a customer in Surabaya asks "do you deliver on Sunday?" at 11 pm, nobody answers until morning, and by then they have ordered from someone else. A bakery, a tuition centre, a car-parts shop, a visa consultant: the questions repeat all day, and they are the same twenty questions. Price, hours, location, how to pay, is it in stock. An auto-reply workflow answers those instantly from your own FAQ, in your own tone, and only wakes a human when the message is actually worth a human.
You could buy a chatbot subscription with a drag-and-drop decision tree, but those break the moment a customer types something the tree did not expect, and they charge per contact forever. Describing the workflow to App Builder Agent gets you a TypeScript workflow that you own: a webhook receives the message, an AI step answers from your text, a hand-off rule pings you, and every exchange is logged. You can read the canvas, change one rule, and rerun it in a minute.
What an auto-reply workflow must handle
- A webhook trigger — Telegram or your WhatsApp Business API provider posts each incoming message to a URL; the workflow starts from that payload.
- Your FAQ as the only source — Hours, prices, delivery areas, payment methods and return policy in plain text; the AI answers from that and nothing else.
- Language matching — Reply in the language the customer wrote in; Bahasa, Hindi, Arabic and English mixed through one day is normal.
- Hand-off keywords — "agent", "human", "complaint", "refund", or an order above a threshold, should stop the bot and notify a person.
- Quiet hours and a first-message greeting — Tell customers when a human will be back, once per conversation, not on every message.
- Deduplication — Providers retry webhooks; the same message id must never get two replies.
- A log — Who asked what, what the bot said, whether it handed off; a Google Sheet or the workflow's own storage is enough.
- Sending the reply — An HTTP call back to the Telegram Bot API or the WhatsApp messages endpoint, using the chat id from the incoming payload.
Build it with App Builder Agent, step by step
- Get a bot and a token first. For Telegram, message BotFather, run /newbot and copy the token. For WhatsApp, you need a WhatsApp Business API account through Meta or an official Business Solution Provider; a personal WhatsApp number cannot receive webhooks. Keep the token, the phone number id and a verify token ready before you start.
- Describe the workflow. Create a workflow project and put the trigger, the FAQ, the hand-off rule and the log destination in one message.Build a Telegram auto-reply workflow for "Roti Hangat", a bakery in Bandung. Webhook trigger receives Telegram updates. For each text message, answer with the AI using only this FAQ: open 7 am to 9 pm daily, delivery within 5 km for Rp 10.000, minimum order Rp 50.000, payment by QRIS or cash on delivery, custom cakes need 2 days' notice and a 50% deposit. Reply in the customer's language (Indonesian or English), maximum three sentences, friendly. If the message contains "complain", "refund", "manager" or asks for a custom cake, reply that Ibu Sari will answer within 30 minutes and send me a Telegram message on chat id 123456789 with the customer's text. Ignore duplicate update ids. Log timestamp, chat id, question, answer and hand-off flag to a Google Sheet through its webhook URL. Keep the bot token in secrets.
- Register the webhook and test. The workflow gives you a public URL; call Telegram's setWebhook with it, then message your bot from your phone. Watch the run log on the canvas: you see the incoming payload, the AI answer and the send call. Ask three questions from the FAQ and one that is not in it, and see what happens to the fourth.
- Tighten the answers. The first version usually answers too much or apologises too often. Send follow-up changes in plain words.When the question is not covered by the FAQ, do not guess. Say "Let me check that for you, Ibu Sari will reply shortly", hand off, and stop replying in that chat for two hours. Also add a one-time greeting for any chat id we have not seen in 24 hours.
- Switch on quiet hours and go live. Add a rule for 9 pm to 7 am that appends "we reopen at 7 am" once per conversation, then leave the workflow running. It stays on our servers; you only come back to edit the FAQ text when prices change.
Prompts that work well
The same shape works for any business that answers the same questions all day:
Common mistakes (and the fix)
- Expecting WhatsApp to work with a normal number. It will not. Prototype on Telegram in an hour, then move to a WhatsApp Business API provider account when the logic is right; only the send step changes.
- Letting the AI answer anything. Without a strict "only from the FAQ" rule it will invent a delivery fee. Tell the agent the bot must hand off when unsure, and read the log weekly for invented answers.
- Replying twice to one message. Providers resend a webhook when your reply takes too long. Ask for the message id to be remembered and skipped if seen, and to answer first and log second.
- Pasting the token into the prompt. Tokens belong in the workflow's secrets, not the description. Rotating the token later is then a one-field change.
- Hand-off to nobody. If the hand-off goes to a chat nobody watches, customers wait forever. Route it to the phone that is actually on duty and include the customer's last three messages in the notification.
- No stop word. Once a human has taken over, the bot must stay quiet in that chat for a few hours; otherwise the two talk over each other.
Make it feel finished
- Give the bot a name and one line of personality in the prompt; "Roti Hangat's assistant" reads better than a bare answer.
- Answer in the customer's script: if they write Hindi in Latin letters, reply the same way.
- Send quick-reply buttons for the top three questions on Telegram; they cut typing on both sides.
- Add a weekly digest: the workflow counts questions by topic and posts the top five to you on Monday, so the FAQ improves.
- Keep the log readable: one row per message, with the chat id so you can find the conversation.
Installing, publishing and next steps
A workflow does not install anywhere; it runs on our servers from the moment you switch it on, and the webhook URL stays the same across edits. The AI workflow builder page covers the triggers and the visual canvas, and the ready-made messaging apps gallery is worth a look if you also want a customer-facing chat app of your own.
Two workflows pair naturally with this one: the email summary workflow reads the inbox the bot cannot see, and the daily report workflow turns the chat log into a morning message. If you would rather build the chat app itself, the AI chatbot app guide covers that. Open the builder and paste the bakery prompt with your own FAQ to start.
Frequently asked
Do I need coding to make a Telegram or WhatsApp auto-reply?
No. You describe the reply logic in plain English and the AI agent writes a TypeScript workflow you can see on a visual canvas. It runs on our servers, receives messages through a webhook and calls the AI for answers; you only paste your bot token.
Does this work with my personal WhatsApp number?
Not directly. WhatsApp only exposes messages to automations through the WhatsApp Business API, which you get from Meta or an official provider account. Telegram is free: create a bot with BotFather and paste the token into the workflow's secrets.
Where does the workflow run and do I need a server?
It runs on our servers. The webhook trigger gives you a public URL to register with Telegram or your WhatsApp provider, and the workflow wakes up for every message. There is nothing to host and no machine of yours that has to stay online.
Can the bot answer from my own information?
Yes. Paste your FAQ, opening hours, prices and policies into the workflow, and the AI step answers only from that text. You can tell it to say it does not know and hand over to a human instead of guessing, which is what most businesses want.
How much does it cost?
Sign in and the agent builds your first project free. Continuing to edit with the agent is part of the paid plans, which are one-time payments rather than subscriptions; the Pro, Business and Max plans include the AI allowance the workflow uses for replies.
Build it now — free to start
Type the idea, sign in, and the agent builds it in your browser. Change anything by describing it.
Open the builder ›