Skip to main content

Build a company website RAG chatbot using Apify, Pinecone and Gemini

Workflow preview

Workflow preview
100%
Build a company website RAG chatbot using Apify, Pinecone and Gemini preview
Open on n8n.io

1. Workflow Overview

AI chatbots are only as good as the data they learn from. Most large language models (LLM) rely only on their training datasets. If you want the chatbots to know more about your business, the best ...

Best for

  • Support Chatbot automation workflows
  • AI RAG automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

@n8n/n8n-nodes-langchain.vectorstorepinecone, @n8n/n8n-nodes-langchain.embeddingsgooglegemini, @n8n/n8n-nodes-langchain.documentdefaultdataloader, @n8n/n8n-nodes-langchain.textsplitterrecursivecharactertextsplitter, @n8n/n8n-nodes-langchain.agent, @n8n/n8n-nodes-langchain.toolvectorstore, n8n-nodes-base.stickynote, @n8n/n8n-nodes-langchain.memorybufferwindow

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Fabian Maume.

Original n8n.io source

1.1 Workflow description

Title
Build a company website RAG chatbot using Apify, Pinecone and Gemini
Workflow name
Build a company website RAG chatbot using Apify, Pinecone and Gemini

AI chatbots are only as good as the data they learn from. Most large language models (LLM) rely only on their training datasets.

If you want the chatbots to know more about your business, the best is to implement a retrieval-augmented generation (RAG) pipeline to train Gemini with your website data. This is what this workflow will help you to do.

This workflow uses a scheduler to scrape a website on a regular basis using Apify; web pages are then indexed or updated in a Pinecone vector database. This allows the chatbot to provide accurate and up-to-date information. The workflow uses Google's Gemini AI for both embeddings and response generation.

How does it work?

This workflow is split into 2 sub-logics highlighted with green sticky notes:

  • RAG Training logic
  • Chatbot logic

RAG training logic

  1. Use the Apify Website Content Crawler to retrieve all content from your website
  2. The Pinecone Vector Store node indexes the text chunk in a Pinecone index.
  3. The Embeddings Google Gemini node generates embeddings for each text chunk

Chatbot logic

  1. The Chat Trigger node receives user questions through a chat interface. An AI Agent node handles those requests.
  2. The AI Agent node uses a Vector Store Tool node, linked to a Pinecone Vector Store node in query mode, to retrieve relevant text chunks from Pinecone based on the user's question.
  3. The AI Agent sends the retrieved information and the user's question to the Google Gemini Chat Model (gemini-pro).

How to set up this template?

All nodes with an orange sticky note require setup.

Get your tools set up:

1 Google Cloud Project and Vertex AI API:

  • Create a Google Cloud project.
  • Enable the Vertex AI API for your project.
  • Obtain a Google AI API key from Google AI Studio

2 Get an Apify account

3 Pinecone Account:

  • Create a free account on the Pinecone website.
  • Obtain your API key from your Pinecone dashboard.
  • Create an index named company-website in your Pinecone project.

Configure credentials in your n8n environment for:

  • Google Gemini(PaLM) Api (using your Google AI API key)
  • Pinecone API (using your Pinecone API key)

Setup trigger frequency:

  • Edit the Schedule Trigger to match the frequency at which you wish to update your RAG
  • If you want to train your chatbot only once, you can replace it with a click trigger.

Set up the Apify node

  • Authenticate (via OAuth or API)
  • Set up your website URL in the JSON input

FAQ

What is RAG?

RAG stands for retrieval-augmented generation. It is a technique that provides an AI model (such as a large language model) with additional data. That allows the LLM to give more up-to-date and topic-specific information.

What is the difference between RAG and LLM?

RAG is a way to complement an LLM by giving it more up-to-date information. You can think of the LLM as the CPU processing your question, and RAG as the hard drive providing information.

Do I have to use my website as training data?

No. Website Content Crawler can scrape any website. So you can, in theory, use this template to build a RAG for someone else. You can even combine data from multiple websites.

Can I use another model other than Gemini?

In theory, yes. You could replace the Gemini node with another LLM model. If you are looking for inspiration about RAG implementation with the Ollama model, check out this template.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Pinecone Vector Store

Type / Role
@n8n/n8n-nodes-langchain.vectorStorePinecone - vectorStorePinecone
Config choices
Version 1

Block 2 - Embeddings Google Gemini

Type / Role
@n8n/n8n-nodes-langchain.embeddingsGoogleGemini - embeddingsGoogleGemini
Config choices
Version 1

Block 3 - Default Data Loader

Type / Role
@n8n/n8n-nodes-langchain.documentDefaultDataLoader - documentDefaultDataLoader
Config choices
Version 1

Block 4 - Recursive Character Text Splitter

Type / Role
@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter - textSplitterRecursiveCharacterTextSplitter
Config choices
Version 1

Block 5 - AI Agent

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 1.7

Block 6 - Vector Store Tool

Type / Role
@n8n/n8n-nodes-langchain.toolVectorStore - toolVectorStore
Config choices
Version 1

Block 7 - Pinecone Vector Store (Retrieval)

Type / Role
@n8n/n8n-nodes-langchain.vectorStorePinecone - vectorStorePinecone
Config choices
Version 1

Block 8 - Embeddings Google Gemini (retrieval)

Type / Role
@n8n/n8n-nodes-langchain.embeddingsGoogleGemini - embeddingsGoogleGemini
Config choices
Version 1

Block 9 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 10 - Window Buffer Memory

Type / Role
@n8n/n8n-nodes-langchain.memoryBufferWindow - memoryBufferWindow
Config choices
Version 1.3

Block 11 - When chat message received

Type / Role
@n8n/n8n-nodes-langchain.chatTrigger - chatTrigger
Config choices
Version 1.1

Block 12 - Google Gemini Chat Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - lmChatGoogleGemini
Config choices
Version 1

Block 13 - Google Gemini Chat Model (retrieval)

Type / Role
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - lmChatGoogleGemini
Config choices
Version 1

Block 14 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 15 - Schedule Trigger

Type / Role
n8n-nodes-base.scheduleTrigger - scheduleTrigger
Config choices
Version 1.3

Block 16 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 17 - Sticky Note3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 18 - Scrape website data

Type / Role
@apify/n8n-nodes-apify.apify - apify
Config choices
Version 1

Block 19 - Sticky Note4

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 20 - Sticky Note5

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 21 - Sticky Note6

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 22 - Sticky Note7

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 23 - Sticky Note8

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 24 - Sticky Note9

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Showing the first 24 of 25 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow Build a company website RAG chatbot using Apify, Pinecone and Gemini
Complexity advanced
Nodes 25
Categories Support Chatbot, AI RAG
Author Fabian Maume
Published 18 Mar 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/14157/14157.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Build a company website RAG chatbot using Apify, Pinecone and Gemini do?

AI chatbots are only as good as the data they learn from. Most large language models (LLM) rely only on their training datasets. If you want the chatbots to know more about your business, the best ...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Support Chatbot, AI RAG use case.