Client FAQ Bot with RAG using Google Drive and Azure AI - n8n Workflow

Use this powerful n8n workflow to build a custom RAG system. Connect Google Drive documents to Azure OpenAI for automated, context-aware client FAQ responses, initiated by an n8n trigger.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?


  • Technical teams needing to deploy internal knowledge base chatbots quickly.

  • Developers looking for advanced n8n templates integrating Langchain and Azure AI services.

  • Businesses requiring automated FAQ systems based on constantly updated documents stored in Google Drive.

  • Anyone seeking a robust example of a complex n8n workflow combining file operations and AI.

Overview

This comprehensive n8n workflow solves the problem of generating accurate, context-specific AI responses based on proprietary or internal documentation. Instead of relying solely on the LLM's training data, this n8n workflow searches Google Drive for relevant documents (like PDFs or FAQs), retrieves the content, and then uses that content as context for the Azure OpenAI large language model. This process, known as RAG, dramatically reduces hallucination and ensures responses are grounded in current source material. This specific n8n template starts with an API call using the Webhook n8n trigger, making it easily embeddable into any application or chat interface.

How it Works

The entire process is initiated by the Webhook n8n trigger, which receives the user's query.


  1. Input Preparation: The initial Edit Fields n8n node structures the incoming query data.

  2. Document Retrieval: The Search files and folders (Google Drive) n8n node locates documents in Google Drive relevant to the query.

  3. File Download: The Download File n8n node retrieves the selected documents from Google Drive into the n8n execution context.

  4. Batch Processing: The Loop Over Items n8n node ensures that if multiple documents are retrieved, they are processed sequentially or in batches.

  5. Content Extraction: The Extract from File n8n node handles file conversion, pulling plain text content from complex file types (like PDFs) for use as context.

  6. Context Formatting: The Edit Fields1 n8n node prepares the extracted text into the structured format required by the Langchain model.

  7. RAG Execution: The Basic LLM Chain n8n node integrates the Azure OpenAI Chat Model with the retrieved document context. This Langchain n8n node is where the RAG operation is performed, synthesizing the final answer.

  8. Final Output: The resulting answer is immediately returned to the calling system using the Return Answer n8n node.

Installation Guide

To deploy this n8n workflow, follow these steps:


  1. Import: Copy the provided JSON and import it directly into your n8n instance using the 'New' button and selecting 'Import Workflow from JSON'.

  2. Credentials Setup:

Google Drive: Set up your Google Drive credential. The nodes require access to search and download the specified files.
Azure OpenAI: Configure your Azure OpenAI credential. This requires the Azure API Key, endpoint URL, and deployment name for your model (e.g., GPT-4o-mini).

  1. Webhook Activation: Activate the initial Webhook n8n trigger node to generate its unique URL. This URL is your API endpoint.

  2. Configuration: Review the Search files and folders n8n node parameters to ensure it targets the correct Google Drive folder or file names containing your FAQ documents.

  3. Test: Execute the n8n workflow manually or by posting a test query to the generated webhook URL.

Node Details

Webhook (n8n trigger): Initiates the entire n8n workflow upon receiving an HTTP request. It’s configured with a specific webhook ID (f7b61aa4-937f-4deb-adca-9842956ec0b2) to act as the primary API endpoint.
Google Drive (Search files and folders): This n8n node is crucial for the RAG setup, searching your cloud storage for documents that might contain the answer to the user's query.
Google Drive (Download File): Retrieves the binary content of the files identified in the previous step, preparing them for text extraction.
Extract from File: A utility n8n node that handles file parsing, converting formats like PDF into usable text strings that serve as the contextual data for the LLM.
Loop Over Items (Split In Batches): Manages the processing when multiple files are downloaded, ensuring each file's content is fed into the RAG system sequentially.
Azure OpenAI Chat Model: Defines the AI model used for generation. This connection uses Azure credentials and will typically specify a cost-effective, high-performance model like GPT-4o-mini.
Basic LLM Chain (Langchain n8n node): This is the core RAG processor. It takes the user query and the extracted document text (context) and structures the prompt for the Azure model to synthesize a grounded answer. This n8n node is essential for implementing context-aware AI solutions.
Return Answer: The final n8n node that sends the generated response back to the client system that initially called the n8n trigger.

Related n8n Workflows

Paid

Nodes: 9 Nodes
Updated: December 26 2025
View all
Created by

Rahul Joshi is a seasoned technology leader specializing in the n8n automation tool and AI-driven workflow automation. With deep expertise in building open-source workflow automation and self-hosted automation platforms, he helps organizations eliminate manual processes through intelligent n8n ai agent automation solutions.

Featured*