BambooHR AI-Powered Company Policies and Benefits Chatbot n8n Workflow Template

n8n workflow template · 39 nodes · OpenAI

BambooHR AI-Powered Company Policies and Benefits Chatbot is a free n8n workflow template that starts when a chat message is received and works with OpenAI, BambooHR and Supabase. It has 39 nodes, 22 of them AI nodes (Default Data Loader, OpenAI Embeddings, Recursive Character Text Splitter and Window Buffer Memory). To run it, you add your own credentials for BambooHR API, OpenAI API and Supabase API.

At a glance

Trigger
Chat Trigger (Employee initiates a conversation)
Nodes
39
Apps
OpenAI, BambooHR and Supabase
AI nodes
22
Credentials
3 types
Category
RAG, documents and vector search

Apps and integrations

  • OpenAI
  • BambooHR
  • Supabase

Node types used

  • Manual Trigger
  • Default Data Loader
  • OpenAI Embeddings
  • Recursive Character Text Splitter
  • Window Buffer Memory
  • OpenAI Chat Model
  • Vector Store Question Answer Tool
  • Call n8n Workflow Tool
  • Auto-fixing Output Parser
  • Structured Output Parser
  • BambooHR
  • Filter
  • Split Out
  • Supabase Vector Store
  • Chat Trigger
  • Execute Workflow Trigger
  • Text Classifier
  • Edit Fields (Set)
  • Aggregate
  • Information Extractor
  • Basic LLM Chain
  • AI Agent

How it works

The text below comes from the sticky notes inside the workflow. We removed links, code samples and anything that looks like a key or token.

STEP #1: Retrieve company policies and load them into a vector store

BambooHR AI-Powered HR Benefits and Company Policies Chatbot

AI Chatbot Operating Guidelines

  • When an employee asks for a contact person, first attempt to find the relevant contact in company_files.
  • If a contact person is found but their details (e.g., email or phone number) are missing, use the employee_lookup_tool to retrieve their contact details.
  • If no contact person is found
  1. Use the employee_lookup_tool with "HR" (or another relevant department) to retrieve the most senior person in that department.
  2. If no senior contact is found, ask the employee for their name.
  3. Use the employee_lookup_tool to retrieve their supervisor’s name.
  4. Use the employee_lookup_tool to retrieve their supervisor’s details.
  5. Provide the supervisor's contact information and recommend them as the best next point of contact.

About the maker

Find Ludwig Gerdes on LinkedIn

Toggle off the _simplify_ option to ensure categories are retrieved as well

This employee lookup tool gives the AI Benefits and Company Policies chatbot additional superpowers by allowing it to search for an individual or a department to retrieve contact information from BambooHR.

GetAll employees from BambooHR

BambooHR does not offer search by {field} functionality for its /employees endpoint, so filtering must be done after data retrieval. This can be inefficient for very large organizations where there may be multiple employees with the same name or simply a large number of employees.

GET singular employee by name path

This path may be used multiple times by the HR AI Agent to look up the employee's details, and then to look up their supervisor's details.

GET senior leader of department path

This path would normally only be used when no other contacts can be identified from the company_files. The employee can retrieve the contact details for the most senior leader of a department should they request it.

Final node returns employee name

The AI Agent can then call the employee lookup path to retrieve details, if requested.

Setup notes

The text below comes from the sticky notes inside the workflow. We removed links, code samples and anything that looks like a key or token.

(Optional) STEP #2: Set up employee lookup tool

Nodes in this workflow

The 39 nodes in file order (sticky notes excluded). Branches and connections determine execution order in n8n:

  1. When clicking ‘Test workflow’ (Manual Trigger)
  2. Default Data Loader (Default Data Loader)
  3. Embeddings OpenAI (OpenAI Embeddings)
  4. Recursive Character Text Splitter (Recursive Character Text Splitter)
  5. Window Buffer Memory (Window Buffer Memory)
  6. OpenAI Chat Model (OpenAI Chat Model)
  7. Vector Store Tool (Vector Store Question Answer Tool)
  8. OpenAI Chat Model1 (OpenAI Chat Model)
  9. Embeddings OpenAI1 (OpenAI Embeddings)
  10. Employee Lookup Tool (Call n8n Workflow Tool)
  11. OpenAI Chat Model2 (OpenAI Chat Model)
  12. OpenAI Chat Model3 (OpenAI Chat Model)
  13. OpenAI Chat Model4 (OpenAI Chat Model)
  14. Auto-fixing Output Parser (Auto-fixing Output Parser)
  15. OpenAI Chat Model5 (OpenAI Chat Model)
  16. Structured Output Parser (Structured Output Parser)
  17. GET all files (BambooHR)
  18. Filter out files from undesired categories (Filter)
  19. Split out individual files (Split Out)
  20. Filter out non-pdf files (Filter)
  21. Download file from BambooHR (BambooHR)
  22. Supabase Vector Store (Supabase Vector Store)
  23. Employee initiates a conversation (Chat Trigger)
  24. Supabase Vector Store Retrieval (Supabase Vector Store)
  25. AI-Powered HR Benefits and Company Policies Chatbot (Execute Workflow Trigger)
  26. Text Classifier (Text Classifier)
  27. GET all employees (BambooHR)
  28. Filter out other employees (Filter)
  29. Stringify employee record for response (Edit Fields (Set))
  30. GET all employees (second path) (BambooHR)
  31. Extract departments (Aggregate)
  32. Ensure uniqueness in department list (Edit Fields (Set))
  33. Extract department (Information Extractor)
  34. Retrieve all employees (BambooHR)
  35. Filter out other departments (Filter)
  36. Extract relevant employee fields (Aggregate)
  37. Identify most senior employee (Basic LLM Chain)
  38. Format name for response (Edit Fields (Set))
  39. HR AI Agent (AI Agent)

Credentials you need

  • BambooHR API – used by Download file from BambooHR, GET all employees, GET all employees (second path) and GET all files and others
  • OpenAI API – used by Embeddings OpenAI, Embeddings OpenAI1, OpenAI Chat Model and OpenAI Chat Model1 and others
  • Supabase API – used by Supabase Vector Store and Supabase Vector Store Retrieval

Configure your own credentials after importing. Create each credential in n8n, then select it in the node.

How to import into n8n

  1. Download the JSON file with the button above.
  2. In n8n, open a new workflow, select the ... menu and choose Import from File. You can also paste the JSON straight into the editor canvas.
  3. Open each node that shows a warning and select or create its credential.
  4. Read the notes on the canvas, test the workflow with sample data, then activate it.

Do you need somewhere to run it? Read our guide to self-hosted n8n.

Need this customised?

We can adapt this workflow to your apps, data and process, then deploy and support it.

Contact Us