Chat with PDF docs using AI (quoting sources)

1. Setup: Fetch file from Google Drive, split it into chunks and insert into a vector database Note that running this part multiple times will insert multiple copies into your DB

Workflow Structure (18 nodes)
100%
Manual Trigger
When clicking "Execute Workflow"
Set
Set file URL in Google Drive
Google Drive
Download file
Code
Add in metadata
Langchain.embeddings Open Ai
Embeddings OpenAI
Langchain.vector Store Pinecone
Add to Pinecone vector store
Langchain.document Default Data Loader
Default Data Loader
Langchain.chat Trigger
Chat Trigger
Set
Set max chunks to send to model
Langchain.embeddings Open Ai
Embeddings OpenAI2
Langchain.vector Store Pinecone
Get top chunks matching query
Code
Prepare chunks
Langchain.text Splitter Recursive Character Text Splitter
Recursive Character Text Splitter
Langchain.chain Llm
Answer the query based on chunks
Langchain.lm Chat Open Ai
OpenAI Chat Model
Langchain.output Parser Structured
Structured Output Parser
Set
Compose citations
Set
Generate response
Node Types:
trigger
default
transform
code
action
logic
Requires credentials

Prerequisites

Required Credentials (3)

Google Drive

Used by: Download file

Docs

OpenAI

Used by: Embeddings OpenAI, Embeddings OpenAI2 +1 more

Docs

Pinecone

Used by: Get top chunks matching query, Add to Pinecone vector store

Docs

Multiple services required

This workflow needs 3 different credentials. Make sure you have accounts for all services before importing.

Complexity

Advanced

Expert level. Custom code, complex logic, many integrations.

Setup time: ~50 min
Score: 64/100
Custom Code

When to Use This Workflow

Real-time Response

React instantly when events happen - new orders, form submissions, or API calls.

Zero delay between trigger and action for time-sensitive workflows.

Time Savings

Replace repetitive manual tasks with reliable automation.

Reclaim hours every week for higher-value work.

Error Reduction

Eliminate human error from routine processes with consistent automation.

Improve accuracy and reliability across your workflows.

workflow.json
{
  "meta": {
    "instanceId": "cb484ba7b742928a2048bf8829668bed5b5ad9787579adea888f05980292a4a7",
    "templateId": "1960"
  },
  "nodes": [
    {
      "id": "296a935f-bd02-44bc-9e1e-3e4d6a307e38",
      "name": "When clicking \"Execute Workflow\"",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        260,
        240
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "61a38c00-f196-4b01-9274-c5e0f4c511bc",
      "name": "Embeddings OpenAI",
...

Workflow Details

Nodes
22
Trigger
Event
Source
awesome
Added
Dec 4, 2025

Need Help?

Check out the official n8n documentation for detailed guides.

Related Workflows

Ask questions about a PDF using AI

Load data into database Fetch file from Google Drive, split it into chunks and insert into Pinecone index

Google-drive
Textsplitterrecursivecharactertextsplitter
Embeddingsopenai
Documentdefaultdataloader
16 nodesEvent
Curated

Supabase Insertion & Upsertion & Retrieval

INSERTING - it's important to use the same embedding model when for any interaction with your vector database (inserting...

Google-drive
Documentdefaultdataloader
Chainretrievalqa
Lmchatopenai
21 nodesEvent
Curated

BambooHR AI-Powered Company Policies and Benefits Chatbot

STEP 1: Retrieve company policies and load them into a vector store

Documentdefaultdataloader
Embeddingsopenai
Textsplitterrecursivecharactertextsplitter
Memorybufferwindow
50 nodesEvent
Curated

Chat with GitHub OpenAPI Specification using RAG (Pinecone and OpenAI)

Indexing content in the vector database This part of the workflow is responsible for extracting content, generating embe...

Http-request
Vectorstorepinecone
Documentdefaultdataloader
Textsplitterrecursivecharactertextsplitter
17 nodesEvent
Curated

Advanced AI Demo (Presented at AI Developers #14 meetup)

![h](https://i.postimg.cc/9XLvL5dL/slide-sf-talk.pngfull-width)

Slack
Textsplitterrecursivecharactertextsplitter
Embeddingsopenai
Documentdefaultdataloader
39 nodesEvent
Curated

Automate SIEM Alert Enrichment with MITRE ATT&CK, Qdrant & Zendesk in n8n

![n8n](https://uploads.n8n.io/templates/qdrantlogo.png) Embed your Vector Store To provide data for your Vector store,...

Chat
Agent
Lmchatopenai
Embeddingsopenai
26 nodesEvent
Curated