Build a Tech Support Telegram Bot
Build a Telegram bot that searches the web for tech solutions using n8n.
Introduction
30 Second Summary
When something goes wrong with your tech, you probably open a browser and start searching for answers. What if a bot could do that searching for you and deliver the best solutions straight to your phone?
In this project, you will build a Telegram bot that searches the web for tech support solutions whenever you describe a problem. No coding required.
What You'll Build
A Telegram chatbot powered by n8n that takes your tech problems, searches the web using the Tavily Search API, and replies with solutions and source links.
By the end of this project, you'll have:
- A Telegram bot registered with BotFather and connected to an n8n workflow.
- An n8n Cloud workflow that receives messages, searches the web via Tavily, and sends formatted results back to Telegram.
- A security filter that restricts the bot to only respond to your messages.
- Secret Mission: Add a "Was this helpful?" follow-up with inline buttons that triggers a deeper search when the first results are not enough.
Are there any prerequisites?
None. This guide walks you through setting up every tool from scratch, including Telegram, n8n Cloud, and Tavily. Everything runs in the cloud, so there is nothing to install on your computer.
Set Up Your Accounts
Your bot needs three services working together: a messaging platform to talk to users, a search engine to find answers, and a workflow tool to connect them.
In this step, you will create accounts for n8n Cloud (the workflow tool), Telegram (the messaging platform), and Tavily (the web search API).
In this step, get ready to:
- Create your n8n Cloud free trial account.
- Install Telegram and create an account.
- Sign up for Tavily and grab your API key.
Sign up for n8n Cloud
n8n Cloud is a hosted version of the n8n workflow automation platform. It gives you a public HTTPS URL out of the box, which Telegram requires for receiving messages.
- Open your browser and go to https://app.n8n.cloud/register.
- Create a free trial account using your email or a social login.
- No credit card is required. You get 14 days of Pro features and 1,000 workflow executions.
- After signing up, you should land on the n8n editor page with a blank canvas ready for building workflows.
Why n8n Cloud instead of self-hosted?
Telegram requires a public HTTPS URL to send your bot's messages to. n8n Cloud provides this automatically.
Self-hosting n8n would mean configuring a reverse proxy, SSL certificates, and a public domain. Cloud eliminates all of that infrastructure work.
Install Telegram
- If you already have Telegram installed, skip to the next substep.
- Go to https://telegram.org and download the app for your device (available on iOS, Android, Windows, macOS, and Linux).
- Open the app and create an account using your phone number.
- Telegram will send you a verification code via SMS. Enter it to complete setup.
Not receiving the verification code?
Check that you entered your phone number with the correct country code. Wait at least 60 seconds before requesting a new code.
Help me troubleshoot Telegram verification
Sign up for Tavily
Tavily is a search API designed for AI applications. It returns structured results with titles, URLs, and content snippets. It also generates an AI-powered summary answer from the search results.
- Go to https://app.tavily.com and create a free account.
- No credit card is required. The free tier gives you 1,000 API credits per month (1 credit = 1 search).
- From your Tavily dashboard, locate your API key and copy it.
- Paste the API key somewhere safe (a notes app or text file) so you can use it later in your n8n workflow.
Keep your API key private
Your Tavily API key is like a password. Do not share it publicly or post it in chat messages. You will paste it into n8n in a later step, where it stays on your private workflow.
What is a REST API?
A REST API is a standard way for applications to communicate over the internet. Your n8n workflow will send a request to Tavily's API with a search query, and Tavily will respond with search results.
The API key proves to Tavily that you are an authorized user. Every request you send includes this key so Tavily knows which account to charge the credit to.
All three accounts are ready. Next up, you will create your Telegram bot and connect it to n8n so it can receive messages.
Create Your Telegram Bot
Your accounts are all set up. Now it's time to create the actual bot that will receive your tech support questions.
Every Telegram bot starts with BotFather, Telegram's official tool for registering new bots. Once your bot exists, you'll connect it to n8n so your workflow can listen for incoming messages.
In this step, get ready to:
- Create a Telegram bot using BotFather.
- Connect the bot to an n8n Cloud workflow.
- Test the connection by sending a message to your bot.
Create your bot with BotFather
BotFather is Telegram's built-in bot that creates and manages other bots. You'll chat with it directly in Telegram to register your new tech support bot.
- Open Telegram on your device.
- Tap the search bar at the top and type @BotFather.
- Select the result with the blue checkmark to confirm it is the official account.
- Tap Start to begin the conversation.
- Send the command /newbot.
What happens next?
BotFather will ask you two questions in sequence. First it asks for a display name (the friendly name users see), then a username (a unique identifier that must end in bot).
- When BotFather asks for a name, type Tech Support Bot and send it.
- When BotFather asks for a username, type a unique name ending in bot (e.g., my_techsupport_bot) and send it.
- BotFather replies with a message containing your bot's HTTP API token. Copy this token and save it somewhere safe.
What are the username rules?
Your bot username must be between 5 and 32 characters. It can only include Latin letters, numbers, and underscores. It must end in bot. You cannot change the username later, so choose carefully.
Keep your token private
The API token gives full control of your bot. Do not share it publicly or commit it to version control.
Connect the bot to n8n
With your bot registered, you need a workflow in n8n Cloud that listens for messages sent to it. The Telegram Trigger node acts as a webhook that receives every message your bot gets in real time.
- Log in to n8n Cloud at https://app.n8n.cloud.
- Select Overview in the left side menu, then click Create Workflow in the upper-right corner.
- Click the workflow name at the top of the editor (it defaults to My workflow) and rename it to Tech Support Bot.
- On the canvas, click Add first step to open the nodes panel.
- Search for Telegram and select the On message received trigger.
What is a Telegram Trigger node?
A trigger node starts your workflow when a specific event happens. The Telegram Trigger registers a webhook with Telegram's servers so that every time someone sends your bot a message, n8n receives the data instantly.
n8n Cloud provides a public HTTPS URL automatically, which is required for Telegram webhooks to work.
- In the Telegram Trigger node panel, find the Credential to connect with dropdown.
- Click the dropdown and select Create New.
- Paste your bot's API token into the Access Token field.
- Name the credential Tech Support Bot and click Save.
- Set the Trigger On field to message.
Don't see the credential fields?
Make sure you selected the Telegram Trigger node (with the bolt icon), not the regular Telegram action node. Double-click the node on the canvas to open its settings panel.
help me configure the Telegram Trigger credential in n8n
Test the connection
Before building the rest of the workflow, confirm that n8n can receive messages from your bot. You will send a test message in Telegram and watch it appear in n8n.
- In the Telegram Trigger node panel, click Listen for Test Event.
- Switch to Telegram on your device.
- Search for your bot by its username (e.g., my_techsupport_bot).
- Tap Start, then send a message like my screen is flickering.
- Switch back to n8n. You should see your message appear in the node's output panel with the full message data.
What should I see?
The output panel shows a JSON object containing your message text, sender information, and chat details. Look for the message.from.id field. This is your personal Telegram chat ID.
- Find the message.from.id value in the output data and write it down. You will need this number in a later step to set up a security filter.
Why save your chat ID?
Your chat ID is a unique number that identifies you on Telegram. In Step 4, you will use it to build a security filter so your bot only responds to your messages and ignores everyone else.
Message not appearing in n8n?
Make sure you clicked Listen for Test Event before sending your message in Telegram. The node only listens after you click that button.
If it still does not appear, close the workflow and reopen it to reset the canvas. Then try the listen-and-send sequence again.
help me troubleshoot why my Telegram Trigger node is not receiving messages
Your bot is alive and listening for messages. Next, you'll teach it how to search the web for tech support answers using the Tavily API.
Search the Web with Tavily
Your bot can receive messages, but right now it does nothing with them. The next piece of the puzzle is giving your bot the ability to search the web for solutions when someone describes a tech problem.
The Tavily Search API takes a plain-text question and returns structured search results with titles, URLs, and an AI-generated summary answer. You'll connect it to your workflow using n8n's built-in HTTP Request node, which can call any REST API without installing extra packages.
In this step, get ready to:
- Add an HTTP Request node to your workflow and configure it to call the Tavily API.
- Set up the request body to pass the user's message as a search query.
- Test the search by sending a real tech problem to your bot.
Add an HTTP Request node
n8n's HTTP Request node lets you call any external API directly from your workflow. You'll use it to send the user's message to Tavily and get search results back.
- In your n8n workflow, click the + icon to the right of the Telegram Trigger node.
- Search for HTTP Request and select it to add it to the canvas.
- Set Method to POST.
- In the URL field, paste:
https://api.tavily.com/search
- Toggle Send Headers on.
- Click Add Header. Set Name to Content-Type and Value to application/json.
- Click Add Header again. Set Name to Authorization and set Value to Bearer followed by your Tavily API key (paste the key you copied from your Tavily dashboard).
What does the Authorization header do?
The Authorization header tells the Tavily API who you are. The word Bearer followed by your API key is a standard way APIs verify that requests come from an authorized user.
Why use the HTTP Request node instead of a Tavily community node?
On n8n Cloud, only verified community nodes can be installed. The built-in HTTP Request node works on any n8n instance and can call any REST API directly. This makes it a reliable choice for connecting to services like Tavily without worrying about node availability.
Configure the search body
The request body tells Tavily what to search for and how many results you want back. You'll pass the user's Telegram message directly as the search query.
- In the HTTP Request node settings, toggle Send Body on.
- Set Body Content Type to JSON.
- Select Using JSON as the specification method and paste the following into the JSON field:
{"query": "{{ $json.message.text }}", "max_results": 3, "search_depth": "basic", "include_answer": true}
What does this JSON body do?
Each field in this request controls how Tavily searches:
- "query": "{{ $json.message.text }}" pulls the user's actual Telegram message and uses it as the search query. The {{ }} syntax is how n8n references data from previous nodes.
- "max_results": 3 limits the response to 3 search results so the reply stays readable.
- "search_depth": "basic" uses a fast search that costs 1 API credit per request.
- "include_answer": true asks Tavily to generate an AI-powered summary answer alongside the raw results.
Test the search
Time to see if your workflow can actually search the web. You'll send a real tech problem to your bot and check that Tavily returns useful results.
- Click on the Telegram Trigger node in your workflow.
- Click Listen for Test Event.
- Open Telegram and send your bot a message like laptop not detecting external monitor.
- Once the trigger captures the message, click on the HTTP Request node.
- Click Test step to execute the HTTP Request node manually.
You should see a JSON response from Tavily containing an answer field (an AI-generated summary) and a results array with titles, URLs, and content snippets.
Seeing an error from the HTTP Request node?
- Check that your Tavily API key is correct. Go back to the HTTP Request node headers and verify the Authorization value starts with Bearer (with a space) followed by your full API key.
- Make sure you toggled Send Body on and set the Body Content Type to JSON. Without the body, Tavily does not know what to search for.
- Confirm the URL is exactly https://api.tavily.com/search with no trailing spaces or extra characters.
Help me debug my n8n HTTP Request node calling the Tavily API
Your workflow can now receive a message and search the web for answers. Next up, you'll format those results into a readable reply and send them back to the user in Telegram.
Format and Send Results Back
Your workflow successfully searches the web for tech solutions. Right now though, those results stay trapped inside n8n with no way to reach the person who asked.
In this step, you'll add a Telegram Send Message node that formats the Tavily response into a readable reply. You'll also insert a security filter so only your messages trigger the bot.
In this step, get ready to:
- Add a Telegram Send Message node that replies with formatted search results.
- Format the response with a quick answer and source links.
- Add a security filter using an IF node to restrict bot access to your chat ID.
Add a Telegram Send Message node
The HTTP Request node returns raw JSON data from Tavily. You need a way to send that data back to the user as a Telegram message.
- In your n8n workflow, click the + button after the HTTP Request node.
- Search for Telegram and select the Telegram node (not the Trigger).
- For Credential to connect with, select your existing Tech Support Bot credential from the dropdown.
- Set the Operation to Send Message.
- In the Chat ID field, click the expression editor (the small icon to the right of the field) and paste this expression:
{{ $('Telegram Trigger').item.json.message.chat.id }}
What does this expression do?
The $('Telegram Trigger') syntax reaches back to the Telegram Trigger node's output data. It grabs the chat.id from the incoming message so the bot replies to the same conversation that sent the question.
Format the response message
Tavily returns an AI-generated answer plus an array of source results. You'll build a formatted string that displays both in a readable way inside Telegram.
- In the Telegram Send Message node, click the expression editor icon next to the Text field.
- Paste this expression into the editor:
š§ *Tech Support Results*\n\nš” *Quick Answer:*\n{{ $json.answer }}\n\nš *Top Sources:*\n{{ $json.results.map(r => '⢠' + r.title + '\n ' + r.url).join('\n\n') }}
What does this expression do?
This expression builds a multi-line Telegram message. The $json.answer pulls the AI-generated summary from Tavily's response.
The $json.results.map(...) iterates over each search result and formats it as a bullet point with the title and URL. The .join('\n\n') adds spacing between each source.
- Under Additional Fields, click Add Field.
- Select Parse Mode and set it to HTML.
- Select Append n8n Attribution and turn the toggle off.
HTML is more reliable for formatting
n8n's Telegram node supports HTML (default), Markdown (Legacy), and MarkdownV2 for parse mode. HTML tends to handle special characters more gracefully than MarkdownV2, which requires escaping many symbols.
Add the security filter
Right now, anyone who finds your bot's username could send it messages and use your Tavily API credits. An IF node lets you check the sender's ID before running the search.
- Click the connection line between the Telegram Trigger node and the HTTP Request node.
- Search for IF and add the IF node. It inserts itself between the two nodes.
- In the IF node, click Add Condition.
- Set the data type dropdown to Number.
- In the first value field, click the expression editor and paste:
{{ $json.message.from.id }}
- Set the comparison to is equal to.
- In the second value field, type your personal chat ID number (the message.from.id value you noted in Step 2 when you tested the Telegram Trigger).
- Verify that the true output of the IF node connects to the HTTP Request node.
- Leave the false output unconnected. Messages from other users will simply stop here.
What is the IF node doing?
The IF node splits the workflow into two branches based on a condition. When the sender's numeric ID matches yours, the message flows to the search node. When it does not match, the workflow stops without responding.
This prevents strangers from consuming your Tavily API credits. Only messages from your account will trigger a web search.
- Save your workflow by pressing Ctrl+S (Windows) or Cmd+S (macOS).
Your workflow should now show four nodes in sequence: Telegram Trigger, IF, HTTP Request, and Telegram Send Message.
Don't see four connected nodes?
Make sure the IF node sits between the Telegram Trigger and the HTTP Request node. If the connection goes straight from the Trigger to the HTTP Request, delete that connection line and rewire it through the IF node.
Double-check that the IF node's true output (not false) connects to the HTTP Request node.
help me troubleshoot my n8n IF node connections
āļø Awesome, I've got everything!
Great. Double check you've saved your workflow with all four nodes connected in the right order.
ā§ I'd like to double check the full workflow
Your workflow should have these four nodes connected in order:
- Telegram Trigger ā Credential: Tech Support Bot, Trigger On: message.
- IF ā Condition: Number, {{ $json.message.from.id }} is equal to your personal chat ID. True output connects to HTTP Request. False output unconnected.
- HTTP Request ā Method: POST, URL: https://api.tavily.com/search. Headers: Content-Type application/json, Authorization Bearer with your Tavily API key. JSON Body: {"query": "{{ $json.message.text }}", "max_results": 3, "search_depth": "basic", "include_answer": true}.
- Telegram Send Message ā Credential: Tech Support Bot. Chat ID: {{ $('Telegram Trigger').item.json.message.chat.id }}. Text: formatted expression with emoji headers, $json.answer, and $json.results.map(...). Parse Mode: HTML. Append n8n Attribution: off.
Your workflow is fully wired up. Next up, you'll activate it and test the bot with real tech problems.
Activate and Test Your Bot
Your workflow is fully wired up. All four nodes are connected and ready to receive messages, filter by sender, search the web, and reply with formatted results.
In this step, you'll publish the workflow to make your bot live. Once activated, it responds to your messages around the clock without any manual intervention.
In this step, get ready to:
- Activate the workflow so it runs 24/7.
- Test the bot with real tech problems.
- Verify the security filter blocks other users.
Activate the workflow
Until now, your workflow only ran when you manually triggered test events. Publishing the workflow registers the production webhook with Telegram so your bot responds automatically.
- Open your "Tech Support Bot" workflow in n8n Cloud.
- Click the Publish button in the top-right corner of the workflow editor.
- Click Publish in the modal that appears to confirm.
Your workflow is now live. The Telegram Trigger node's production webhook URL is registered with Telegram, so incoming messages flow through your workflow automatically.
What happens when you publish?
Publishing locks your workflow to a specific version and makes it live. When someone messages your bot, Telegram sends the message to n8n's production webhook URL, which kicks off the workflow.
Telegram only allows a single webhook per bot. When you were testing earlier with "Listen for Test Event", n8n used a test webhook URL. Publishing switches to the production URL. You cannot test and run production simultaneously with the same bot.
Workflow not publishing?
Make sure all four nodes are connected with no red error indicators. If a node shows an error, open it and check that all required fields are filled in (especially the Telegram credential and Tavily API key).
help me figure out why my n8n workflow won't publish
Test with real tech problems
Your bot is live. Time to put it to work with real tech questions and confirm the full pipeline works end-to-end.
- Open Telegram on your phone or desktop.
- Find your bot by searching for its username (the one ending in "bot" that you created with BotFather).
- Send this message: my laptop only shows on one screen and I have connected an external screen.
- Wait a few seconds for the bot to reply.
You should see a reply with a formatted message containing an AI-generated answer and source links.
- Try a second message: WiFi keeps disconnecting on Windows 11.
- Try a third message: how to fix blue screen of death.
Each message should return a different set of results tailored to that specific tech problem.
What should I see?
Each reply should contain three parts: a header line, an AI-generated quick answer summarizing the solution, and a list of top sources with titles and URLs you can click through.
If the formatting looks slightly off (e.g. raw HTML tags visible), you can go back to the Telegram Send Message node and switch the Parse Mode between HTML and Markdown to find which one renders cleanly.
Bot not responding?
Check that your workflow is published (look for the published indicator on the workflow). If it was unpublished, messages have nowhere to go.
Make sure you are messaging the bot from the same Telegram account you used earlier. The IF node only lets through messages from your specific chat ID.
help me debug why my Telegram bot isn't responding after publishing
Verify the security filter
The IF node you added checks that only messages from your personal chat ID make it through to the search. Let's confirm it actually blocks other users.
- Ask a friend to open Telegram and search for your bot by its username.
- Have them send a message like hello to your bot.
- Confirm that they receive no response.
No friend available?
If you have a second Telegram account (or can create one with a different phone number), message your bot from that account instead. The key thing is that the sender's chat ID does not match the one in your IF node condition.
Why does the security filter matter?
Without the IF node, anyone who discovers your bot's username could send it messages and consume your Tavily API credits. The free tier gives you 1,000 credits per month. Each search uses 1 credit, so an unfiltered bot could burn through your allowance quickly.
Secret mission
Add a "Was This Helpful?" Follow-Up
Your bot delivers results, but what if the first answer misses the mark? In this secret mission, you will add interactive "Yes" and "No" buttons after each search result. If the user taps "No", the bot performs a deeper search with different parameters and sends updated results.
Clean Up Your Resources
Clean Up Your Resources
Decide whether to keep your resources running, pause them to come back later, or delete them entirely. This project uses n8n Cloud (free trial), Telegram (free), and Tavily (free tier), so there are no ongoing costs.
What happens when the n8n Cloud trial ends?
Your trial automatically expires after 14 days with no charges. You do not need to cancel it. Your workspace and workflows are deleted soon after, but you have 90 days to download your workflows before they are permanently removed.
Resources you used:
- n8n Cloud workflow ("Tech Support Bot").
- Telegram bot (created via BotFather).
- Tavily API key (free tier, no ongoing cost).
Keep everything running
No action needed. Choose this if you are still actively building or testing your Tech Support Bot.
- Your n8n Cloud workflow stays active and responds to Telegram messages until the trial expires (14 days from sign-up).
- Your Telegram bot remains accessible in the app.
- Your Tavily free tier renews monthly at 1,000 credits with no action needed.
Pause - I'll come back to this later
Deactivate the workflow to stop it from responding to messages. You can reactivate it any time before the trial expires.
- Open your "Tech Support Bot" workflow in n8n Cloud.
- Toggle the Active switch off in the top-right corner of the workflow editor.
- Your bot will stop responding to messages, but the workflow and all nodes remain saved.
Delete - I don't want to use this again
Remove all project resources and start fresh. Follow each step below.
- Delete the n8n workflow: open your "Tech Support Bot" workflow, click the three-dot menu in the top-right corner, and select Delete.
- Delete the Telegram bot: open Telegram, search for @BotFather, and send the command /deletebot. Select your bot from the list and confirm the deletion.
- Revoke your Tavily API key: go to https://app.tavily.com, open your dashboard, and regenerate or delete the API key so the old one can no longer be used.
What about the n8n Cloud account?
You do not need to manually cancel or delete your n8n Cloud account. The free trial automatically expires after 14 days and your workspace is deleted soon after. No charges occur.
Nice Work!
Nice Work!
You just built a tech support bot that searches the internet for solutions to your problems. All without writing a single line of code.
Here's what you learned:
- Registered a Telegram bot using BotFather and connected it to n8n Cloud via API token.
- Integrated the Tavily Search API using n8n's HTTP Request node to perform web searches and return formatted results to Telegram.
- Added a security filter with an IF node to restrict bot access to your chat ID only.
- Added a "Was this helpful?" follow-up with inline keyboard buttons that triggers a deeper search when the first results are not sufficient.
Ready to quiz yourself?