← All N8N workflows
AI & researchAgentChain Retrieval QaChat TriggerCodeDocument Default Data Loader

RAG with PDF as source

Configured with Agent, Chain Retrieval Qa, Chat Trigger, Document Default Data Loader, and additional nodes. Review the connections and setup before adapting this template.

Workflow preview
MessagingSend messageSlackCodeExecute JavaScriptCodeTransformRecursive CharacterText SplitterText Splitter Recursive …AI & modelsEmbeddings OpenAIEmbeddings Open AiFiles / mediaDefault Data LoaderDocument Default Data Lo…AI & modelsOpenAI Chat ModelOpenAI Chat ModelAI & modelsEmbeddings OpenAI2Embeddings Open AiAI & modelsVector Store RetrieverRetriever Vector StoreWeb / APIDownload PDFHTTP RequestRoutingPDFs to downloadNo OpData storeRead Pinecone VectorStoreVector Store PineconeAI & modelsQuestion and AnswerChainChain Retrieval QaAI & modelsAnthropic Chat ModelAnthropic Chat ModelWeb / APIGet calendaravailabilityTool Http RequestAI & modelsAppointment bookingagentAgentData storeWindow Buffer MemoryMemory Buffer WindowData storeInsert into Pineconevector storeVector Store PineconeWeb / APIBook appointmentTool Http RequestTriggerWhen chat messagereceivedChat TriggerAI & modelsOpenAI Chat Model1OpenAI Chat ModelMessagingAdd automation labelGmailTriggerOn new email tonathan's inboxGmail TriggerMessagingAdd music labelGmailAI & modelsAssign label with AIText ClassifierTriggerWebhookWebhookRoutingWhether email containsn8nIf

Node categories in this workflow

  • Messaging
  • Code
  • Transform
  • AI & models
  • Files / media
  • Web / API
  • Routing
  • Data store
  • Trigger

Icons describe general node roles, inferred from node types. Inspect the parameters for the configured action.

Drag to pan; use + and − to zoom. Reconstructed from the exported node positions; nothing runs here. Dashed lines represent non-main connections. Full node names and notes appear below.

How it works

The exported workflow contains the following configured nodes. Their connections are shown above; inspect the JSON for the complete logic, expressions, and external actions.

Workflow node names, types, and operations
NodeCategoryTypeOperation
Send messageMessagingSlackSee node parameters
Execute JavaScriptCodeCodeSee node parameters
Recursive Character Text SplitterTransformText Splitter Recursive Character Text SplitterSee node parameters
Embeddings OpenAIAI & modelsEmbeddings Open AiSee node parameters
Default Data LoaderFiles / mediaDocument Default Data LoaderSee node parameters
OpenAI Chat ModelAI & modelsOpenAI Chat ModelSee node parameters
Embeddings OpenAI2AI & modelsEmbeddings Open AiSee node parameters
Vector Store RetrieverAI & modelsRetriever Vector StoreSee node parameters
Download PDFWeb / APIHTTP RequestSee node parameters
PDFs to downloadRoutingNo OpSee node parameters
Read Pinecone Vector StoreData storeVector Store PineconeSee node parameters
Question and Answer ChainAI & modelsChain Retrieval QaSee node parameters
Anthropic Chat ModelAI & modelsAnthropic Chat ModelSee node parameters
Get calendar availabilityWeb / APITool Http RequestPOST
Appointment booking agentAI & modelsAgentSee node parameters
Window Buffer MemoryData storeMemory Buffer WindowSee node parameters
Insert into Pinecone vector storeData storeVector Store PineconeSee node parameters
Book appointmentWeb / APITool Http RequestPOST
When chat message receivedTriggerChat TriggerSee node parameters
OpenAI Chat Model1AI & modelsOpenAI Chat ModelSee node parameters
Add automation labelMessagingGmailaddLabels
On new email to nathan's inboxTriggerGmail TriggerSee node parameters
Add music labelMessagingGmailaddLabels
Assign label with AIAI & modelsText ClassifierSee node parameters
WebhookTriggerWebhookSee node parameters
Whether email contains n8nRoutingIfSee node parameters

Setup

  1. Download the JSON and import it into an isolated n8n instance. Leave the workflow inactive.
  2. Connect your own credentials through n8n’s credential store. Replace REPLACE_WITH_* values with your resource identifiers.
  3. Inspect API destinations, Code nodes, database queries, file paths, and outbound actions.
  4. Run with synthetic data and harmless destinations. Enable triggers only after checking the actual outputs.

Requirements

An n8n instance with the listed node types and compatible versions. Service-connected workflows may require accounts, credentials, or paid APIs.

Credential types declared in the source

None declared. HTTP requests and Code nodes may still need configuration.

Workflow notes

Sticky Note2

PDFs to download

BTC Whitepaper + metadata

A. Load PDF into Pinecone

A. Load PDF into Pinecone

Download the PDF, then text embeddings into Pincecone

B. Chat with PDF

B. Chat with PDF

Use GPT4o to chat with Pinecone index

Sticky Note1
Sticky Note8

BTC Whitepaper references

Connect with me or explore this demo 👇

Connect with me or explore this demo 👇

Explore 100+ AI Workflow templates on n8n.io

Explore 100+ AI Workflow templates on n8n.io

Open Templates Library

Ask a question in our community (13k+ members)

Ask a question in our community (13k+ members)

Explore n8n community

RAG with PDF as source

RAG with PDF as source

Purpose and structure

This folder contains the RAG with PDF as source workflow. Its executable nodes use agent, chainRetrievalQa, chatTrigger, code, documentDefaultDataLoader, embeddingsOpenAi, gmail, gmailTrigger, httpRequest, if, lmChatAnthropic, lmChatOpenAi, memoryBufferWindow, noOp, retrieverVectorStore, slack, textClassifier, textSplitterRecursiveCharacterTextSplitter, toolHttpRequest, vectorStorePinecone, webhook. The table and connection map below are derived from the JSON, not an inferred guarantee of behavior.

Setup

Import inactive. Configure your own credentials and replace REPLACE_WITH_* values. Review external destinations and Code nodes before running.

Entry points

When chat message received, On new email to nathan's inbox, Webhook

Verification

Sanitized source candidate; not runtime-tested. This overview is generated from node metadata. Read the folder README for the connection map, credential types, and license.

Attribution

https://github.com/Zie619/n8n-workflows/blob/94007c1445d9258a7da116646b79473e7c7c3282/workflows/Code/0548_Code_Webhook_Create_Webhook.json MIT; preserve source notices.

Canvas section labels

These name areas of the original canvas; they do not include explanatory instructions.

  • What is n8n?
  • Example #2
  • Example #3
  • Example #1
  • Thank you and happy flowgramming 🤘

More in AI & research