Skip to content

Instantly share code, notes, and snippets.

@PeterJRiches
Last active November 29, 2023 06:00
Show Gist options
  • Select an option

  • Save PeterJRiches/a28236e21976a73fd55dc9b1418e3d37 to your computer and use it in GitHub Desktop.

Select an option

Save PeterJRiches/a28236e21976a73fd55dc9b1418e3d37 to your computer and use it in GitHub Desktop.
Sync Humanforce with Google Calendar

Sync Humanforce Rostering with Google Calendar

I work irregular hours and seldom know what my roster is, further than the next workday, and even then I am unsure of details. I need access to a computer to check, and I have to boot, authenticate and wait. It would be simple if it was in my calendar and I only had to reach for my phone. Google Calendar plays well with other apps on Android and other platforms, improving accessibility, for example for people with ADHD.

The Humanforce web interface provides a button to export a VCalendar (ICS) file. The endpoint is https://yourorganisation.humanforce.com/Roster/ExportToICS?from=01%2F12%2F2023, but there must be an authenticated session for it to work.

A script could then insert the extracted events into Google Calendar through a Google API (preferably), or emulation of a browser interaction.

Making the sync bidirectional

Either an API call to Google, or an LLM prompt (or both) could recognise and extract existing shifts on Google Calendar that had originated on Humanforce. (Tagging them on creation would ease this.) Then some sort of diff would be possible for the purpose of recognising new events that need adding to Google, and ones which need to be amended or deleted because of changes on Humanforce.

Polished result

A registered Google Calendar extension would provide the most seamless user experience. (Please correct me if I'm wrong.) The bit that boggles me the most is the authentication requirements for both applications, necessary to ensure security of the exchange.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment