Using Zapier, you can integrate MyHR's leave entries into your Microsoft Outlook calendar to share with your wider team.
This integration is powered by Zapier which means to use it, you'll need a Zapier account. There is a free version which should cover most usage and options to upgrade if you need access to extra features.
READ - What the integration does
READ - Part 1: Create and authorise your Zapier integration in MyHR
READ - Part 2: Set up your zap to create leave request types
READ - Part 3: Create zaps to set people to send leave entries for
READ - Part 4: Create zaps to send approved and cancelled leave
READ - Getting help with Zapier
What the integration does
You can show approved leave from MyHR in an Outlook calendar, allowing you to keep track of leave across your business.
There are a few steps to getting it up and running as we need to know the types of leave you'll be using and create a record for people that allows us to send the leave to Zapier. And from there, getting the leave into your Outlook calendar.
Part 1 - Create and authorise your Zapier integration in MyHR
The following shows you how to set up a Zapier integration in MyHR. This is required for you to create a Zapier zap and transfer data to other apps.
- Select "Manage Integrations" from the menu
- Click "Add item"
- Select the "Zapier" entry.
- Click "Authorise Zapier to access MyHR account".
You can now copy your API key and paste it into your Zapier account when connecting your zap to MyHR. Click "Copy API Key" and then click "Open Zapier" and move on to connecting your MyHR account in Zapier.
![Image](https://tettra-production.s3.us-west-2.amazonaws.com/0d6efb4f154041e899af17bdcd19c1b5/ca83a48ab871ca5a3dc6c0bb90ffbb8d/d822b155a4112474fdb7aea5ee22465e/7215d9240e963417121aa2b7f96a4512/iLbSYg8Iko4QpozRvENdZdMOxnmsNhGuJwq74B6Y.png)
Part 2 - Set up your zap to create leave request types
The first thing we need to set up is a set of leave types that match your own leave types. MyHR has a set of defaults but we assume you have your own and the Zapier integration needs this to send the right leave types to Outlook.
We also need some way of connecting up people between the systems. That way we know who and who not to send leave entries for.
- To start the process, go to zapier.com/app/zaps and select ‘Create Zap’ and then name your zap eg. Create leave request types (the zap name is located in the top-left corner after you select Create Zap).
- Set up your trigger
- Select the app which has your leave types. You can use another app if they have a Zapier action that will supply the information or use something like Google Sheets, as per this example.
- Connect your account with Zapier following the relevant steps in Zapier.
- Set up your trigger data: for the leave request types, MyHR will need the following data: unique ID, name, units. Find examples of data received by MyHR.
- Test: Add data to the app you are using as your trigger and test it out.
- Select the app which has your leave types. You can use another app if they have a Zapier action that will supply the information or use something like Google Sheets, as per this example.
- Set up your actions
- Choose app & event: Search for and select the MyHR app, and action 'Create Leave Request Type in MyHR'
- Choose or connect your MyHR account. If you are connecting to your MyHR account, you'll be prompted to provide the API key.
- Set up the action data: map the data from the trigger to the data needed in the MyHR action.
- Test: Add data to the app you are using as your trigger and test it out.
- Publish your app and check the zap is able to run by checking the zap history.
Part 3 - Create zaps to set people to send leave entries for
In Zapier, we are going to set up a zap so that when a person is activated, their details are sent through to your system and following that, another zap to link the MyHR person with an ID on the other side.
Create your zap and set up your trigger to send the person's details
- Search for and select the 'MyHR' app.
- Choose your trigger
For this example, we’ll use the ‘Person has been activated’ trigger but you can set up a zap for each of these triggers:
- Person Signed Their Employment Agreement
- Person Has Been Activated
- Person Has Been Deactivated- Connect to your MyHR account.
- Select ‘Continue’ and then ‘Test Trigger’ to confirm that the Zapier can access your MyHR account.
- Set up your action to receive the person's details
- Search for and select the app you'll be using to receive the employee record. For this example, it will be an event that will create a person/employee and we'll use Google Sheets as our trigger app.
- Set up the action data: map MyHR fields to the available payroll action fields. It's a good idea to send the personID from MyHR, as then you can also use it to automatically link in the next zap.
- Test action and publish the zap.
- You can see the MyHR triggers for your published zaps in the MyHR Zapier settings page.
- If you have just set up 'Person has been activated' and have existing employees to get set up, you can trigger this manually for each employee you want to send by using the 'Add to zapier' button on MyHR.
Create your zap and set up your trigger to link the person's details to MyHR
- Create a zap to link your person in MyHR with the employee who you'll display leave entries for: select ‘Create Zap’ and name your zap eg. Link MyHR person for leave calendar (set the zap name in the top-left in Zapier). This will take the ID you want to use and and link it to the ID in the MyHR system. Usually we have another system in play using zapier eg. payroll, but in this case, we still need to set up a link to know who to send leave for.
- Set up your trigger
- Search for and select the app you'll be using to provide the person details and the event - this could be your payroll system or another app such as Google Sheets. For this example, we'll use Google Sheets as our app and 'New or Updated Spreadsheet Row' for our event.
- Connect your account with Zapier following the relevant steps in Zapier.
- Set up your trigger data: for the person integration, MyHR will need the following data: unique ID, first name, last name and email. For our case, you can send through the MyHR person ID, which will link the employee records automatically. If you only send the employee ID from the payroll, you'll need to manually link the records in your integration.
- Test: Add data to the app you are using as your trigger and test it out.
- Search for and select the app you'll be using to provide the person details and the event - this could be your payroll system or another app such as Google Sheets. For this example, we'll use Google Sheets as our app and 'New or Updated Spreadsheet Row' for our event.
- Set up action
- Choose app & event: Search for and select the MyHR app and the 'Create person integration' event.
- Choose account
- Set up action data
Map the relevant fields to the MyHR person integration data. - Test action: Set up an employee on your payroll side and test that the data is sent through.
- Publish your zap.
- When your zap runs successfully and links your people, you should see a link established between MyHR and your payroll and your person will show as linked.
- If the zap sends the person's record to MyHR without the MyHR person ID, you'll need to go to 'Manage integrations' in MyHR and link the records.
- Choose app & event: Search for and select the MyHR app and the 'Create person integration' event.
Part 4 - Create zaps to send approved and cancelled leave
Zap to add approved leave entries to Microsoft Outlook calendar
- Select ‘Create Zap’ and name your Zap eg. Send approved leave from MyHR to Outlook calendar (set the Zap name in the top-left in Zapier).
- Set up your trigger
- Search for and select the 'MyHR' app.
- Choose your trigger
For this example, we’ll use the ‘Leave Has Been Approved’ trigger but you will need a zap for 'Leave Has Been Cancelled' if you want to keep the calendar in sync with MyHR. - Choose account
- Test trigger: select ‘Continue’ and then ‘Test Trigger’ to confirm that Zapier can access your MyHR account.
- Search for and select the 'MyHR' app.
- Set up your action
- Search for and select Microsoft Outlook and the 'Create Event' action.
- Set up the action data: Map the relevant fields to the event fields. Please be aware of privacy when defining what fields show. You may not want to include the leave type and we don't recommend including any comments.
- Test action: Approve a leave request and test that the data is sent through.
- You can now publish the zap via the ‘Publish’ button. You will see the MyHR triggers for your published zaps in the MyHR Zapier settings page.
Zap to delete cancelled leave from Microsoft Outlook calendar
You can also create a zap for cancelled leave requests following the same steps in this section using the 'Delete Event' action, with the addition of a step to find the leave entry in Outlook, as you'll need the leave ID to select which to delete.Getting help with Zapier
The MyHR Zapier app is available on Zapier.com - if you are interested in particular templates between apps to get you up and running quicker or general support, contact our customer success team so we can discuss your requirements.