Mindket

Telegram bot answering from an uploaded PDF or CSV

Newversion 1 · updated

Overview

An n8n workflow with two ways in: a web form that takes a PDF or CSV, and a Telegram bot that answers questions about it. The file is cut into chunks, embedded with Hugging Face and kept in n8n’s own memory.

Telegram bot answering from an uploaded PDF or CSV is an n8n workflow in the Productivity category, listed by Mindket. It is free. This is version 1, last updated on . Download it on this page or copy its JSON, then import it into an n8n canvas. Nothing runs until you activate it in n8n.

At a glance

Runs in
  • n8n Cloud: import the file into a new workflow there
  • Your own n8n server: the same file and steps, behind a public HTTPS address
  • Telegram: chat with the bot in a private chat
  • More documents: upload more files through the form to widen what the bot knows

Platform

Connects 3 apps

How it works

Trigger

A Telegram message, or a file form

Two things start it:

  • A question typed to your bot in Telegram
  • A PDF or CSV uploaded through the web form

Actions

  1. The form’s file is read and cut into chunks of about 3000 characters with a 200 character overlap
  2. Hugging Face turns each chunk into a vector, and the vectors are kept in n8n’s memory
  3. A Telegram message asks for the chat’s details and starts an AI agent
  4. The agent searches the stored chunks for the question and answers from them, using Groq’s gpt-oss-20b
  5. The answer is sent back to the Telegram chat

Result

A reply in the Telegram chat, written from the chunks of the uploaded file

Integrations

What you need before you start.

Telegram

Chat

Takes each message sent to the bot and delivers the agent’s answer.

NeedsA bot token from BotFather, in a Telegram credential

Groq

Chat model

Runs the agent that reads the chunks and writes the answer, with openai/gpt-oss-20b.

NeedsA Groq API key, in a Groq credential

Hugging Face

Embedding model

Turns the file’s chunks and each question into vectors with a sentence-transformers model.

NeedsA Hugging Face access token, in a Hugging Face credential

Workflow check

Checked by Mindket on 13 Nov 2026

Steps
6 steps, starting on a Telegram event or on a form
AI
2 steps call an AI model: AI Agent1 and Simple Vector Store
Sign-ins
Signs in to: Telegram, Hugging Face and Groq
API keys
No API key is left in the file
Step types
Mindket’s checker reads all 5 of its step types

Read from the workflow’s file, not from a run.

About

What it is

This n8n workflow lets a Telegram bot answer questions from a file you upload. A web form takes a PDF or CSV. The file is cut into chunks of about 3000 characters, turned into vectors by Hugging Face and kept in n8n’s own memory. When someone writes to the bot, an AI agent searches those chunks and replies with what it finds, through Groq’s openai/gpt-oss-20b model. Thirteen nodes do the work, beside two empty sticky notes that frame the two halves.

Who it suits

Small teams who want a bot that answers from one document, such as a price list, a handbook or a menu. Skip it for a large or growing library. Everything sits in memory, so a restart empties it, and a reply can only be as good as the file you upload.

Who uses it, and how
IndustryWho uses itHow they use itExample
RetailShop ownersAnswer product questions from a price listAn owner uploads a CSV of prices and customers ask the bot what a shirt costs.
HospitalityRestaurant managersAnswer menu and allergy questions from the menu fileA manager uploads the menu as a PDF and guests ask which dishes contain nuts.
EducationTeachersLet students ask questions about a course handoutA teacher uploads the handout and students ask when the next deadline is.
SupportHelpdesk staffAnswer routine questions from a policy documentA team uploads a returns policy and the bot tells a customer how many days they have.

You need basic n8n skills and three accounts: Telegram, Groq and Hugging Face. Telegram sends each message to your n8n over HTTPS, so n8n needs a public address.

Where to use it

Any n8n with the AI nodes that Telegram can reach over HTTPS will run it. It also has to reach Groq and Hugging Face.

  • n8n Cloud: import the file into a new workflow there
  • Your own n8n server: the same file and steps, behind a public HTTPS address
  • Telegram: chat with the bot in a private chat
  • More documents: upload more files through the form to widen what the bot knows

Setup

Download saves a zip with workflow.json and Mindket’s setup notes in your downloads folder. Three accounts are involved.

What you need first
NeedDetail
n8nOn n8n Cloud or on a server of your own with a public HTTPS address
TelegramA bot made with BotFather, and its token in a Telegram credential
GroqAn API key, saved in a Groq credential
Hugging FaceAn access token, saved in a Hugging Face credential, for the embeddings
A fileA PDF or a CSV to upload through the form
  1. In n8n, create a workflow, open its menu, choose Import from File and pick workflow.json.
  2. Add a Telegram credential with your bot token and select it in Telegram Message Trigger1, Get a chat1 and Reply in Telegram1.
  3. Add a Groq credential and select it in Groq Chat Model.
  4. Add a Hugging Face credential and select it in Embeddings HuggingFace Inference and Embeddings HuggingFace Inference1. Both nodes must use the same model.
  5. Activate the workflow.
  6. Open the production address shown in Upload your file here, upload a PDF or CSV and wait for the page to finish.
  7. Write to your bot in Telegram and ask something the file can answer.

