๐Ÿ’ฌ Build a Telegram chatbot with Gemini

โšก 2,779 views ยท ๐Ÿ’ฌ Support Chatbots

Description

Overview

Who is this for

What it does (quick)

Quick setup (5 steps)

  1. Create a Telegram bot with @BotFather and copy the bot token.
  2. Add Telegram credentials to n8n (Telegram node).
  3. OpenAi API key and add it to n8n.
  4. Get a Google Gemini (PaLM) API key and add it to n8n.
  5. (Optional) Connect Google Docs OAuth2 if you want the bot to read documents.
  6. Activate the workflow and test by messaging the bot.

Required items

How it works (step-by-step)

  1. Telegram message arrives โ†’ Trigger node.
  2. Workflow extracts message and user info.
  3. (Optional) Pull supporting content from Google Docs or an API.
  4. Send prompt + context to Gemini โ†’ receive reply.
  5. Send reply back to the Telegram user.
  6. Add small delays and batch processing to handle volume safely.

How to customize

Testing checklist

Tips and best practices

๐Ÿ™‹ For Help & Community

๐Ÿ”— Nodes Used

Telegram, Telegram Trigger, OpenAI, Google Gemini

๐Ÿ“ฅ Import

Download workflow.json and import into n8n: Workflow menu โ†’ Import from File

๐Ÿ“– Importing guide ยท ๐Ÿ”‘ Credential setup