Upgrading to Nextcloud 18 broke both importing public Google calendars and external calendars so that they don’t update automatically. Fortunately, both of these issues have workarounds

---

Importing Google Calendars

Nextcloud needs a .ics or .ical file. To get a public Google calendar’s .ics location (as of 5/8/20), you need to get the src/cid of the Google calendar. All Google calendars have this in the external URL.

For example, for embedded calendars (in this example the Codeforces calendar) you can find the cid by clicking on the plus button in the bottom right corner which will open the following URL:

https://calendar.google.com/calendar/render?cid=k23j233gtcvau7a8ulk2p360m4%40group.calendar.google.com&ctz=America/Chicago

Alternatively, you can get also use inspect element which will yield the following URL containing the src:

https://calendar.google.com/calendar/[email protected]&ctz=America/Chicago&hl=en&wkst=1

Then take everything after src=, cid=, or /ical/ and up to the next & sign, oftentimes this will look something like [id]@group.calendar.google.com. Then, take this string and add it to the following:

https://calendar.google.com/calendar/ical/[add here!]/public/basic.ics

For example, using the Codeforces calendar you'd grab [email protected] and add get the following:

https://calendar.google.com/calendar/ical/[email protected]/public/basic.ics

Automatic iCal link creator

Alternatively, you can enter in the calendar link in the following textbox and it should spit out the correct iCal link:

 

You can then use this URL to as the external URL in the Nextcloud Calendar app.

Automatically Updating Calendars

The default subscription refreshing interval is of one week (unless the subscription itself asks for a different rate).

You may override it with something like:

sudo -u www-data php /var/www/html/occ config:app:set dav calendarSubscriptionRefreshRate --value "P1DT6H"

which would set the interval to 1 day and 6 hours. The --value data type is DataInterval.