Skip to main content
Community template Uses AIInternal WikiAI RAG

RAG Starter Template using Simple Vector Stores, Form trigger and OpenAI - n8n workflow template

This template quickly shows how to use RAG in n8n. This template is for everyone who wants to start giving knowledge to their Agents through RAG. Have a PDF with custom knowledge that you want to provide to your agent. No setup required. Just hit Execute Workflow, upload your…

Template by n8n Team · Original listing (opens in a new tab)

Starts on
Chat message
Nodes
8 nodes
Level
Intermediate
Setup
About 11 min

Workflow preview

How this workflow runs

  1. 1

    Upload your file here

    Starts the workflow from a public form submission, capturing the submitted fields.

  2. 2

    When chat message received

    Starts the workflow when a chat message is received through the chat interface.

  3. 3

    Embeddings OpenAI

    Turns text into vector embeddings using OpenAI (for semantic search / RAG).

  4. 4

    Default Data Loader

    Loads and prepares documents for the AI to read (RAG ingestion).

  5. 5

    Query Data Tool

    Stores and retrieves embeddings for retrieval-augmented generation (RAG).

  6. 6

    OpenAI Chat Model

    Provides the OpenAI chat model (GPT) that powers the AI reasoning in this workflow.

  7. 7

    Insert Data to Store

    Stores and retrieves embeddings for retrieval-augmented generation (RAG).

  8. 8

    AI Agent

    The AI agent that orchestrates the workflow — it reasons over the input and decides which tools to call.

Creator's notes and setup

Written by n8n Team for the original listing.

This template quickly shows how to use RAG in n8n.

Who is this for?

This template is for everyone who wants to start giving knowledge to their Agents through RAG.

Requirements

Have a PDF with custom knowledge that you want to provide to your agent.

Setup

No setup required. Just hit Execute Workflow, upload your knowledge document and then start chatting.

How to customize this to your needs

  1. Add custom instructions to your Agent by changing the prompts in it.
  2. Add a different way to load in knowledge to your vector store, e.g. by looking at some Google Drive files or loading knowledge from a table.
  3. Exchange the Simple Vector Store nodes with your own vector store tools ready for production.
  4. Add a more sophisticated way to rank files found in the vector store.

For more information read our docs on RAG in n8n.

n8n nodes used (7 types)

What every node does (8)
  • Upload your file here (Form Trigger)Starts the workflow from a public form submission, capturing the submitted fields.
  • Embeddings OpenAI (Embeddings Open AI)Turns text into vector embeddings using OpenAI (for semantic search / RAG).
  • Default Data Loader (Document Default Data Loader)Loads and prepares documents for the AI to read (RAG ingestion).
  • Insert Data to Store (Vector Store In Memory)Stores and retrieves embeddings for retrieval-augmented generation (RAG).
  • Query Data Tool (Vector Store In Memory)Stores and retrieves embeddings for retrieval-augmented generation (RAG).
  • AI Agent (Agent)The AI agent that orchestrates the workflow — it reasons over the input and decides which tools to call.
  • When chat message received (Chat Trigger)Starts the workflow when a chat message is received through the chat interface.
  • OpenAI Chat Model (LLM Chat Open AI)Provides the OpenAI chat model (GPT) that powers the AI reasoning in this workflow.

FAQ

RAG Starter Template using Simple Vector Stores, Form trigger and OpenAI: questions

How do I import the "RAG Starter Template using Simple Vector Stores, Form trigger and OpenAI" workflow into n8n?

Copy the workflow JSON from this page, open the n8n editor, click on an empty canvas and paste with Ctrl+V (Cmd+V on macOS). You can also download the .json file and choose Import from File in the workflow menu. Save the workflow, then attach credentials before activating it.

Which nodes and credentials does "RAG Starter Template using Simple Vector Stores, Form trigger and OpenAI" use?

It uses Agent, Embeddings Open AI, LLM Chat Open AI, Vector Store In Memory, Form Trigger and Document Default Data Loader, plus 1 more. Any node that connects to an external service needs your own credential — open each node after import and select or create one. Trigger, logic and transformation nodes usually need no credentials.

Can it run on n8n Cloud and on self-hosted n8n?

The workflow format is the same on both. If a node appears as unknown or outdated after import, update n8n to a recent version or, on self-hosted instances, install the required community node package. Features such as $env access are available on self-hosted instances only.

How can I customise "RAG Starter Template using Simple Vector Stores, Form trigger and OpenAI"?

Start by changing the trigger (schedule, webhook or app event) and the destination nodes to match your stack — it is listed under Internal Wiki, AI RAG. Edit prompts, field mappings and filters in the relevant nodes, use expressions like {{ $json.field }} to map data, and test with a manual execution before activating.

n8n is a trademark of n8n GmbH. AltFTool is not affiliated with, endorsed by or sponsored by n8n. Community templates are credited to their creators and link to the original listing; AltFTool originals are written and tested by the AltFTool team.

About this page

Free n8n workflow templates to copy and import

The AltFTool n8n library collects free n8n workflow templates for AI agents, Gmail, Google Sheets, Telegram and other apps. Each workflow page shows a preview, the list of nodes and the credentials it needs, and lets you copy or download the JSON to import into your own n8n.

Search the templates by app or task, or browse them by category and by node. The Workflow Inspector checks any workflow JSON for triggers, credentials and hardcoded keys before you share it, and the expressions cheat sheet gives copy-paste n8n expression examples. AltFTool is not affiliated with n8n.

People also search for

  • n8n workflow templates
  • n8n templates
  • n8n automation examples
  • n8n json workflows
  • n8n nodes
  • free n8n workflow templates
  • n8n ai agent template
  • n8n expressions cheat sheet