Skip to main content

Answer business FAQs with Claude, Supabase pgvector and OpenAI embeddings

Workflow preview

Workflow preview
100%
Answer business FAQs with Claude, Supabase pgvector and OpenAI embeddings preview
Open on n8n.io

1. Workflow Overview

Quick Overview This workflow exposes a webhook based FAQ endpoint that embeds incoming questions with OpenAI, retrieves relevant knowledge base chunks from Supabase pgvector, and asks Anthropic Cla...

Best for

  • Support Chatbot automation workflows
  • AI RAG automation workflows
  • intermediate n8n builders looking for reusable templates

Tools used

n8n-nodes-base.stickynote, n8n-nodes-base.webhook, n8n-nodes-base.set, n8n-nodes-base.httprequest, n8n-nodes-base.code, n8n-nodes-base.respondtowebhook

Source and attribution

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

Original n8n.io source

1.1 Workflow description

Title
Answer business FAQs with Claude, Supabase pgvector and OpenAI embeddings
Workflow name
Answer business FAQs with Claude, Supabase pgvector and OpenAI embeddings

Quick Overview

This workflow exposes a webhook-based FAQ endpoint that embeds incoming questions with OpenAI, retrieves relevant knowledge base chunks from Supabase pgvector, and asks Anthropic Claude to answer strictly from that context with citations, returning a structured JSON response.

How it works

  1. Receives a POST webhook request containing a user question (and optional session ID).
  2. Standardizes request fields and sets the Supabase URL, embedding model, top-k, and similarity threshold used for retrieval.
  3. Creates an embedding for the question using the OpenAI Embeddings API.
  4. Calls a Supabase PostgREST RPC (match_documents) backed by pgvector to return the most similar document chunks.
  5. Builds a citation-marked context block from the top matches (or a “no matches” context when nothing is found).
  6. Sends the context and question to Anthropic Claude with instructions to respond in JSON and cite only from the provided chunks.
  7. Parses Claude’s JSON, maps cited chunk IDs back to source metadata, and returns the answer, confidence flag, and citations in the webhook response.

Setup

  1. Create a Supabase Postgres database with the pgvector extension, a documents table (including an embedding vector(1536) column), and a match_documents RPC compatible with the workflow’s request body.
  2. Populate the Supabase documents table with chunked knowledge base content and embeddings (ingestion happens outside this workflow).
  3. Add HTTP Header Auth credentials for OpenAI (Authorization: Bearer ), Supabase (apikey and Authorization: Bearer ), and Anthropic (x-api-key: ), then select them in the respective HTTP request steps.
  4. Update the Supabase project URL and business name in the workflow configuration, and adjust topK and matchThreshold as needed.
  5. Copy the production webhook URL from n8n and configure your chat UI, Slack bot, or frontend to POST a JSON body containing a question field to it.

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 - Sticky Note

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

Block 2 - Sticky Note1

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

Block 3 - Sticky Note2

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

Block 4 - Sticky Note3

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

Block 5 - Sticky Note4

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

Block 6 - Receive Question Webhook

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

Block 7 - Set Search Configuration

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 8 - Generate Question Embedding

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

Block 9 - Search Supabase pgvector

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

Block 10 - Build Context from Matches

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

Block 11 - Generate Answer with Claude

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

Block 12 - Parse and Format Answer

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

Block 13 - Respond with Answer

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

3. Summary Table

Workflow Answer business FAQs with Claude, Supabase pgvector and OpenAI embeddings
Complexity intermediate
Nodes 13
Categories Support Chatbot, AI RAG
Author Milos Vranes
Published 08 Jun 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/16182/16182.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 Answer business FAQs with Claude, Supabase pgvector and OpenAI embeddings do?

Quick Overview This workflow exposes a webhook based FAQ endpoint that embeds incoming questions with OpenAI, retrieves relevant knowledge base chunks from Supabase pgvector, and asks Anthropic Cla...

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 Support Chatbot, AI RAG use case.