Get Started
Screenshot of n8n workflow
FREE TEMPLATE
Automate Telegram AI Support with Memory
3
Views
0
Downloads
18
Nodes
Download Template
Free
Preview Template
Utility Rating
7 / 10
Business Function
Other
Automation Orchestrator
n8n
Integrations
Wikipedia
Telegram
OpenAI
Google Gemini
Airtable
Trigger Type
On app event
Approx setup time ≈ 65 min
Need help setting up this template?
Ask in our free Futurise community
About
Community
Courses
Events
Members
Templates

How to Automate Telegram AI Support with Memory?

Leon Petrou
FREE TEMPLATE
Automate Telegram AI Support with Memory
3
Views
0
Downloads
18
Nodes
Download Template
Free
Preview Template
Utility Rating
7 / 10
Business Function
Other
Automation Orchestrator
n8n
Integrations
Wikipedia
Telegram
OpenAI
Google Gemini
Airtable
Trigger Type
On app event
Approximate setup time ≈ 65 minutes
Need help setting up this template?
Ask in our free Futurise community

Description

Chat with users on Telegram using AI in real time. Users can type or send a voice note. Key details are saved in Airtable so replies get smarter over time.

When a message arrives, Telegram collects the update. Text goes straight into a text field, and voice notes go to OpenAI for transcription. Past notes are pulled from Airtable and combined with the new input. An AI Agent powered by an OpenAI chat model writes the answer. The agent can use a calculator for quick math and Wikipedia for quick facts. It can also save a short 140 character memory back into Airtable for future context. The reply is sent back to Telegram right away.

You need a Telegram bot, an OpenAI API key, and an Airtable base with a Memory table. The setup uses the Telegram chat id to keep separate memory per user, which helps with many concurrent chats. Expect faster replies, less manual typing, and clean records of user needs. Good for student help, internal knowledge help, or pre sales Q and A on Telegram.

Copy link

Tools Required

Wikipedia
Sign up
Free: $0 (public Wikimedia APIs). Enterprise Free: $0 with 5,000 on‑demand requests / mo and twice‑monthly snapshots
Telegram
Sign up
Free: $0, Telegram Bot API usage is free for developers
OpenAI
Sign up
Pay-as-you-go: GPT-5 at $1.25 per 1M input tokens and $10 per 1M output tokens
n8n
Sign up
$24 / mo or $20 / mo billed annually to use n8n in the cloud. However, the local or self-hosted n8n Community Edition is free.
Google Gemini
Sign up
Free tier: $0 via Gemini API; e.g., Gemini 2.5 Flash-Lite free limits 1,000 requests/day (15 RPM, 250k TPM). Paid from $0.10/1M input tokens and $0.40/1M output tokens.
Airtable
Sign up
Free (1,000 API calls / mo)

What this workflow does?

  • Telegram trigger captures text and voice updates from users
  • OpenAI audio transcription converts voice notes into clean text
  • Switch logic routes text and voice paths for proper handling
  • Merge combines user input, transcript and Airtable memory into one context
  • Airtable search and aggregate provide past notes for better answers
  • AI Agent uses an OpenAI chat model and short term memory per chat id
  • Built in tools let the agent use a calculator and Wikipedia when needed
  • Airtable tool writes a 140 character memory after each chat
  • Telegram sender posts the AI reply back to the user in the same chat
  • A Google Gemini model node is available for future use if needed

What are the benefits?

  • Reduce response time per question from 5 minutes to under 30 seconds
  • Automate up to 80% of repeated Q and A tasks
  • Handle 10 times more chats with the same team size
  • Connect Telegram, OpenAI and Airtable in one flow
  • Improve answer accuracy over time with saved context

How to set this up?

  1. Import the template into n8n: Create a new workflow in n8n, click the three dots menu, select 'Import from File', then choose the downloaded JSON file
  2. You'll need accounts with Telegram, OpenAI, Airtable, Wikipedia and Google Gemini. See the Tools Required section above for links to create accounts with these services.
  3. Create a Telegram bot with BotFather and copy the bot token. In the n8n credentials manager, create a Telegram credential and paste the token. Assign this credential to both the Telegram Trigger and Telegram send nodes.
  4. In your OpenAI account, create an API key. In n8n, create an OpenAI credential and paste the key. Attach it to the OpenAI audio transcribe node and the OpenAI Chat Model node.
  5. In Airtable, make a base and a table named Memory with a single line text field named Memory. Create a Personal Access Token with read and write access. In n8n, create an Airtable Personal Access Token credential and link it to the Airtable search node and the Airtable tool node.
  6. Open the Airtable nodes and select the base and the Memory table from the dropdowns. Keep the limit near 50 to load recent notes.
  7. Check the AI Agent node. Confirm it is connected to the OpenAI Chat Model, Simple Memory, calculator tool, Wikipedia tool, and the Airtable memory tool.
  8. In the Simple Memory node, keep the custom session key set to the Telegram chat id expression so each user has a separate conversation state.
  9. If you do not have the content creation and email sub workflows, disable or remove those tool workflow nodes to avoid tool not found errors.
  10. Optional: If you plan to use Google Gemini, get an API key in Google AI Studio. In n8n, create Google Gemini credentials and then connect the Gemini node to the AI Agent as an alternative model.
  11. Save the workflow and confirm that all credential fields show a green connected state in n8n.

Need help or want to customize this?

Similar Templates

n8n
Other
Automate Telegram Multilingual Replies
Turn Telegram voice notes into clear translated replies. A chat user speaks, and they receive text and audio back in the target language. Great for travel help, language practice, or teams that serve customers in many languages. The flow starts when Telegram sends a new message to n8n. The bot downloads the voice file and uses OpenAI to turn speech into text. A custom prompt then detects the language and translates based on values in the Settings node, so you choose the native and target languages. The result is posted as a text message and also converted back to audio using OpenAI, then sent as an audio reply in the same chat. A small input step captures text when present so non voice messages do not break the run. Because answers arrive in both text and audio, people can read or listen based on their needs. You need a Telegram bot token and an OpenAI API key to run this. Set the language fields in the Settings node, activate the workflow, and send a voice note to the bot to test. Expect faster cross language replies and fewer copy paste steps for your team. This is useful for front desk teams, tutors, or field staff who must handle quick chats in many languages.
5 views
view
See More Templates

These templates were sourced from publicly available materials across the web, including n8n’s official website, YouTube and public GitHub repositories. We have consolidated and categorized them for easy search and filtering, and supplemented them with links to integrations, step-by-step setup instructions, and personalized support in the Futurise community. Content in this library is provided for education, evaluation and internal use. Users are responsible for checking and complying with the license terms with the author of the templates before commercial use or redistribution.Where an original author was identified, attribution has been provided. Some templates did not include author information. If you know who created this template, please let us know so we can add the appropriate credit and reference link. If you are the author and would like this template removed from the library, email us at info@futurise.com and we will remove it promptly.