Telegram chat with PDF

Go to Workflow
16,332 views
Built by felipe biava cataneo felipe biava cataneo
Created on June 09, 2026

Description

What this template does
This template serves as a Chatbot that enables you to ask questions about the content of a PDF directly in Telegream.

It checks incoming Telegram messages if they contain a document. If they do, it stores the PDF in a Pinecone Vector store. If there's no document, it will search the Vector Store for information and try to answer your question.

Setup
Open the Telegram app and search for the BotFather user (@BotFather)
Start a chat with the BotFather
Type /newbot to create a new bot
Follow the prompts to name your bot and get a unique API token
Save your access token and username
Once you set your bot, you can send the pdf, and then ask questions about the content.

How to adjust it to your needs
You can exchange the Groq chat model with any model that you like
Exchange Pinecone with any other vector store tool you like (e.g. Supabase, Postgres or QDrant)

#Telegram, #Pinecone, #Openai, #GroQ

Nodes Used (9)

Code
n8n-nodes-base.code
Default Data Loader
@n8n/n8n-nodes-langchain.documentDefaultDataLoader
Embeddings OpenAI
@n8n/n8n-nodes-langchain.embeddingsOpenAi
Groq Chat Model
@n8n/n8n-nodes-langchain.lmChatGroq
Pinecone Vector Store
@n8n/n8n-nodes-langchain.vectorStorePinecone
Question and Answer Chain
@n8n/n8n-nodes-langchain.chainRetrievalQa
Recursive Character Text Splitter
@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter
Telegram
n8n-nodes-base.telegram
Vector Store Retriever
@n8n/n8n-nodes-langchain.retrieverVectorStore