Auto-answer Telegram DMs from a Notion FAQ
Let an agent answer common Telegram questions in your voice from your Notion FAQ, and quietly queue the rest for you to reply to.
Build me an agent that auto-answers common questions in my Telegram DMs from my Notion FAQ database, replying as me through my connected secretary bot. Anything the FAQ cannot confidently answer should be queued for me to reply to instead.
Trigger: run on a cron every 10 minutes.
On each run:
1. Use telegram-secretary Receive Updates to pull new incoming updates. Only consider new business_message updates from managed private chats. Advance the offset so each message is processed once.
2. Skip any message whose chat id is on my per-chat opt-out list (private threads with friends and family). Also skip anything the agent has already answered in this run.
3. Decide whether the message is question-shaped: it ends in a question mark, uses question phrasing (how do I, can you, what is, do you, when, where, why, pricing, refund, hours, etc.), or is otherwise a clear ask. Small talk, thanks, reactions, and forwarded content should be ignored.
4. For each question, look for a matching FAQ entry in my Notion FAQ database. First try notion Query a Data Source with a text filter on the Question property; if that returns nothing useful, fall back to notion Search by Title scoped to that database. Pick the single best match and score how confident you are that it actually answers this question.
5. If the confidence is high, draft a short, friendly reply in my voice (two to four sentences, no corporate tone, no emoji unless the sender used one) that pulls the answer from the FAQ entry. Send it with telegram-secretary Send Message as User in the same chat, using the business_connection_id from the incoming update and quoting the original message with reply_parameters. Then call telegram-secretary Mark Messages as Read on that message so my unread count reflects reality.
6. If the confidence is low, do NOT send anything. Instead use notion Create a Page to append a new row to my 'needs my reply' Notion page (I will give you its id) with these properties: Sender name, Chat id, Received at (ISO timestamp), Message (the original text), Suggested draft (your best attempt at a reply), and Closest FAQ (the FAQ entry title you considered, if any).
Inputs I want to configure on the workflow:
- FAQ data source id in Notion (the database of questions and answers).
- 'Needs my reply' Notion page or database id.
- Opt-out list: an array of Telegram chat ids that must never be auto-answered.
- Confidence threshold (default: only auto-reply when the match is clearly correct).
- Reply voice guidelines (default: warm, concise, first person, no jargon).
Guardrails:
- Never send more than one auto-reply per chat per run, even if the sender fired off several questions in a row. If there are multiple, answer the most recent one and mark the rest as read.
- Never auto-reply if the message contains anything sensitive (legal threats, medical questions, payment disputes, refund escalations, complaints). Log those to 'needs my reply' instead.
- Never invent facts. If the FAQ does not explicitly cover something, treat it as low confidence and route to 'needs my reply'.
- Respect Telegram flood limits (do not blast; pace sends).
Additional information
What does this prompt do?
- Watches your Telegram DMs every 10 minutes and picks out the question-shaped messages worth answering.
- Looks each question up against a Notion FAQ database and, when there is a confident match, replies as you in a short, friendly voice.
- Marks the original message as read so your unread count stays honest.
- For anything without a confident match, adds a row to a Notion 'needs my reply' page with the sender, their message, and a suggested draft.
- Respects a per-chat opt-out list so private conversations with friends and family are never auto-answered.
What do I need to use this?
- A personal Telegram account with a secretary bot connected to the chats you want it to see.
- A Notion workspace with an FAQ database (each row has a question, an answer, and optional tags) and a 'needs my reply' page.
- A short list of chats you want the agent to skip, such as private threads with friends.
How can I customize it?
- Change how often it runs, for example every 5 minutes for a busy inbox or once an hour for quieter accounts.
- Tune the confidence bar so it only auto-replies to very clear matches, or is willing to answer looser paraphrases.
- Adjust the reply voice, from formal and business-like to casual and playful.
- Add or remove chats from the opt-out list at any time so personal conversations stay personal.
Frequently asked questions
Will the agent reply to my friends and family?
What if the FAQ does not have a good answer?
Can I review a reply before it goes out?
Do I need a paid Telegram account?
How does it know a message is a question?
Related templates
Stop typing the same Telegram answers over and over.
Connect Telegram and Notion once, and Geni handles the FAQ replies while flagging the rest for you.