Connecting BambooHR to action builder
Before you can include external actions in your action flows, you must connect the action builder to the external system.
- All external actions performed by an action flow are attributed to the user who connected the external system. Therefore, it's a best practice to use a dedicated service account rather than personal credentials when connecting to each external system.
- All integrations request access to necessary scopes. However, it's important that you review and validate the scopes before authorizing the connection to the external system.
- When managing credentials for API key-based tools, such as OpenAI, it's best to store keys in a secure vault or credential manager.
- In Admin Center, click
Apps and integrations in the sidebar, then select Actions > Action
flows. - Create or edit an action flow.
- Open the step sidebar.
- Under External actions, click BambooHR.
- Click Connect.
- Follow BambooHR's prompts to authenticate and complete the connection.
The following scopes are required:
Claims - read,Employee - read/write,Time Off - read/write,Reports - read,Company - read,Miscellaneous - read meta data.Note: All external actions performed by an action flow are attributed to the user who connected the external system. Therefore, it's a best practice to use a dedicated service account rather than personal credentials when connecting to each external system.
After you've connected to the system, you'll see an indicator that it's connected and details about the instance you're connected to, as well as the actions available for BambooHR.
Using BambooHR actions in action flows
BambooHR action steps can be used to add and manage employee details and time off requests in BambooHR.
Getting details about an employee from BambooHR
Use the Get employee details action to retrieve the personal and employment data for an individual employee.
This action has the following inputs and outputs:
| Variables | |
|---|---|
| Inputs |
Employee ID or Work email
address
|
| Output | The employee's personnel data |
Adding an employee to BambooHR
Use the Add employee action to add a new employee to BambooHR.
This action has the following inputs and outputs:
| Variables | |
|---|---|
| Inputs |
First name, Last name,
Work email addressOptional:
|
| Output |
Employee ID and any variables specified
in the input |
Updating an employee in BambooHR
Use the Update employee action to update details for an existing employee in BambooHR.
This action has the following inputs and outputs:
| Variables | |
|---|---|
| Inputs |
Employee IDOptional: |
| Output | The employee's updated personnel data |
Requesting time off in BambooHR
Use the Request time off action to submit a time off request for an employee in BambooHR.
This action has the following inputs and outputs:
| Variables | |
|---|---|
| Inputs |
Employee ID, Start
date, End date,
Type
Note: Dates must be formatted as
YYYY-MM-DD and in the BambooHR account's
timezone.
|
| Output | Confirmation of submitted request |
Recipe: Automatically creating a time off request in BambooHR after it's approved in a Zendesk ticket
The following example action flow automatically submits a time off request in BambooHR when a Zendesk ticket related to the request is approved.
-
Add an action flow trigger with
the following details:
- Click Add trigger.
- In the step sidebar, under Zendesk, click Tickets.
- Click Properties and select Ticket tags changed.
- Click Add condition.
- Under Variable, click Ticket tags changed and select Tags (added).
- Set the Operator to Contains at least 1 of.
- Under Value, enter approved.
- Add a step to look up ticket details:
- In the action builder, beneath the action flow trigger, click the
Add step icon (
). - In the step sidebar, under Zendesk actions, click Look up ticket.
- Under Ticket ID, click into the field and then click Select a variable instead.
- Within the variable menu, select Ticket tags changed as the step that outputs the variable you want to use, and then select Ticket ID.
- In the action builder, beneath the action flow trigger, click the
Add step icon (
- Add a step to look up user details about the
ticket assignee:
- In the action builder, click the Add step icon (
). - In the step sidebar, under Zendesk actions, click Look up user.
- Under User ID type, select Zendesk user ID.
- For User ID, click Add variable.
- Within the variable menu, select Ticket tags changed as the step that outputs the variable you want to use, and then select Requester ID.
- In the action builder, click the Add step icon (
- Add a step to retrieve the employee's data in BambooHR:
- In the action builder, click the Add step icon (
). - In the step sidebar, under External actions, click BambooHR and then select Get employee details.
- Under Employee email, click Add variable .
- Within the variable menu, select Look up user as the step that outputs the variable you want to use, and then select Work email.
- In the action builder, click the Add step icon (
- Add a step to submit the time off request in BambooHR:
- In the action builder, click the Add step icon (
). - In the step sidebar, under External actions, click BambooHR and then select Request time off.
- Under Employee ID, click Add variable.
- Within the variable menu, select Look up user as the step that outputs the variable you want to use, and then select Work ID.
- Under Start date, click Add variable.
- Within the variable menu, select Look up ticket as the step that outputs the variable you want to use, and then select the Start date.
- Under End date, click Add variable.
- Within the variable menu, select Look up ticket as the step that outputs the variable you want to use, and then select the End date.
Note: To make the start date and end date information available for use as variables in the action flow, these must be configured as ticket fields. - In the action builder, click the Add step icon (
- Add a step that sends a direct message in Slack to
the ticket requester's supervisor that contains the information you
collected for the time off request:
- In the action builder, click the Add step icon (
). - In the step sidebar, under External actions, click Slack and then select Post direct message.
- Under Email, click Add variable.
- Within the variable menu, select Get employee details as the step that outputs the variable, and then select Supervisor's email.
- Under Message, enter the message you want to send to the
employee's supervisor. Include relevant information as variables
from the Look up ticket and Look up user steps, respectively, to
streamline their ability to solve the ticket. In the following
example, all variables are
italicized:
Hi Employee details > Supervisor Name, A time off request has been submitted in BambooHR for Requester > Name and requires your attention. Please respond as soon as possible. Time off request summary: - Start date: Ticket > Start date - End date: Ticket > End date - Notes: Requester > Notes
- In the action builder, click the Add step icon (
- Click Save.
- Click Test to test the action flow.
- Click the options menu (
) and select Activate to begin using the
action flow to automatically submit a time off request in BambooHR when a
Zendesk ticket related to the request is approved.