# Give new BambooHR hires a Brex card with the right limit

> When someone new lands in BambooHR, we add them to Brex, issue a virtual card in their name, apply your department spending cap, and tell People Ops in Slack.

- Workflow type: code
- Services: BambooHR, Brex, Slack
- Categories: HR & People, Finance
- Published: 2026-08-04

## What it does

- Watches BambooHR for new employee records and picks up their name, work email, department, and start date.
- Adds them to your Brex account and issues a virtual card in their own name, so nobody has to share a company card.
- Applies a monthly spending cap based on their department, using a simple table you control (for example Sales $2,000, Engineering $500, everyone else $250).
- Posts a confirmation in Slack naming who was set up, their department, and the limit applied, so IT and finance both see it without logging into Brex.

## What you'll need

- A BambooHR account where new hires are entered
- A Brex account with permission to invite people and issue cards
- A Slack workspace and a channel where People Ops updates should land
- Your department spending limits decided up front, plus a default for anything not listed

## Prompt

Watch BambooHR for new employee records and provision the new hire's Brex spend access automatically. Use a BambooHR poll trigger on the new employee event so the workflow runs shortly after an employee record is created. Build this as a deterministic code workflow: every step is a known operation over structured fields, with no open-ended reasoning.

When the trigger fires, read the new hire's first and last name, work email, department, and start date from the BambooHR employee record using Get Employee. If the work email is missing, stop and post a Slack message saying the hire was skipped and why, rather than creating a card with no usable owner.

Next, make sure the person exists in Brex. Call Brex List users filtered by that work email. If a user already exists, reuse that user id. If not, call Brex Invite user with their name and work email. Order matters here: the Brex user id has to exist before a card can be assigned to an owner, so this step must complete before card creation.

Then issue the card. Call Brex Create card to create a virtual card in the new hire's name, owned by the Brex user id from the previous step. POST /v2/cards requires an Idempotency-Key header holding a V4 formatted UUID. Derive that key deterministically from the BambooHR employee id, for example by hashing the employee id into a UUID-shaped string, so a re-run for the same employee always sends the identical key and Brex returns the original card instead of issuing a duplicate. Never generate a fresh random key on each run, since that is exactly what causes duplicate cards.

Attach the spending cap with Brex Create spend limit, tied to the new card and its owner. Resolve the monthly amount from an editable department lookup table defined at the top of the workflow, so a non-technical admin can change the numbers in one place. Seed it with Sales at 2000 USD, Engineering at 500 USD, and a default of 250 USD for any department not listed, including a missing or blank department. Brex takes monetary amounts as integer minor units plus a currency code, so 2000 USD is sent as an amount of 200000 with currency USD.

Finish with Slack Send a Message to a People Ops channel confirming the provisioning: the employee's full name, their department, their start date, and the monthly limit that was applied. Keep the message readable so IT and finance can both act on it without opening Brex. If any Brex call fails, post that failure to the same channel naming the employee and the step that failed, so a half-provisioned hire is never silent.

Brex allows 5,000 card creations per 24 hours and returns HTTP 429 when rate limited, so retry with exponential backoff and jitter rather than failing the run outright.

## How to customize

- Change the department limits, add new departments, or raise the default in the lookup table.
- Point the confirmation at a different Slack channel, or send it to separate finance and IT channels.
- Decide whether every new hire gets a card, or only people in certain departments.

## FAQ

### Will this create duplicate cards if it runs twice?

No. Each new hire's card request carries a unique fingerprint built from their employee record, so if the workflow runs again for the same person, Brex recognizes the repeat and returns the card that already exists instead of issuing a second one.

### What happens if someone's department is not in my limit table?

They get the default limit, which is $250 in the starting example. Nobody is skipped and the workflow does not fail, so you can add departments to the table whenever you like.

### What if the person already has a Brex account?

The workflow checks Brex by work email first. If they are already there, it uses that existing account rather than inviting them a second time, then continues on to the card and the limit.

### Does the new hire get a physical card as well?

This issues a virtual card, which is usable straight away. If you also want plastic in their wallet, you can order a physical card from Brex separately.

### Does it run the moment a hire is added, or on a schedule?

It checks BambooHR regularly for newly created employee records and runs shortly after one shows up, so nobody has to remember to kick it off.

Use this prompt in General Input: https://www.generalinput.com/prompts/give-new-bamboohr-hires-a-brex-card-with-the-right-limit