Modbot Docs
Moderation

Google Calendar

Connecting Modbot to a Google calendar your group owns, putting your events on it, and handing out the calendar's public links.

Modbot can put your group's events on a Google calendar that your group's owner owns. You give Modbot a key for its own Google address, share the calendar with that address, and press Check: Modbot signs in to Google and tells you whether it can see the calendar, whether it may change its events, and whether the calendar is public. Then you turn Keep Google updated on, and Modbot keeps the calendar in line with the events you plan. When the calendar is public, Modbot shows its own links, ready to copy.

Everything here is in Settings, Google Calendar, and needs Change settings. The page lists the four steps below in short, with a How to set up link to this page.

What you need

  • A Google account that owns the calendar, or can share it. A personal Gmail account works.
  • A Google Cloud project, with the Google Calendar API turned on. It costs nothing.
  • A service account in that project, and a JSON key for it. The service account is the Google address Modbot signs in as. It is not a person, and it has no Gmail inbox.

Modbot can only see the calendars you share with its address, nothing else in your Google account.

Google Workspace accounts

If the calendar belongs to a school or company Google account, its admin decides two things that can stop this working:

  • whether calendars may be shared with addresses outside the organisation;
  • whether keys may be made for service accounts at all. Organisations made since May 2024 block this until an admin allows it.

If either is blocked, ask the admin, or use a calendar on a personal account.

Set it up

1. Make the key in Google Cloud

  1. Go to console.cloud.google.com and make a new project, or pick one you already have.
  2. Open APIs & Services, Library, find Google Calendar API and click Enable.
  3. Open IAM & Admin, Service accounts, and click Create service account. Give it a name such as modbot. It needs no roles in the project: skip those steps.
  4. Open the new service account, go to Keys, Add key, Create new key, choose JSON and click Create. Your browser downloads a .json file.

That file is the key. Anyone who has it can change any calendar shared with that service account, so keep it like a password, and delete your downloaded copy once Modbot has it.

2. Give the key to Modbot

In Modbot, go to Settings, Google Calendar, and click Choose key file. Pick the .json file. Modbot keeps only the parts it needs: the service account's address, the key's id, the project's id and the private key, which is encrypted and never shown again. The page then shows Key file: Saved and Modbot's Google address, which ends in iam.gserviceaccount.com. Click Copy beside it.

Modbot refuses a file that is not a service account key with This is not a Google key file.

3. Share the calendar with Modbot

In Google Calendar on a computer:

  1. Make a new calendar just for your group's events.
  2. Hover over it under My calendars, click the three dots, and choose Settings and sharing.
  3. Under Share with specific people or groups, click Add people and groups, paste Modbot's Google address, and set it to Make changes to events. Click Send.
  4. Further down, under Integrate calendar, copy the Calendar ID. It looks like c_…@group.calendar.google.com.

4. Enter the calendar and Check

Back in Modbot, paste the Calendar ID and click Save. The calendar's public address, its embed link or its iCal address work too: Modbot takes the ID out of them.

Then click Check.

What Check shows

Check signs in to Google with the key and reads the calendar. It changes nothing on Google.

LineWhat it means
CalendarThe calendar's name on Google.
Time zoneThe calendar's own time zone, set in its Settings and sharing.
Can change eventsYes when the calendar is shared with Modbot's Google address with Make changes to events or more.
PublicYes when it is public with every detail, Free or busy only when the public sees only busy times, No when it is not public. Unknown when Google would not say.

What Check found stays on the page until you change the key or the calendar. Change either and Check again.

When Check finds a problem

Modbot saysWhat to do
Google did not accept the key.The key was deleted or disabled in Google Cloud, or the service account was. Make a new key and choose it again.
The server's clock is off.Google refuses a sign-in whose times are more than a few minutes out. Set the clock on the machine Modbot runs on.
Modbot can't see this calendar.The calendar is not shared with Modbot's Google address, or the Calendar ID is wrong. Check both.
Modbot can only read this calendar.It is shared as See all event details. Change that to Make changes to events.
Google is limiting Modbot. Try again after …Google answered that Modbot was asking too often. Modbot sends nothing to Google until that time, Check included, and Check comes back by itself.
Google did not answer.Google could not be reached. Try again later.

Anything else is Google's own words.

To let anyone see the calendar, open its Settings and sharing in Google Calendar and tick Make available to public, with See all event details. Press Check again in Modbot: Public says Yes, and a Links card appears with three of Google's own links, each with Copy:

LinkWhat it is for
SubscribeAdds the calendar to someone's own Google Calendar. It works on a computer, not in Google's phone apps.
Public pageThe calendar as a web page anyone can open, in the calendar's time zone.
iCal addressFor any calendar app that subscribes by address: Outlook, Apple Calendar, event directories. It works only while the calendar is public.

