Back to Catalog

Run bulk RAG queries from CSV with Lookio

Guillaume DuvernayGuillaume Duvernay
293 views
2/3/2026
Official Page

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?

  • Knowledge managers & technical writers: Produce draft answers to large question sets using your company docs.
  • Sales & proposal teams: Auto-generate RFP answer drafts informed by internal docs.
  • Support & operations teams: Bulk-enrich FAQs or support ticket templates with authoritative responses.
  • Automation builders: Integrate Lookio-powered retrieval into bulk data pipelines.

What it does / What problem does this solve?

  • Automates bulk queries: Eliminates the manual process of running many individual lookups.
  • Ensures answers are grounded: Responses come from your uploaded documents via Lookio, reducing hallucinations.
  • Produces ready-to-use output: Delivers an enriched CSV with a new Response column for downstream use.
  • Simple UX: Users only need to upload a CSV with a Query column and download the resulting file.

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

  • An n8n instance with the ability to host Forms and run workflows
  • A Lookio account (API Key) and an Assistant ID

How to take it further

  • Add rate limiting / retries: Insert error handling and delay nodes to respect API limits for large batches.
  • Improve the speed: You could drastically reduce the processing time by parallelizing the queries instead of doing them one after the other in the loop. For that, you could use HTTP request nodes that would trigger your sort of sub-workflow.
  • Store results: Add an Airtable or Google Sheets node to archive questions and responses for audit and reuse.
  • Post-process answers: Add an LLM node to summarize or standardize responses, or to add confidence flags.
  • Trigger variations: Replace the Form Trigger with a Google Drive or Airtable trigger to process CSVs automatically from a folder or table.

n8n Form Triggered Bulk RAG Query Processor

This n8n workflow provides a robust solution for processing bulk RAG (Retrieval Augmented Generation) queries. It's designed to accept CSV data via an n8n form, extract the queries, process them in batches through an external API, and then aggregate the results. This workflow is ideal for scenarios where you need to run a large number of RAG queries based on a dataset.

What it does

This workflow automates the following steps:

  1. Triggered by Form Submission: The workflow starts when a user submits data through an n8n form.
  2. Extracts CSV Data: It takes the submitted CSV file, extracts its content, and converts it into individual data items for processing.
  3. Loops Over Items in Batches: The extracted data items are then processed in batches, allowing for efficient handling of large datasets and managing API rate limits.
  4. Prepares Query for API: For each item in a batch, it sets up the necessary data fields (e.g., query, id) required for the external RAG API call.
  5. Submits RAG Query to API: It makes an HTTP POST request to a specified RAG API endpoint, sending the prepared query data.
  6. Checks API Response: It evaluates the API response. If the API call is successful (e.g., status code 200), it proceeds to process the results.
  7. Aggregates Results: After all batches are processed and API calls are made, the workflow aggregates all the successful RAG query results into a single output.

Prerequisites/Requirements

  • n8n Instance: A running n8n instance to import and execute the workflow.
  • External RAG API Endpoint: An accessible HTTP POST endpoint for your Retrieval Augmented Generation (RAG) service. This API should accept query data and return relevant responses.
  • API Key/Authentication (Optional but Recommended): If your RAG API requires authentication, you will need to configure the HTTP Request node with the appropriate credentials (e.g., API key, bearer token).

