Answer HR policy and benefits questions with BambooHR, OpenAI and Supabase
Quick Overview This workflow ingests company policy PDFs from BambooHR into a Supabase vector database and provides an employee chat interface that answers policy and benefits questions using OpenAI, with an additional employee/department lookup powered by BambooHR employee data.
How it works Starts a manual run to fetch files from BambooHR and keep only PDFs in the “Company Files” category. Downloads each selected PDF, splits it into chunks, generates OpenAI embeddings, and inserts the content into a Supabase vector table for retrieval. Exposes a chat trigger where employees submit questions to an HR assistant. Uses OpenAI with conversation memory and retrieves relevant policy content from the Supabase vector store to ground responses. When a question requires a contact person, looks up employee details in BambooHR by exact name or finds the most senior person in a requested department using an OpenAI-assisted department extraction and ranking step. Returns the final answer to the chat, including policy-based guidance and any retrieved employee contact details.
Setup Add BambooHR credentials and ensure your policies/benefits PDFs are available in the BambooHR file category named “Company Files.” Add Supabase credentials and create a company_files table with a match_files similarity search function configured for your embedding dimensions. Add an OpenAI API key for both chat models and embeddings used across ingestion, retrieval, classification, and seniority selection. Run the manual ingestion once to populate Supabase before using the chat trigger, then share the chat webhook/URL with your chat client or n8n Chat UI.
Related Templates
Restore your workflows from GitHub
This workflow restores all n8n instance workflows from GitHub backups using the n8n API node. It complements the Backup ...
Build a Restaurant Voice Assistant with VAPI and PostgreSQL for Bookings & Orders
This n8n template demonstrates how to create a comprehensive voice-powered restaurant assistant that handles table reser...
Extract Named Entities from Web Pages with Google Natural Language API
Who is this for? Content strategists analyzing web page semantic content SEO professionals conducting entity-based anal...
🔒 Please log in to import templates to n8n and favorite templates
Workflow Visualization
Loading...
Preparing workflow renderer
Comments (0)
Login to post comments