How to use it

Upload a file through the form, then ask the bot questions in Telegram. Each question goes to the agent, which searches the stored chunks and answers from them. A short memory keeps the recent messages of each chat.

What to change for a different result
To changeWhere
The answer rules and toneThe system message in AI Agent1
The modelmodel in Groq Chat Model
The size of the chunkschunkSize and chunkOverlap in Recursive Character Text Splitter
How many chunks the agent readstopK in Retrieve documents
The accepted file typesacceptFileTypes in Upload your file here

Example

A shop owner uploads a CSV of prices with the columns item and price, then asks the bot in Telegram how much a blue shirt costs.

The agent searches the stored chunks for the shirt, and the bot replies in the chat with the price it found. The system message tells the agent to answer only from the file, so it should not invent a price.

For newcomers and experts

If you are new. n8n draws a workflow as boxes joined by lines, and each box, a node, does one job. This one has two halves. The first takes a file, cuts it up and stores it. The second listens to Telegram and answers. A vector is a list of numbers that stands for the meaning of a piece of text.

For experts. The store is n8n’s In-Memory Vector Store under the key vector_store_key, written in insert mode and read by a retrieve-as-tool node. The two embedding nodes must use one model.

Where to look closer
NodeWhat it doesWhat to know
Upload your file hereA form that takes one PDF or CSVThe file lands in the binary field Upload_your_file, which the loader reads
Default Data Loader1Reads the file and sends its chunks to the storeIts data type is binary, so the file’s text is stored, not its name
Simple Vector StoreWrites the embedded chunks in insert modeEach upload adds to the store and does not replace it
Retrieve documentsGives the agent a search tool over the storeIt returns the ten closest chunks
AI Agent1Reads the question, uses the tool and writes the answerIts input text comes from the Telegram trigger

Good to know

The model was replaced and the file loader was repaired. The store sits in memory, so a restart empties it.

  • Model: the file used Groq’s llama-3.1-8b-instant. Groq’s deprecations page, read on 12 November 2026, lists it as shut down on 16 August 2026 for free and developer plans, with openai/gpt-oss-20b as the replacement. Mindket’s copy uses that model, which Groq lists with tool use
  • File loader: the original data loader read the item’s JSON, which holds only the file’s name, type and size. It now reads the file itself, from the binary field Upload_your_file. The form takes one file at a time
  • Memory: the store is a map inside the n8n process (n8n’s source, read on 12 November 2026). A restart empties it, and by default nothing limits its size or age
  • Shared key: version 1.3 of the store node uses the key vector_store_key as it is, so another workflow with the same key reads and writes the same store
  • Embeddings: both nodes use the node’s default model, sentence-transformers/distilbert-base-nli-mean-tokens, which Hugging Face’s model data listed as live on its inference provider on 12 November 2026
  • Replies: Telegram’s Markdown mode rejects text with an unpaired _ or *, and a message holds at most 4096 characters (Telegram’s Bot API page)
  • Your data: the file’s chunks and your questions go to Hugging Face, and the questions and the chunks found go to Groq. The file holds no credential

README and files

README

Telegram bot answering from an uploaded PDF or CSV

An n8n workflow with two ways in. A web form takes a PDF or CSV, and a Telegram bot answers questions about it. The file is cut into chunks, embedded with Hugging Face and kept in n8n's own memory.

What is inside

  • workflow.json: the workflow as n8n exports it, fifteen nodes. Thirteen do the work and two are empty sticky notes that frame the two halves. It holds no credential.
  • README.md: these notes.

What we changed from the original copy

  • The chat model was Groq's llama-3.1-8b-instant. Groq's deprecations page, read on 12 November 2026, lists it as shut down on 16 August 2026 for free and developer plans. Mindket's copy uses openai/gpt-oss-20b, the model that page names as its replacement.
  • The data loader read each item as JSON. A form upload carries the file as binary data, so the loader would have stored only the file's name, type and size. It now reads the binary field Upload_your_file, which holds the file itself.
  • The form field took several files and was called Upload your file(s). It now takes one file and is called Upload your file, so the binary field always has the same name.
  • The system message had typos. Mindket's copy says the same thing in clean words.
  • Several nodes were linked to credentials in the author's n8n. The links are gone, so select your own.
  • Nothing else. The chunk size, the memory and the two embedding nodes are the file's own.

