Just sharing something i found useful.
context : i am using nextcloud calendar, my wife is still using google calendar. i want to see her calendar (read only) in nextcloud and she wants to see mine (read only) in google.
easiest solution : get her to use your nextcloud server’s calendar !!!
if for some reason, she does not want to, keep reading.
sharing a google calendar in nextcloud :
- connect to the google calendar to be shared
- click on the dented wheel on the top right, to open settings
- on the nav bar on the left, scroll down to “settings for my calendars”, then develope menu for the calendar to be shared
- scroll down to “integrate calendar”
- look for "secret address in ical format and click on “copy” icon
- head back to nextcloud calendar app
- click on the plus sign next to “new calendar” on the left nav bar
- then click on "new subscription from lin (read only)
- copy paste the link from google calendar, then validate
- after a few seconds, events from the google calendar should show up
- profit !
sharing a nextcloud calendar in google :
you could use the subscription link from nextcloud and add it to your google calendar… but as google only refreshes external calendar not so frequently (like every 24 hours), this is not really a satisfying solution.
after a long time googling for a solution i found this : GitHub - derekantrican/GAS-ICS-Sync: A Google Apps Script for syncing ICS/ICAL files faster than the current Google Calendar speed
as explained in the read me :
- copy paste this script to your own google app script interface
- edit the script and modify some values :
- line 21 paste the subscription link from your nextcloud calendar and choose the calendar name that will appear in google calendar
- lines 24 to 39 review options and modify as needed (especially refresh interval, by default : 15 min)
- on the top menu select “install” function", then click on “run”
- on the top menu select “startSync” function, then click on “run”
- you will need to grant permissions for this script to edit your calendar
- after a few seconds events form your nextcloud calendar should show up on your google calendar
nb : obvisouly you have to make sure google can access your nextcloud instance. for example, i had set uo cloudflare in front of my instance to block connections from other countries than mine. i had to add a rule allowing google AS before the rule blocking all countries but mine.