Skip to main content

Index n8n workflows and enable semantic AI search with OpenAI and Supabase

Workflow preview

Workflow preview
100%
Index n8n workflows and enable semantic AI search with OpenAI and Supabase preview
Open on n8n.io

1. Workflow Overview

n8n Workflow Intelligence (RAG): Auto Indexing & Semantic AI Search with Supabase Vector DB This workflow automatically indexes your n8n workflows every 24 hours, converts them into vector embeddin...

Best for

  • Internal Wiki automation workflows
  • AI RAG automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.scheduletrigger, n8n-nodes-base.httprequest, n8n-nodes-base.splitout, n8n-nodes-base.splitinbatches, n8n-nodes-base.supabase, n8n-nodes-base.code, @n8n/n8n-nodes-langchain.documentdefaultdataloader, @n8n/n8n-nodes-langchain.embeddingsopenai

Source and attribution

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

Original n8n.io source

1.1 Workflow description

Title
Index n8n workflows and enable semantic AI search with OpenAI and Supabase
Workflow name
Index n8n workflows and enable semantic AI search with OpenAI and Supabase

n8n Workflow Intelligence (RAG): Auto Indexing & Semantic AI Search with Supabase Vector DB

This workflow automatically indexes your n8n workflows every 24 hours, converts them into vector embeddings using OpenAI and stores them in Supabase. It exposes a webhook that lets you query your workflows in natural language. The AI agent uses Retrieval-Augmented Generation (RAG) to fetch relevant workflow data and generate contextual answers—making it easy to understand, debug and reuse automation logic.

Quick Implementation Steps

  1. Enable n8n API and configure authentication (header-based).
  2. Set up Supabase with pgvector and create the required table and function.
  3. Add OpenAI credentials (for embeddings and chat model).
  4. Import and activate the workflow in n8n.
  5. Send a POST request to /ask-workflows:
{
"query": "How does my webhook workflow work?"
}
  1. Receive AI-powered answers based on your workflows.

What It Does

This workflow creates an intelligent knowledge layer on top of your n8n automations. It automatically fetches workflows from your n8n instance, processes each node and converts them into structured text chunks. These chunks are transformed into vector embeddings using OpenAI and stored in Supabase for semantic search.

Once indexed, users can query workflows through a webhook endpoint using natural language. The AI agent retrieves relevant workflow data using vector similarity search and generates meaningful responses. It can also guide users directly to workflows using links.

In short, it transforms your workflows into a searchable, AI-powered system.

Who It's For

  • Developers managing multiple n8n workflows
  • Automation engineers handling complex pipelines
  • Teams working on shared n8n environments
  • Businesses needing faster debugging and workflow discovery
  • Anyone looking to add AI-powered search to automation systems

Requirements

1. n8n API Access

  • Enable API in your n8n instance
  • Example endpoint:
http://YOUR_N8N_HOST:5678/api/v1/workflows
  • Requires authentication via HTTP headers (API key/token)

2. Supabase Setups

Enable Extension

create extension if not exists vector;

Create Table

create table if not exists documents (
 id uuid primary key default gen_random_uuid(),
 content text,
 metadata jsonb,
 embedding vector(1536)
);

Create Match Function

create or replace function match_documents (
 query_embedding vector(1536),
 match_count int,
 filter jsonb default '{}'::jsonb
)
returns table (
 id uuid,
 content text,
 metadata jsonb,
 similarity float
)
language plpgsql
as $$
begin
 return query
 select
 documents.id,
 documents.content,
 documents.metadata,
 1 - (documents.embedding <=> query_embedding) as similarity
 from documents
 where (filter = '{}'::jsonb or documents.metadata @> filter)
 order by documents.embedding <=> query_embedding
 limit match_count;
end;
$$;

3.Credentials Required

  • OpenAI API key (for embeddings and chat model)
  • Supabase API credentials
  • n8n API authentication (header-based)

How It Works & Set Up

Step 1: Auto Sync Trigger

  • Runs every 24 hours
  • Keeps your vector database updated automatically

Step 2: Fetch Workflows

  • Calls n8n API to retrieve workflows
  • Current limit is set to 5 (can be increased)

Step 3: Split Workflows

  • Splits API response into individual workflows
  • Processes them one at a time

Step 4: Clear Existing Data

  • Deletes existing vector entries for each workflow
  • Ensures no duplication

Step 5: Transform into Chunks

Each workflow node is converted into structured text:

Workflow: "My Workflow". Node Name: "Webhook". Type: "n8n-nodes-base.webhook". Logic: {...}

