Leave entries in your Outlook calendar powered by Zapier

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.

What the integration does

Part 1 - Create and authorise your Zapier integration in MyHR

Part 2 - Set up your zap to create leave request types

Part 3 - Create zaps to set people to send leave entries for

Part 4 - Create zaps to send approved and cancelled leave

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.

Outlook showing leave entries

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.

  1. Select "Manage Integrations" from the menu
    Image
  2. Click "Add item"
  3. Select the "Zapier" entry.
  4. Click "Authorise Zapier to access MyHR account".
  5. Screen Shot 2022-05-09 at 2.51.19 PMYou 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

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.

These steps assume an understanding of creating a zap in Zapier. If you have not already please read the article: Create Zaps.
  1. 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).
    Zapier - Create Zap
  2. Set up your trigger
    1. 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.
    2. Connect your account with Zapier following the relevant steps in Zapier.
    3. 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.
    4. Test: Add data to the app you are using as your trigger and test it out.

  3. Set up your actions
    1. Choose app & event: Search for and select the MyHR app, and action 'Create Leave Request Type in MyHR'
    2. Choose or connect your MyHR account. If you are connecting to your MyHR account, you'll be prompted to provide the API key.
    3. Set up the action data: map the data from the trigger to the data needed in the MyHR action.

    4. Test: Add data to the app you are using as your trigger and test it out.
    5. 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

  1. Search for and select the 'MyHR' app.
  2. 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
    1. Connect to your MyHR account.
    2. Select ‘Continue’ and then ‘Test Trigger’ to confirm that the Zapier can access your MyHR account.
  3. Set up your action to receive the person's details
    1. 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.
    2. 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.
  4. Test action and publish the zap.
  5. You can see the MyHR triggers for your published zaps in the MyHR Zapier settings page.
  6. 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

  1. 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.
  2. Set up your trigger
    1. 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.
    2. Connect your account with Zapier following the relevant steps in Zapier.
    3. 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.
    4. Test: Add data to the app you are using as your trigger and test it out.
  3. Set up action
    1. Choose app & event: Search for and select the MyHR app and the 'Create person integration' event.
    2. Choose account
    3. Set up action data
      Map the relevant fields to the MyHR person integration data.
    4. Test action: Set up an employee on your payroll side and test that the data is sent through.
    5. Publish your zap.
    6. 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.
    7. 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.

Part 4 - Create zaps to send approved and cancelled leave

Zap to add approved leave entries to Microsoft Outlook calendar

  1. 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).
  2. Set up your trigger
    1. Search for and select the 'MyHR' app.
    2. 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.
    3. Choose account
    4. Test trigger: select ‘Continue’ and then ‘Test Trigger’ to confirm that Zapier can access your MyHR account.
  3. Set up your action
    1. Search for and select Microsoft Outlook and the 'Create Event' action.
    2. 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.Create event in Microsoft Outlook
    3. Test action: Approve a leave request and test that the data is sent through.
    4. 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.
This zap likely pushes you into the paid plan on Zapier. Without it, you'll need to be aware that some leave entries may change following approval and need to be manually removed.

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.