AI Agents

AI Document Assistant via Telegram Supabase

28 nodes 240 131 Automatic trigger
Download

Workflow Description

An intelligent assistant processes documents via Telegram, receives files and queries, extracts content, splits text into chunks, stores them in a vector database, and answers questions using Gemini while maintaining conversation context.

How it works

  1. 1.Receive files and messages from Telegram through the trigger
  2. 2.Extract document content and process text data
  3. 3.Split text into chunks, convert to embeddings, and store in Supabase
  4. 4.Process user queries through an AI agent powered by Gemini
  5. 5.Search stored documents and retrieve relevant information
  6. 6.Send answers via Telegram while preserving conversation history

Use cases

  • Manage corporate document libraries and provide instant answers to inquiries about stored files
  • Analyze contracts, reports, and technical specifications to generate quick summaries

Requirements

  • Active Gemini API subscription for natural language processing
  • Telegram Bot account with a valid bot token
  • Supabase database configured for vector storage
  • Support for multiple document formats (PDF, images, text files)

Service Value

Ideal as a smart automation service combining integrations and AI to produce ready-to-use results.

Apps Used

Gemini Tool AI Agent Telegram Document Default Data Loader Text Splitter Vector Store Memory

Details

Trigger Automatic trigger
Nodes 28
Apps 8
Views 240
Downloads 131

How to Use

  1. 1.Click "Download Template"
  2. 2.Open your n8n dashboard
  3. 3.Go to Workflows > Import from File
  4. 4.Select downloaded file and configure credentials

Nodes Used (28)

/

Google Gemini Chat Model

Gemini Model

#1

OpenWeatherMap

Open Weather Map Tool

#2

AI Agent

Agent

#3

Telegram Trigger

Set

#4

Telegram

Set

#5

Think

Tool Think

#6

Embeddings Google Gemini

Gemini Model

#7

Default Data Loader

Document Default Data Loader

#8

Recursive Character Text Splitter

Text Splitter Recursive Character Text Splitter

#9

Extract from File

Extract From File

#10

Answer questions with a vector store

Tool Vector Store

#11

Supabase Vector Store

Vector Store Supabase

#12

Sticky Note10

Sticky Note

#13

Sticky Note11

Sticky Note

#14

Telegram - Embedding Complete

Set

#15

Supabase - Save Embeddings

Vector Store Supabase

#16

Command Router

Switch

#17

Telegram - Download file

Set

#18

Aggregate

Aggregate

#19

Fallback- No formatting

Set

#20

Split Out

Split Out

#21

Simple Memory

Memory Buffer Window

#22

Handle formatting and split

Code

#23

Sticky Note

Sticky Note

#24

Manual Mapping

Set

#25

Unsupported message

Set

#26

Send processing document message

Set

#27

Send embedding Started message

Set

#28