Before you start

  • An n8n instance with a public HTTPS address, on n8n Cloud or your own server. Telegram sends every message to that address.
  • A Telegram bot made with BotFather, and its token.
  • A Groq API key.
  • A Hugging Face access token.
  • A PDF or CSV file to upload.

Set it up

  1. In n8n, create a workflow, open its menu and choose Import from File. Pick workflow.json.
  2. Add a Telegram credential with your bot token. Select it in Telegram Message Trigger1, Get a chat1 and Reply in Telegram1.
  3. Add a Groq credential and select it in Groq Chat Model.
  4. Add a Hugging Face credential and select it in Embeddings HuggingFace Inference and Embeddings HuggingFace Inference1. Both nodes use the node's default model, so leave them the same.
  5. Activate the workflow.
  6. Open the production address shown in Upload your file here. Upload a PDF or CSV and wait for the page to finish.
  7. Write to your bot in Telegram and ask something the file can answer.

How a run goes

  1. A file sent through the form starts Upload your file here. Default Data Loader1 reads it, and Recursive Character Text Splitter cuts it into chunks of 3000 characters with an overlap of 200.
  2. Embeddings HuggingFace Inference turns each chunk into a vector. Simple Vector Store saves the vectors in n8n's memory under the key vector_store_key.
  3. A message to the bot starts Telegram Message Trigger1. Get a chat1 asks Telegram for the chat's details and passes the run on to AI Agent1.
  4. AI Agent1 reads the question from the trigger. It has Retrieve documents as a tool, which searches the store for the ten closest chunks. Embeddings HuggingFace Inference1 embeds the question for that search.
  5. Groq Chat Model writes the answer from those chunks, and Simple Memory keeps the recent messages of the chat.
  6. Reply in Telegram1 sends the answer to the chat.

Change the result

  • Rules and tone: the system message in AI Agent1.
  • Model: model in Groq Chat Model.
  • Chunk size and overlap: chunkSize and chunkOverlap in Recursive Character Text Splitter.
  • Chunks read for each question: topK in Retrieve documents.
  • File types: acceptFileTypes in Upload your file here.

Good to know

  • Mindket did not run this workflow. Telegram, Groq and Hugging Face were not called. Every model, field and limit above comes from their docs, their model data or n8n's source, read on 12 November 2026.
  • The store is a map inside the n8n process. A restart empties it, so upload the file again afterwards. By default nothing limits its size or age. The environment variables N8N_VECTOR_STORE_MAX_MEMORY and N8N_VECTOR_STORE_TTL_HOURS set limits.
  • Version 1.3 of the store node uses the key vector_store_key as it is. Another workflow with the same key reads and writes the same store.
  • Each upload adds to the store. Nothing is cleared between uploads, because clearStore is off.
  • Both embedding nodes use the node's default model, sentence-transformers/distilbert-base-nli-mean-tokens. Hugging Face's model data listed it as live on its inference provider on 12 November 2026. Hugging Face bills inference through your account.
  • The embedding nodes must use the same model, or the search compares vectors that do not match.
  • Telegram's Markdown mode rejects text with an unpaired _ or *, and a message holds at most 4096 characters (Telegram's Bot API page).
  • Telegram needs an HTTPS address for its webhook, so a local n8n without a public address cannot receive messages.
  • The chunks of your file and your questions go to Hugging Face. The questions and the chunks found go to Groq.
  • The file holds no credential and no key.
Files
NOTICE.md  551 B
README.md  5 KB
workflow.json  8 KB

3 files, 14 KB, downloaded as a zip.

What’s new

  • Version 1 · 2026-11-12

Reviews

No ratings yet

Write a review

No reviews yet.

More from Mindket

See all from Mindket

Huashu Design

alchaincyf · Skill

Turns a one-line request in your AI agent into a finished design: a launch animation, a clickable app prototype, an editable slide deck, an infographic or a se…

New29.4k

Guizang PPT Skill

op7418 · Skill

Skill that makes single-file HTML slide decks, slide illustrations and platform covers in two visual styles, with a presenter mode for rehearsal. For speakers…

New29.8k

Claude Code Skills & Plugins

alirezarezvani · Skill

Adds 411 ready-made skills for Claude Code and other coding agents, grouped by role from engineering and product to marketing, finance and compliance. Installs…

New29.8k

Similar in Productivity

See all in Productivity

Frontend Slides

zarazhangrui · Skill

Builds HTML presentations from scratch or from a PowerPoint file and shows visual style previews to pick from, for people who want web slides with no CSS or Ja…

New32.3k

IPTV

iptv-org · Kit

Collects publicly available live TV channels from many countries into playlists that any video player with live streaming can open. Made for viewers and for de…

New144k

upscaler

uwg · Kit

Holds a set of image upscaling models gathered from the OpenModelDB community, for people who want to enlarge low-resolution pictures with AI on their own comp…

New