Step 6: Generate Embeddings

  • Uses OpenAI embedding model
  • Converts chunks into vector format

Step 7: Store in Supabase

  • Stores content, metadata and embeddings
  • Enables semantic retrieval

Step 8: Query via Webhook

Endpoint:

/ask-workflows

Request:

{
 "query": "Find workflows using webhook"
}

Step 9: AI Agent + RAG

  • AI agent receives query
  • Uses vector search tool
  • Retrieves relevant chunks
  • Generates contextual answer

Step 10: Return Response

  • Sends structured response back to user
  • Includes workflow links:
http://YOUR_N8N_HOST:5678/workflow/[ID]

How To Customize Nodes

  • Fetch n8n Workflows API
  • Increase limit
  • Add filters for specific workflows
  • Transform Workflow to Chunks
  • Include connections, credentials or triggers
  • Embedding Model
  • Upgrade model for better accuracy
  • AI Agent Prompt
  • Modify instructions, formatting or tone
  • Metadata
  • Add fields like project name, owner or tags

Add-ons (Enhancements)

  • Real-time indexing via webhook trigger
  • Workflow version history tracking
  • UI dashboard for search
  • Slack or Discord chatbot integration
  • AI debugging assistant
  • Workflow recommendation system

Use Case Examples

1. Workflow Discovery

  • “Do I already have a webhook + email automation?”

2. Debugging Assistance

  • “Which workflow is calling this API?”

3. Developer Onboarding

  • Explore workflows using natural language

4. Reuse Automation Logic

  • Find and reuse existing patterns

5. Documentation System

  • Automatically understand workflow structure This workflow can support many more use cases depending on your automation needs.

Troubleshooting Guide

Issue Possible Cause Solution
No workflows fetched Incorrect API URL or authentication Verify endpoint and headers
Empty responses No indexed data available Ensure indexing process has completed successfully
Supabase error Missing table or function setup Run the required SQL setup scripts properly
Duplicate entries Delete step failed or skipped Check metadata filter logic in delete node
Poor answers Weak or improper chunking strategy Improve workflow-to-text transformation logic
Embedding errors OpenAI API issue or invalid key Check OpenAI credentials and usage limits

Need Help?

If you need help setting up or extending this workflow with

  • AI-powered workflow assistants
  • Custom RAG implementations
  • Advanced n8n automation systems
  • Enterprise-grade automation solutions

Contact our n8n workflow developers at WeblineIndia for expert support and custom development.

We can help you scale this into a production-ready AI automation platform.

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 - Auto Sync Trigger (24h)

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

Block 2 - Fetch n8n Workflows API

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.1

Block 3 - Extract Workflow List

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

Block 4 - Process Each Workflow

Type / Role
n8n-nodes-base.splitInBatches - splitInBatches
Config choices
Version 3

Block 5 - Clear Existing Vectors

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

Block 6 - Transform Workflow to Chunks

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 7 - Prepare Documents

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

Block 8 - Generate Embeddings

Type / Role
@n8n/n8n-nodes-langchain.embeddingsOpenAi - embeddingsOpenAi
Config choices
Version 1.2

Block 9 - Store in Vector DB

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

Block 10 - Query Webhook (Ask Workflows)

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

Block 11 - AI Workflow Assistant

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

Block 12 - LLM Brain (Agent)

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

Block 13 - Workflow Search Tool

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

Block 14 - Vector DB Search

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

Block 15 - Query Embeddings Generator

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

Block 16 - Tool LLM

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

Block 17 - Return AI Response

Type / Role
n8n-nodes-base.respondToWebhook - respondToWebhook
Config choices
Version 1.5

Block 18 - Sticky Note

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

Block 19 - Sticky Note1

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

Block 20 - Sticky Note2

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

Block 21 - Sticky Note3

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

Block 22 - Sticky Note4

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

Block 23 - Sticky Note5

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

Block 24 - Sticky Note6

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

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

3. Summary Table

Workflow Index n8n workflows and enable semantic AI search with OpenAI and Supabase
Complexity advanced
Nodes 26
Categories Internal Wiki, AI RAG
Author WeblineIndia
Published 25 Apr 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/15274/15274.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 Index n8n workflows and enable semantic AI search with OpenAI and Supabase do?

n8n Workflow Intelligence (RAG): Auto Indexing & Semantic AI Search with Supabase Vector DB This workflow automatically indexes your n8n workflows every 24 hours, converts them into vector embeddin...

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 Internal Wiki, AI RAG use case.