Bulk RAG Query Processing using Lookio and CSV Uploads - n8n Workflow

Automate bulk RAG queries by uploading a CSV to this n8n workflow. Integrate Lookio to enrich data quickly, demonstrating powerful n8n templates for AI tasks.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

Data analysts needing to execute high-volume knowledge base queries.
Users looking for specialized n8n templates for integrating RAG systems like Lookio.
Technical users wanting to leverage an n8n trigger to initiate file processing.
Teams seeking efficient ways to enrich existing datasets using AI automation.

Overview

This automation solves the pain point of running repetitive, high-volume queries against a Retrieval-Augmented Generation (RAG) knowledge base. Instead of querying individually, users can upload a single CSV file containing all their prompts. This robust n8n workflow extracts the data, validates the input structure, iterates over every row, sends each query to the specified Lookio assistant, and finally aggregates all responses into a new, enriched CSV file for immediate download. This powerful n8n solution ensures data consistency and dramatically speeds up large-scale knowledge retrieval tasks, showcasing the potential of advanced n8n templates.

How it Works

The process begins with the On form submission n8n trigger, which allows users to upload a CSV file.


  1. File Extraction & Validation: The workflow uses the Extract all rows n8n node to parse the CSV content. After aggregation, the Valid Query column? IF node checks if a column named 'Query' exists, essential for processing. If the column is missing, an error message is displayed via the form.

  2. Batch Processing: If valid, the data is split into individual rows using Split Out and prepared for iteration by the Loop Over Queries n8n node (a Split In Batches node).

  3. API Execution: Inside the loop, the Isolate the Query column n8n node prepares the input. The Lookio API call n8n node then sends the specific query to the configured Lookio assistant, retrieving the RAG response.

  4. Data Recombination: The Prepare output n8n node captures both the original query and the new 'Response' generated by Lookio.

  5. Output Generation: Once all queries are processed, the aggregated data is passed to the Generate enriched CSV n8n node, which creates a new binary file named 'Lookio bulk result'.

  6. Download: Finally, the Form ending and file download n8n node presents this enriched file for the user to download, completing the n8n workflow.

Installation Guide

To deploy this n8n workflow template, follow these steps:


  1. Import: Copy the n8n workflow JSON and paste it into your n8n instance using the 'New' menu -> 'Import from JSON'.

  2. Lookio Setup: You must have an active Lookio account and an assistant configured with your relevant documents.

  3. Credential Configuration: Navigate to the Lookio API call n8n node.

Replace in the api_key header with your actual Lookio API Key.
Replace in the body parameters with the ID of your target Lookio assistant.

  1. Activation: Ensure the n8n workflow is set to 'Active'. The On form submission n8n trigger will provide a public URL for users to upload files.

  2. Testing: Prepare a CSV file that includes a case-sensitive column named 'Query' for successful execution of this n8n workflow.

Node Details

On form submission (n8n trigger): This is the starting point, acting as the primary n8n trigger. It is configured to accept a single file upload of type .csv and requires the file to be present.
Extract all rows: Parses the uploaded binary CSV data into JSON objects (rows), making it readable by subsequent n8n nodes.
Valid Query column? (IF n8n node): Performs crucial validation, checking for the existence of the Query field in the first item's data to ensure the bulk process can proceed.
Loop Over Queries (Split In Batches n8n node): This n8n node iterates over every single query row extracted from the CSV, enabling parallel or sequential processing of large datasets.
Lookio API call (HTTP Request n8n node): The core AI integration step. It uses a POST method to send the Query, along with the necessary assistantid and apikey (configured in the headers and body) to the Lookio RAG endpoint. This critical n8n node executes the core RAG function.
Prepare output (Set n8n node): Maps the original Query and the new Response from the Lookio API call into a standardized output format for the final CSV generation.
Generate enriched CSV (Convert To File n8n node): Takes the aggregated JSON responses and transforms them back into a single binary CSV file named 'Lookio bulk result'.
Form ending and file download: Handles the final user interaction by providing the generated binary file for download, concluding the n8n workflow execution.

Related n8n Workflows

Free

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

AI and automation expert

Featured*