Skip to main content
Answered

ical & gcal integration via link

  • December 14, 2022
  • 3 replies
  • 181 views

Dear team, We have the calendar integration with Personio & our company google calendar. But when we add the url to calendar, the leaves displayed in google calendar are up to date. But the sync between url link & google calendar is not frequent & we do not see updated leaves in our calendar if any employees leave gets approved on that day. We can able to see the synced update after a day.

Is there any way we can increase sync intervals so that the data seen in google calendar is up to date ??

Best answer by Vida

Hi @Gururaj Hande,

We had similar issue when it comes to calendars. Depending on how badly you need this, you may decide to use Personio API directly to fetch fresh data periodically and share an overview on Slack/Teams/email/other (depending on what the relevant channel for this in your case). The snippet bellow is an example of that:

function fetchAbsenceDataCreated(reportStartDate, reportEndDate) {

let responseAbsences = UrlFetchApp.fetch('https://api.personio.de/v1/company/time-offs?updated_from=' + reportStartDate + '&updated_to=' + reportEndDate, getAuthOptions())

let absences = JSON.parse(responseAbsences.getContentText()).data

...

}

Best,

Vida

3 replies

ConorCunningham
Personio Employee
Forum|alt.badge.img+7
  • Former Community Moderator
  • December 22, 2022

Hey @Gururaj Hande

For iCal links, we unfortunately cannot change the regularity of the sync interval from our side. For Google, it states within this link that it takes up to 12 hour for changes to show in the Calendar. 

Therefore, any changes made on the day will not be updated within the Google Calendar until possibly 12 hours later. 

I will be happy to answer any further questions you may have😀

Best, 

Conor

 


Vida
Communicator
Forum|alt.badge.img+10
  • Communicator
  • Answer
  • December 27, 2022

Hi @Gururaj Hande,

We had similar issue when it comes to calendars. Depending on how badly you need this, you may decide to use Personio API directly to fetch fresh data periodically and share an overview on Slack/Teams/email/other (depending on what the relevant channel for this in your case). The snippet bellow is an example of that:

function fetchAbsenceDataCreated(reportStartDate, reportEndDate) {

let responseAbsences = UrlFetchApp.fetch('https://api.personio.de/v1/company/time-offs?updated_from=' + reportStartDate + '&updated_to=' + reportEndDate, getAuthOptions())

let absences = JSON.parse(responseAbsences.getContentText()).data

...

}

Best,

Vida


Daniele
Community Admin
Forum|alt.badge.img+23
  • Community Admin
  • December 28, 2022

Wow, Thank you for sharing your solution, @Vida  🤩 Community support at its best.