FlowStep
← All walkthroughs
Full libraryTelegramPineconeOpenAI

Build a support agent that answers from your own docs

Give customers a Telegram bot that answers questions using your actual documentation, retrieved from a Pinecone vector store, instead of the model's general knowledge.

50 minAdvanced13 steps

What this looks like

One step on screen at a time. Read it, do it, tap Next.

Build a support agent that answers from your own docs

Step 1 of 13

01 / 13Manual Trigger

Build the indexing workflow first

Create a separate workflow to load your documents into Pinecone before building the chat agent. Start with a Manual Trigger or Google Drive Trigger pointing at your docs folder.

Checkpoint

A trigger is in place ready to pull in your documentation files.

Back
Next

Before you begin

Tick these off as you sort them. Stopping halfway to create an account is how a fifteen-minute build becomes an hour.

0 of 9 ready

Ticks are saved on this device, so you can come back to them.

  • API key

    Used for both generating embeddings and answering questions once relevant documents are retrieved.

    OpenAI API keys
  • Account

    Create an index matching your embedding model's dimensions before you start — 1536 for OpenAI's common embedding models.

    Pinecone
  • API key

    Found in your Pinecone project settings.

  • Have ready

    PDFs, plain text or markdown files work best. Gather these before building — this workflow needs real content to index against.

  • Account

    Message @BotFather on Telegram to create a bot and get its token.

    Telegram BotFather
  • Know-how

    Retrieval-augmented generation means looking up relevant text before asking the model to answer, rather than trusting it to already know your specifics.

The basics — ticked once, remembered everywhere

  • Account

    Either the hosted version or a self-hosted install. Everything here works the same on both — the only visible difference is the shape of your webhook URLs.

    Create a workspace
  • Know-how

    Adding a node, connecting two of them, and pressing Execute. If any of that is new, the free primer covers it in about ten minutes.

  • Credential

    You will paste at least one secret during setup. A password manager beats a notes app, and it stops you pasting a live key into a chat window by accident.

The shape of the workflow

The nodes you will end up with, left to right, in the order you add them.

Manual TriggerRecursive Character Text SplitterPinecone Vector StoreTelegram TriggerAI AgentPinecone Vector StoreAI AgentTelegram
The finished Build a support agent that answers from your own docs workflow on the n8n canvas4 things to set here
  1. 1Manual Triggerthe trigger — everything starts here
  2. 2Recursive Character Text SplitterSplit documents into chunks
  3. 3Pinecone Vector StoreGenerate embeddings and store them in Pinecone
  4. 4Telegram TriggerStart the second workflow with a Telegram trigger
The finished workflow on the n8n canvasTap to enlarge

Skip the node hunting

Import a starter file with every node for this build already on the canvas, named after its step and wired in order, each one carrying a sticky note with the values to enter. You still connect your own accounts and fill the fields — that is what the walkthrough takes you through — but you never start at a blank canvas.

In n8n: Workflows → Import from file.

Included with the library

What you will build

Jump straight to any step, or print the list and tick it off beside your n8n tab.

If something goes wrong

Everything ready?

Start walkthrough