Setup/Usage

  1. Import the Workflow:

    • Copy the provided JSON workflow definition.
    • In your n8n instance, go to "Workflows" and click "New".
    • Click the "..." menu (three dots) in the top right corner and select "Import from JSON".
    • Paste the JSON content and click "Import".
  2. Configure the n8n Form Trigger:

    • Open the "On form submission" node.
    • Customize the form fields as needed to accept your CSV file. Ensure there's a file upload field that will contain the CSV data.
  3. Configure the Extract from File Node:

    • Open the "Extract from File" node.
    • Ensure the "Input Data" field correctly references the output of your form trigger that contains the CSV file.
    • Set the "File Type" to CSV.
  4. Configure the Loop Over Items Node:

    • Open the "Loop Over Items" node.
    • Adjust the "Batch Size" to control how many queries are sent to your RAG API in a single batch. This can help manage API rate limits.
  5. Configure the Edit Fields Node:

    • Open the "Edit Fields" node.
    • Map the incoming CSV column containing your RAG queries to a field named query (or whatever your RAG API expects).
    • Add any other necessary fields, such as a unique id for each query, which can be derived from the input data.
  6. Configure the HTTP Request Node:

    • Open the "HTTP Request" node.
    • Set the "Method" to POST.
    • Enter the full URL of your RAG API endpoint in the "URL" field.
    • In the "Body Parameters" section, configure the JSON body that your RAG API expects. This will likely involve referencing the query field from the previous "Edit Fields" node (e.g., {"query": "{{ $json.query }}"}).
    • If your API requires authentication, add the necessary "Headers" or "Authentication" settings.
  7. Configure the If Node:

    • Open the "If" node.
    • Ensure the condition checks for a successful API response (e.g., {{ $json.statusCode }} is equal to 200). This routes only successful responses to the aggregation step.
  8. Activate the Workflow:

    • Once configured, save the workflow and activate it.
    • You can then access the n8n form URL (found in the "On form submission" node) to upload your CSV and trigger the bulk RAG query process.

Related Templates

Send WooCommerce cross-sell offers to customers via WhatsApp using Rapiwa API

Who Is This For? This n8n workflow enables automated cross-selling by identifying each WooCommerce customer's most frequently purchased product, finding a related product to recommend, and sending a personalized WhatsApp message using the Rapiwa API. It also verifies whether the user's number is WhatsApp-enabled before sending, and logs both successful and unsuccessful attempts to Google Sheets for tracking. What This Workflow Does Retrieves all paying customers from your WooCommerce store Identifies each customer's most purchased product Finds the latest product in the same category as their most purchased item Cleans and verifies customer phone numbers for WhatsApp compatibility Sends personalized WhatsApp messages with product recommendations Logs all activities to Google Sheets for tracking and analysis Handles both verified and unverified numbers appropriately Key Features Customer Segmentation: Automatically identifies paying customers from your WooCommerce store Product Analysis: Determines each customer's most purchased product Smart Recommendations: Finds the latest products in the same category as customer favorites WhatsApp Integration: Uses Rapiwa API for message delivery Phone Number Validation: Verifies WhatsApp numbers before sending messages Dual Logging System: Tracks both successful and failed message attempts in Google Sheets Rate Limiting: Uses batching and wait nodes to prevent API overload Personalized Messaging: Includes customer name and product details in messages Requirements WooCommerce store with API access Rapiwa account with API access for WhatsApp verification and messaging Google account with Sheets access Customer phone numbers in WooCommerce (stored in billing.phone field) How to Use — Step-by-Step Setup Credentials Setup WooCommerce API: Configure WooCommerce API credentials in n8n (e.g., "WooCommerce (get customer)" and "WooCommerce (get customer data)") Rapiwa Bearer Auth: Create an HTTP Bearer credential with your Rapiwa API token Google Sheets OAuth2: Set up OAuth2 credentials for Google Sheets access Configure Google Sheets Ensure your sheet has the required columns as specified in the Google Sheet Column Structure section Verify Code Nodes Code (get paying_customer): Filters customers to include only those who have made purchases Get most buy product id & Clear Number: Identifies the most purchased product and cleans phone numbers Configure HTTP Request Nodes Get customer data: Verify the WooCommerce API endpoint for retrieving customer orders Get specific product data: Verify the WooCommerce API endpoint for product details Get specific product recommend latest product: Verify the WooCommerce API endpoint for finding latest products by category Check valid WhatsApp number Using Rapiwa: Verify the Rapiwa endpoint for WhatsApp number validation Rapiwa Sender: Verify the Rapiwa endpoint for sending messages Google Sheet Required Columns You’ll need two Google Sheets (or two tabs in one spreadsheet): A Google Sheet formatted like this ➤ sample The workflow uses a Google Sheet with the following columns to track coupon distribution: Both must have the following headers (match exactly): | name | number | email | address1 | price | suk | title | product link | validity | staus | | ---------- | ------------- | ----------------------------------------------- | ----------- | ----- | --- | ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------- | -------- | | Abdul Mannan | 8801322827799 | contact@spagreen.net | mirpur dohs | 850 | | Sharp Most Demanding Hoodie x Nike | https://yourshopdomain/p-img-nike | verified | sent | | Abdul Mannan | 8801322827799 | contact@spagreen.net | mirpur dohs | 850 | | Sharp Most Demanding Hoodie x Nike | https://yourshopdomain/p-img-nike | unverified | not sent | | Abdul Mannan | 8801322827799 | contact@spagreen.net | mirpur dohs | 850 | | Sharp Most Demanding Hoodie x Nike | https://yourshopdomain/p-img-nike | verified | sent | Important Notes Phone Number Format: The workflow cleans phone numbers by removing all non-digit characters. Ensure your WooCommerce phone numbers are in a compatible format. API Rate Limits: Rapiwa and WooCommerce APIs have rate limits. Adjust batch sizes and wait times accordingly. Data Privacy: Ensure compliance with data protection regulations when sending marketing messages. Error Handling: The workflow logs unverified numbers but doesn't have extensive error handling. Consider adding error notifications for failed API calls. Product Availability: The workflow recommends the latest product in a category, but doesn't check if it's in stock. Consider adding stock status verification. Testing: Always test with a small batch before running the workflow on your entire customer list. Useful Links Dashboard: https://app.rapiwa.com Official Website: https://rapiwa.com Documentation: https://docs.rapiwa.com Support & Help WhatsApp: Chat on WhatsApp Discord: SpaGreen Community Facebook Group: SpaGreen Support Website: https://spagreen.net Developer Portfolio: Codecanyon SpaGreen

