Answer backlog questions from Slack with Supabase, Gemini, and OpenRouter RAG

Go to Workflow
1 views
Built by Salim BRAHMI Salim BRAHMI
Created on August 03, 2026

Description

Quick Overview
This workflow indexes a product backlog PDF into a Supabase vector store and lets users query it from Slack using a slash command, with Google Gemini embeddings for retrieval and an OpenRouter chat model to generate answers.

How it works
Receives a form submission with a product backlog PDF upload.
Extracts text from the PDF and generates embeddings with Google Gemini before inserting the content into a Supabase vector store table.
Loads default documents and embeddings to initialize the same Supabase knowledge base.
Receives a Slack slash command request and immediately returns an in-channel “search in progress” acknowledgment.
Sends the Slack question to an OpenRouter chat model–powered RAG agent, which uses Google Gemini embeddings to retrieve relevant backlog passages from Supabase.
Posts the final, Slack-formatted answer back to the originating channel using Slack’s response_url.

Setup
Configure the n8n form trigger (or share it) so users can upload a PDF file for indexing.
Add a Supabase API credential and ensure a vector store table named backlog_documents exists (or update the table name in both Supabase nodes).
Add a Google Gemini (PaLM) API credential for the embeddings nodes.
Add an OpenRouter API credential and select the target model in the chat model node.
Create a Slack slash command that sends POST requests to the workflow webhook path /backlog-query and use the generated webhook URL in Slack.

Nodes Used (6)

AI Agent
@n8n/n8n-nodes-langchain.agent
Default Data Loader
@n8n/n8n-nodes-langchain.documentDefaultDataLoader
Embeddings Google Gemini
@n8n/n8n-nodes-langchain.embeddingsGoogleGemini
HTTP Request
n8n-nodes-base.httpRequest
OpenRouter Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenRouter
Supabase Vector Store
@n8n/n8n-nodes-langchain.vectorStoreSupabase