A simple and messy NodeJS script to sync Google Calendar with Slack presence.
- Make sure you have Node installed.
- Navigate to the directory you plan to run the app from.
- Install the Google API package for NodeJS:
npm install googleapis@27 --save
- Install the Slack Client package for NodeJS:
npm install @slack/client
- Obtain a Slack refresh token with access privilege to
dnd:write
andusers.profile:write
- Copy the refresh token into the
SLACK_TOKEN
environment variable for your system - Go to https://developers.google.com/calendar/quickstart/nodejs and follow the instructions to obtain a
credentials.json
file. - Copy this
credentials.json
file into your app directory. - Run the app with
node .
in the app directory. - When prompted, grant Google with the access privileges request.
- The app should continue by syncing your Google Calendar events with your Slack presence.
- Subsequent runs of the app should correctly sync your Google Calendar with your Slack presence.