RSVPBot has an optional feature that allows users to create an event on a Google Calendar.
Once added to the calendar, changes to the event (things like date
, time
, duration
,
location
) will be reflected on the calendar. Additionally, people who have replied with
rsvp yes
or a similar affirmative rsvp will be added as attendees for the calendar event
with a status of attending. Similarly, people who have rsvp'd with rsvp maybe
will be added
as attendees who are maybe attending.
In order to set this up, you'll have to:
- Set up a Google Service Account
- Set two environment variables
- Give an email address from your Google Service permission to create events on the Google Calendar.
- Go to the Google Developer Console and create a new project if needed.
- Click the Create Service Account button to create a new project and service account.
- When you're creating the new service account, make sure to check the box to download a new private key file as a JSON file.
- Download the key file, and put it somewhere safe.
- Set the path to this file in an environment variable:
export GOOGLE_APPLICATION_CREDENTIALS="/path/to/file"
- Also note the Service account ID, which will look like an email address and will be needed later.
- Go to the calendar you want the bot to be able to add events to.
- Go to the Calendar Settings of this calendar.
- Look for the Calendar Address section, where you.ll find something like:
(Calendar ID: cal_id@group.calendar.google.com)
- Set this value in an environment variable:
export GOOGLE_CALENDAR_ID="cal_id@group.calendar.google.com"
- Go to the "Share this Calendar" tab of the same Calendar Settings page used previously
- Go to the "Share with specific people" section.
- For the person's email address, use the Service account ID from earlier.
- For permissions, select "Make changes to events".
- Click "Add Person".