How Landscape Institute integrated People with Outlook to share holiday information
Integrations allow you to combine your favourite pieces of software, which can help you to save time, effort, and sometimes some money. The aim of People HR integrations, is to boost your productivity.
One of our clients, Louis from Landscape Institute, shared his integration story with us. His story details how he used People’s API to synch holidays into, and out of, Outlook calendars.
Here is the story he shared with us.
Overview of our People-Outlook integration
I was asked by our chief executive to be able to show holidays in Outlook calendars. While this is possible using the downloadable calendar on People HR, it wasn’t an automated process with the control that our SEO wanted.
I set about using a combination of the People API, and an EWS-based integration with Office365, with the following functionality:
- Loop through all People Holidays
- If holiday is approved, check if the holiday exists in the following calendars
- The Approver (The Manager)
- The Requester (The Member of Staff)
- A Shared Company Calendar
- The HR Officers Calendar
- Delete holidays from calendars which have been deleted from People
- Assign each holiday a unique reference
The project is maintained at the following Github repo
How we built the code
I decided to build the code in PowerShell, and run it as a service on one of our servers. The code should only need to run once every 24 hours.
The main code block loops through every employee, and then loops through all of their holidays. If the holiday is an approved holiday, it checks if it is present in the Outlook calendars.
The scripts run a process function, which in turn checks if the holiday is in Outlook, and if not, adds it.
Each holiday is assigned a unique MD5 string, using the holiday requester, the start date and the end date. This unique ID is then saved against Outlook’s iCALUID attribute, and can be searched in the future to see if the holiday has been added.
The Script adds the requester’s comments to the requester’s entry on Outlook, but not to the approver’s or any others.
Adding the ability to remove cancelled holidays from Outlook
Once the script has added all recently approved holidays, it can reverse the process, removing any holidays from Outlook which have been cancelled in People.
To do this, the script calls EWS for a list of calendar events which have an ICALUID present, and checks the body of the entry for “People Holiday Sync” to verify it was added by the script. If not present in People, it is deleted.
Ultimately, this ends up with the requester, in this case me, having this dropped into their calendar automatically
How we could make this integration even better
This was a relatively quick build, taking only a few hours to get the code working and then improving a few small pieces over the next few days as and when I could.
If I was to improve it further, I’d have the script call the API’s less times on every run, possibly caching all the data it needs at first run.
I would also maybe rebuild as a standalone application with a simple installation wizard so other people could use this easier and test that their EWS is working correctly.
There is another script that I run alongside this, which makes sure my People account, which does the adding / removing, has the correct permissions over everyone’s calendars.
At the moment I run this script manually if I create any new Office365 users, but I would look to use the office365 API to give an application this ability using azure, without needing admin credentials entered into the script when its run.
A well-deserved thank you – and a great taste in t-shirts
To thank Louis for his story, we sent him two t-shirts, using his choice of designs.
The first t shirt read “Life in Code” (pictured below), and the second read “Wubba Lubba Dub Dub” – a reference for any Rick and Morty fans out there.If you’ve got a story you’d like to share with us, get in touch!
Or, if you’d like to build an integration yourself then visit this page for more information: https://www.peoplehr.com/partners/
Stay ahead with HR
Get free HR insights, expert tips and exclusive interviews, and start making more impact at work
HR Software Optimised for Beaches or Sofas
What would you do with the unrestricted freedom to work from anywhere? Would you stay in the office, work from your sofa or kick back and work from the comfort of sandy paradise? This 1min video is all about HR software optimised for beaches and sofas. Enjoy!
Will Your HR Software Survive the Mobile Revolution
Why HR Super Heroes Need ‘Responsive Design’
Embark on your most ambitious HR journey to date
This short video takes you through the different ways people helps you work smarter, challenge your abilities and get yourself noticed – all using one simple, stunning cloud-based platform.
What is the Bradford Factor?
Ever wondered how the Bradford Factor formula calculates your employees' absence scores? Check out this graphic to have the Bradford Factor calculation explained to you clearly.
So… Who Exactly ARE You?!
If you like the sound of People, but you’re not familiar with the name… then it’s only natural that you’ll have questions.
6 Reasons People’s HR System Delivers Something Different
So many HR systems claim to be different. But when you actually look at what they offer, it’s easy to see that they’re all selling the same old thing...
See People HR in action
View our short video demo
Get started absolutely free
No credit card required