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.