Telegram Chatbot with n8n

Experimenting with n8n to create a simple Telegram chat bot

Aug 25 - Aug 25

Description

Took a weekend to explore n8n workflow and connected up some services to have a working LLM chatbot in Telegram.

Technologies

  • n8n

  • Telegram

  • Gemini API

Project Overview

n8n Telegram Chatbot
Figure 1: n8n Telegram Chatbot

Over the weekend, I decided to take a look at a no-code workflow automation tool called n8n and see how quickly I could spin up a simple Telegram chatbot using it.

Implementations

Hosting

As n8n has a self-hosted version, I decided to host it on the very generous Oracle ‘Always Free’ tier VM. Highly recommend everyone to check out Oracle Cloud’s free tier if you are looking for a free VM to host your projects.

Once everything was set up and running in my domain (using Nginx and Cloudflare), I was ready to start playing around with n8n.

n8n Dashboard
Figure 2: n8n Dashboard

Creating the Chatbot

For those that have not used n8n before, it is a no-code automation tool that allows anybody to create workflows with various services and APIs like Telegram, many of the LLM providers, Reddit, Databases and more.

Overall, I was able to very quickly create a simple Telegram LLM chatbot with agent capabilities!

Here are some of its features:

Workflow in action
Figure 3: Workflow in action

Above we can see what happens when I send a message to the bot.

To power the bot, I used the Gemini 2.5 Flash to handle the text messages and the image analysis. The reason Gemini 2.5 Flash is chosen is due to its multimodal capabilities, built-in grounding search, and it is the best free state-of-the-art LLM available currently.

And here is an example of the response in Telegram:

Telegram Chatbot
Figure 4: Telegram Chatbot

Conclusion

Overall, this was a fun weekend experiment and I was able to learn quite a bit about n8n and how it can be used for quick prototyping especially for agentic applications. Sometimes, you really do not need to code from scratch, using a no-code tool can help you to prototype first so that you can do a sanity check on the idea. It also allows you to quickly iterate on the idea and see if it is worth pursuing further.

GitHub LinkedIn Email