Skip to main content

Create an intelligent FAQ Telegram bot with Google Gemini and Supabase

Workflow preview

Workflow preview
100%
Create an intelligent FAQ Telegram bot with Google Gemini and Supabase preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

Overview This template creates a smart FAQ bot on Telegram, powered by Google Gemini for intelligent answers and Supabase to store user data. The workflow can distinguish between new and existing u...

Best for

  • Support Chatbot automation workflows
  • AI Chatbot automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.telegramtrigger, @n8n/n8n-nodes-langchain.lmchatgooglegemini, n8n-nodes-base.stickynote, n8n-nodes-base.supabase, n8n-nodes-base.if, n8n-nodes-base.telegram, n8n-nodes-base.set, @n8n/n8n-nodes-langchain.agent

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Mohammad Jibril.

Original n8n.io source

1.1 Workflow description

Title
Create an intelligent FAQ Telegram bot with Google Gemini and Supabase
Workflow name
Create an intelligent FAQ Telegram bot with Google Gemini and Supabase

Overview This template creates a smart FAQ bot on Telegram, powered by Google Gemini for intelligent answers and Supabase to store user data. The workflow can distinguish between new and existing users.

How It Works

Trigger: The workflow starts when a user sends any message to the Telegram Bot.

Check User: It looks up the user's chat_id in a Supabase telegram_users table.

Route (New vs. Existing):

New User (True Path): If the user is not found, the workflow saves their chat_id to Supabase and sends a one-time welcome message.

Existing User (False Path): If the user exists, the workflow proceeds to the AI step.

Generate Answer: It loads a predefined FAQ context and combines it with the user's question. This is sent to Google Gemini via the AI Agent node.

Send Response: The AI-generated answer is sent back to the user on Telegram.

Setup Instructions

Telegram:

Connect your Telegram credentials to the Telegram Trigger and both Send a text message nodes.

Supabase:

Connect your Supabase credentials to the Find user in DB and Create a row nodes.

You MUST have a table named telegram_users.

This table MUST have a column named chat_id (type: text or varchar).

Google Gemini:

Connect your Google Gemini (Palm API) credentials to the Google Gemini Chat Model node.

(REQUIRED) Customization:

Open the Set FAQ Context node and change its contents with Questions (Q) and Answers (A) that are appropriate for your bot.

Change the text in the Send a text message (Welcome Message) node as you want.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Telegram Trigger

Type / Role
n8n-nodes-base.telegramTrigger - telegramTrigger
Config choices
Version 1.2

Block 2 - Google Gemini Chat Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - lmChatGoogleGemini
Config choices
Version 1

Block 3 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 4 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 5 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 6 - Sticky Note3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 7 - Sticky Note4

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 8 - Sticky Note5

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 9 - Check if User Exists in Supabase

Type / Role
n8n-nodes-base.supabase - supabase
Config choices
Version 1

Block 10 - Route: New or Existing User?

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 11 - Save New User to Supabase

Type / Role
n8n-nodes-base.supabase - supabase
Config choices
Version 1

Block 12 - Send Welcome Message (New User)

Type / Role
n8n-nodes-base.telegram - telegram
Config choices
Version 1.2

Block 13 - Load FAQ Context for AI

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 14 - Process Question with Gemini

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 2.2

Block 15 - Send AI Answer to User

Type / Role
n8n-nodes-base.telegram - telegram
Config choices
Version 1.2

3. Summary Table

Workflow Create an intelligent FAQ Telegram bot with Google Gemini and Supabase
Complexity advanced
Nodes 15
Categories Support Chatbot, AI Chatbot
Author Mohammad Jibril
Published 16 Oct 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/9762/9762.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Create an intelligent FAQ Telegram bot with Google Gemini and Supabase do?

Overview This template creates a smart FAQ bot on Telegram, powered by Google Gemini for intelligent answers and Supabase to store user data. The workflow can distinguish between new and existing u...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Support Chatbot, AI Chatbot use case.