🔬 Run bulk RAG queries from CSV with Lookio

⚡ 334 views · 🔬 Document Extraction & Analysis

Description

This template processes a CSV of questions and returns an enriched CSV with RAG-based answers produced by your Lookio assistant.

Upload a CSV that contains a column named Query, and the workflow will loop through every row, call the Lookio API, and append a Response column containing the assistant’s answer.

It’s ideal for batch tasks like drafting RFP responses, pre-filling support replies, generating knowledge-checked summaries, or validating large lists of product/customer questions against your internal documentation.

Who is this for?

What it does / What problem does this solve?

How it works

  1. Form submission: User uploads a CSV via the Form Trigger.
  2. Extract & validate: Extract all rows reads the CSV and Aggregate rows checks for a Query column.
  3. Per-row loop: Split Out and Loop Over Queries iterate rows; Isolate the Query column normalizes data.
  4. Call Lookio: Lookio API call posts each query to your assistant and returns the answer.
  5. Build output: Prepare output appends Response values and Generate enriched CSV creates the downloadable file delivered by Form ending and file download.

Why use Lookio for high quality RAG?

While building a native RAG pipeline in n8n offers granular control, achieving consistently high-quality and reliable results requires significant effort in data processing, chunking strategy, and retrieval logic optimization. Lookio is designed to address these challenges by providing a managed RAG service accessible via a simple API.

It handles the entire backend pipeline—from processing various document formats to employing advanced retrieval techniques—allowing you to integrate a production-ready knowledge source into your workflows. This approach lets you focus on building your automation in n8n, rather than managing the complexities of a RAG infrastructure.

How to set up

  1. Create a Lookio assistant: Sign up at https://www.lookio.app/, upload documents, and create an assistant.
  2. Get credentials: Copy your Lookio API Key and Assistant ID.
  3. Configure the workflow nodes:
    • In the Lookio API call HTTP Request node, replace the api_key header value with your Lookio API Key and update assistant_id with your Assistant ID (replace placeholders like <your-lookio-api-key> and <your-assistant-id>).
    • Ensure the Form Trigger is enabled and accepts a .csv file.
  4. CSV format: Ensure the input CSV has a column named Query (case-sensitive as configured).
  5. Activate the workflow: Run a test upload and download the enriched CSV.

Requirements

How to take it further

🔗 Nodes Used

HTTP Request, n8n Form Trigger, Convert to File, Extract from File, n8n Form

📥 Import

Download workflow.json and import into n8n: Workflow menu → Import from File

📖 Importing guide · 🔑 Credential setup