Skip to content
FlowHubFluxonLab
B
AI Automationfree

Chat with PDF docs using AI (quoting sources)

by David Robertsadapted from n8n official workflow galleryUpdated Aug 2026
RequiresBBasic LLM ChainCCodeDDefault Data LoaderEmbeddings OpenAIEmbeddings OpenAIGoogle DriveGoogle DriveOpenAI Chat ModelOpenAI Chat ModelPinecone Vector StorePinecone Vector StoreRecursive Character Text SplitterRecursive Character Text SplitterStructured Output ParserStructured Output Parser
Share Post Share
MaWhen clicking "Execute Workflow"When clicking "…VSPinecone Vector StorePinecone Vector…ChWhen chat message receivedWhen chat messa…OpenAI Chat Model1OpenAI Chat Mod…SeSet file URL in Google DriveSet file URL in…Download fileDDDefault Data LoaderDefault Data Lo…Embeddings OpenAI2Embeddings Open…Embeddings OpenAIEmbeddings Open…TSRecursive Character Text SplitterRecursive Chara…SeSet max chunks to send to modelSet max chunks …VSGet top chunks matching queryGet top chunks …CoPrepare chunksIEAnswer the query based on chunksAnswer the quer…SeCompose citationsCompose citatio…SeGenerate responseGenerate respon…123456
1/5
FLOWS
STEPS · 6
Run manually by an operator

This workflow allows you to ask questions about a PDF document. The answers are provided by an AI model of your choice, and the answer includes a citation pointing to the information it used. You can use n8n’s built-in chat interface to ask the questions, or you could customise this workflow to use another one (e.g. Slack, Teams, etc.) Example The workflow is set up with the Bitcoin whitepaper. So you could ask things like: Question: “Which email provider does the creator of Bitcoin use?“ Answer: “GMX [Bitcoin whitepaper.pdf, lines 1-35]” Requirements A Pinecone account (they have a free tier at the time of writing that is easily enough for this workflow) Access to a large language model (e.g. an OpenAI account) Customizing this workflow The workflow only reads in one document, but you could customise it to read in all the documents in a folder (or more). The workflow is set up to use GPT 3.5, but you could swap that out for any other model (including self-hosted ones).

Tags

n8nreference-onlychain-llmdocument-default-data-loaderembeddings-open-aigoogle-drivelm-chat-open-aioutput-parser-structuredtext-splitter-recursive-character-text-splittervector-store-pinecone
Connects
BBasic LLM ChainCCodeDDefault Data LoaderembeddingsopenaiEmbeddings OpenAIgoogledriveGoogle DriveopenaichatmodelOpenAI Chat Model
CategoryAI Automation
Triggermanual
Complexitycomplex
Nodes16
AddedMar 5, 2024

Related workflows

See all AI Automation
ABCD
free

Run AI employee onboarding with Groq, Google Workspace, and Gemini

Quick overview This workflow ingests onboarding documents from Google Drive into an in-memory vector store with Google Gemini embeddings, then runs a multi-channel onboarding chatbot powered by Groq, sends role-based welcome emails via Gmail when a new hire appears in Google Sheets, and schedules day 1/7/30 check-in emails. How it works Manually runs an ingestion flow that lists files in a specified Google Drive folder, downloads them, extracts text, and indexes them into an in-memory vector store using Google Gemini embeddings. Receives employee questions via n8n Chat (and optionally Slack or Telegram), normalizes the message into a single format, and rejects empty or overly long inputs. Uses a Groq LLM agent with per-user session memory to retrieve relevant excerpts from the in-memory company_docs knowledge base and generate a grounded answer, or directs the user to HR when no relevant content is found. Routes the assistant’s response back to the originating channel (n8n Chat, and optionally Slack or Telegram). Triggers every minute on updates to a Google Sheets “Hires” sheet, validates rows marked as Hired, and skips hires already present in the “Tracking” sheet. Builds a depart

by Yash Kabra
binaryinputloaderembeddingsopenaigoogledriveopenaichatmodel
free

Ask questions about a PDF using AI

The workflow first populates a Pinecone index with vectors from a Bitcoin whitepaper. Then, it waits for a manual chat message. When received, the chat message is turned into a vector and compared to the vectors in Pinecone. The most similar vectors are retrieved and passed to OpenAI for generating a chat response. Note that to use this template, you need to be on n8n version 1.19.4 or later.

by David Roberts
ACDgmail
free

AI: Summarize podcast episode and enhance using Wikipedia

The workflow automates the process of creating a summarized and enriched podcast digest, which is then sent via email. Note that to use this template, you need to be on n8n version 1.19.4 or later.

by n8n Team