What this workflow does
- Slack /timeoff command (Webhook) receives the request and replies within Slack’s three-second limit.
- Read People sheet (Google Sheets) loads the directory: Slack ID, BambooHR ID, manager and team.
- Prepare request (Code) finds the requester and their teammates, and stops with a clear message if the person or their manager is not mapped.
- Parse request with Claude (HTTP Request) turns text such as “out next Thu and Fri, half day Wed” into start and end dates, partial days and a leave type, using a strict schema at low effort. It asks a clarifying question when dates are ambiguous.
- Parse request (Code) and Parsed OK? (If) handle refusals, missing output, past dates and unclear requests.
- Get projected balance and Get who’s out (HTTP Request to the BambooHR API) fetch the balance as of the leave date and everyone out in that window, including company holidays.
- Check policy (Code) counts working hours, compares them with the balance, and flags short notice, blackout periods and thin team coverage.
- Manager approval in Slack sends one direct message with every fact the manager needs and Approve or Decline buttons.
- Record approved time off (HTTP Request) writes the approved request to BambooHR, and Tell the employee sends the outcome by direct message.
- Post exception to Slack collects mapping gaps, parsing problems and API errors.
Before you import
- A Slack app with a slash command, a bot token and permission to send direct messages.
- A BambooHR API key from a user allowed to view balances and add time off. BambooHR’s API takes the key as the basic auth user name.
- A Google Sheet with a People tab: slack_user_id, name, bamboo_employee_id, manager_slack_id, team.
- An Anthropic API key. The template uses
claude-opus-5-5at low effort;claude-haiku-5-5is cheaper for high-volume, simple classification like this.
Setup
- Import the JSON and connect Slack, Google Sheets, Anthropic and an HTTP Basic Auth credential for BambooHR.
- Point the slash command’s request URL at the production webhook URL.
- Replace
REPLACE_WITH_SHEET_IDandREPLACE_WITH_BAMBOOHR_SUBDOMAIN(three URLs). - In Check policy, set
TYPE_MAPto your BambooHR time off type IDs, plus notice rules,BLACKOUTSand the coverage limit. - Set
TZin Prepare request and replaceREPLACE_WITH_SLACK_EXCEPTIONS_CHANNEL_ID.
Test it
Add yourself to the People sheet with a test manager. Type /timeoff out next Friday and confirm the manager message shows the right date, eight hours and a projected balance that matches BambooHR. Approve it and check the request in BambooHR. Then try a request that overlaps a teammate’s approved leave, and one with no dates (“need some time off soon”) to see the clarification path.
Make it production-ready
- Verify Slack’s request signature on the webhook before trusting the payload.
- Send clarification questions back to the employee by direct message instead of only the exceptions channel.
- Add out-of-office blocks to Google Calendar or Outlook after approval, and delegate approvals when a manager is out.
- Add the timesheet flow: reminders before the payroll cutoff, missing-day and overtime checks, and escalation to payroll.
- Run one pay cycle in parallel with the current process, and add an n8n error workflow.
Read the full guide on automating timesheet and PTO approvals for policy rules and payroll timing, or talk to Lumeor about Gusto, ADP or Teams.