These links show what is on the Google calendar and nothing else. They are safe to hand to members, put on a website or give to an event directory. Calendar apps that subscribe by address, Google's own included, check it on their own schedule, so a change can take hours to show there.

A public calendar can be found by search engines once it is embedded on a website they read.

Modbot has a public address of its own too: the calendar's public feed, which lists the public events you plan in Modbot. The Google links list what is on the Google calendar.

Sync to Google

Once Check says Can change events: Yes, a Sync to Google card appears. Turn Keep Google updated on, and Modbot adds the events ticked for Google Calendar to the calendar, then keeps them in line: an edit reaches Google about twenty seconds after the last change, so several quick fixes are one change there.

On GoogleWhat Modbot does
New eventsAn event made from a template or a copy, and that everyone may see, starts going to Google; one made from nothing goes there once you change something on its Google Calendar tab. One read in from VRChat's calendar is ticked too.
Events planned beforeTick all upcoming events ticks every scheduled or open event everyone may see.
Events only members seeNever sent, ticked or not. A public Google calendar would show them to anyone.
A repeating eventOne Google event that repeats, as in Modbot. A date cancelled on its own is left out of it; a date moved or given its own title or description is changed on Google on its own.
An editSent again whole. A change made on Google itself is replaced by Modbot's next change, so edit events in Modbot.
A cancelled eventKept, with Cancelled: in front of its title, until a day after the date it was cancelled on; then removed. A repeating one stops at that date.
A deleted eventRemoved from Google at once.
A finished eventKept on Google as history.
Turning Keep Google updated offNothing more is sent. What is on Google stays as it is.

What goes on each event: its title, its description, its times in its own time zone, its repeat, the world's name as the place, and the world's page on vrchat.com. The description is plain text, with one exception: if the event has its own Google Calendar description, [words](https://address) and bare web addresses in it become clickable links. No picture, no join link, and nobody is invited or emailed.

Delete Modbot's events from Google

Delete Modbot's events from Google turns Keep Google updated off and deletes every event Modbot put on the calendar. Modbot asks first: click it again to go ahead. It deletes a few each pass, so a full calendar takes a minute or two. Events you made on the calendar yourself are left alone. Google keeps deleted events for a while as cancelled entries you do not see.

On each event

Each event on the calendar page says how it went on Google: Google Calendar: Sending…, Published with Open, which opens the event on Google, Failed with Google's own words and Try again, or Removed. An event ticked for Google Calendar while Google is not set up, or while Keep Google updated is off, says Not set up.

In the event form, the Google Calendar tab turns sending on for that event. See Where it goes and Google Calendar on the Calendar page.

When Google says no

What happensWhat Modbot does
Google is asking Modbot to slow downModbot sends nothing to Google until the time Google asked for, at least 15 minutes, and Health says Google Calendar · limited until …. Nothing is lost: the events wait and go once it is over.
The calendar is no longer shared with Make changes to eventsThe event says Modbot can't change events on this calendar., and Modbot stops sending until you share it again and press Check.
The key was deleted in Google CloudCheck shows Google did not accept the key., and Modbot stops sending until you give it a new key and press Check.
Google did not answerA minute later Modbot looks on the calendar for the event before adding it again, so it is not added twice.

Changing the calendar

Save a new Calendar ID and press Check: Modbot deletes its events from the old calendar and adds them to the new one.

Forget

Forget removes the key, the Calendar ID and what Check found from Modbot, and turns Keep Google updated off. Modbot asks first: click Forget again to go ahead. It changes nothing on Google: the events Modbot put there stay, unless you used Delete Modbot's events from Google first, and the calendar stays shared with Modbot's Google address until you remove that in Settings and sharing, and the key keeps working until you delete it in Google Cloud. See Removing the key.

What leaves your server

Check sends Google a request signed with the key, naming Modbot's Google address, and the Calendar ID. While Keep Google updated is on, Modbot also sends the calendar each event ticked for it, as listed above. Events only your members see, member names, ids, head counts, pictures and moderation data are never sent. See What leaves your server.

In the audit log

Saving the key or the Calendar ID, turning Keep Google updated on or off, Tick all upcoming events, Delete Modbot's events from Google, Forget, and a Check that found something different from the last one are each a Settings changed entry in the audit log. The key is recorded only as changed, never what it was. Each event added to or removed from Google, and each failure, is an entry of its own on the event.

Modbot is not endorsed by or affiliated with VRChat Inc. or Discord Inc. VRChat is a trademark of VRChat Inc. Discord is a trademark of Discord Inc. SteamVR is a trademark of Valve Corporation. Windows is a trademark of Microsoft Corporation. Docker is a trademark of Docker, Inc. PostgreSQL is a trademark of the PostgreSQL Community Association of Canada. Railway is a trademark of Railway Corp. Other names are trademarks of their respective owners; see Legal. Modbot and its logo are trademarks of the Modbot project. Open source under AGPL-3.0.

On this page