RapiwaBy Rapiwa
183

Track SDK documentation drift with GitHub, Notion, Google Sheets, and Slack

📊 Description Automatically track SDK releases from GitHub, compare documentation freshness in Notion, and send Slack alerts when docs lag behind. This workflow ensures documentation stays in sync with releases, improves visibility, and reduces version drift across teams. 🚀📚💬 What This Template Does Step 1: Listens to GitHub repository events to detect new SDK releases. 🧩 Step 2: Fetches release metadata including version, tag, and publish date. 📦 Step 3: Logs release data into Google Sheets for record-keeping and analysis. 📊 Step 4: Retrieves FAQ or documentation data from Notion. 📚 Step 5: Merges GitHub and Notion data to calculate documentation drift. 🔍 Step 6: Flags SDKs whose documentation is over 30 days out of date. ⚠️ Step 7: Sends detailed Slack alerts to notify responsible teams. 🔔 Key Benefits ✅ Keeps SDK documentation aligned with product releases ✅ Prevents outdated information from reaching users ✅ Provides centralized release tracking in Google Sheets ✅ Sends real-time Slack alerts for overdue updates ✅ Strengthens DevRel and developer experience operations Features GitHub release trigger for real-time monitoring Google Sheets logging for tracking and auditing Notion database integration for documentation comparison Automated drift calculation (days since last update) Slack notifications for overdue documentation Requirements GitHub OAuth2 credentials Notion API credentials Google Sheets OAuth2 credentials Slack Bot token with chat:write permissions Target Audience Developer Relations (DevRel) and SDK engineering teams Product documentation and technical writing teams Project managers tracking SDK and doc release parity Step-by-Step Setup Instructions Connect your GitHub account and select your SDK repository. Replace YOURGOOGLESHEETID and YOURSHEET_GID with your tracking spreadsheet. Add your Notion FAQ database ID. Configure your Slack channel ID for alerts. Run once manually to validate setup, then enable automation.

Rahul JoshiBy Rahul Joshi
31

Automate Gmail responses with GPT and human-in-the-loop verification

Try It Out! This n8n template uses AI to automatically respond to your Gmail inbox by drafting response for your approval via email. How it works Gmail Trigger monitors your inbox for new emails AI Analysis determines if a response is needed based on your criteria Draft Generation creates contextually appropriate replies using your business information Human Approval sends you the draft for review before sending Auto-Send replies automatically once approved Setup Connect your Gmail account to the Gmail Trigger node Update the "Your Information" node with: Entity name and description Approval email address Resource guide (FAQs, policies, key info) Response guidelines (tone, style, formatting preferences) Configure your LLM provider (OpenAI, Claude, Gemini, etc.) with API credentials Test with a sample email Requirements n8n instance (self-hosted or cloud) Gmail account with API access LLM provider API key Need Help? Email Nick @ nick@tropicflare.com

Nick CanfieldBy Nick Canfield
88