Slack integration with Google calendar.
- Set up ngrok if you need to tunnel to your localhost from Slack:
./ngrok http 8080
-
Create a new Google Developer App and create a client-secrets.json file:
https://console.developers.google.com/project/slack-gcal/apiui/credential/oauthclient- Application type:
Web application
- Name:
Web App
- Authorized redirect URIs:
http://localhost:8080/oauthcallback
https://<something>.ngrok.io/oauthcallback
- Put this .json file in
src/main/resources/slack-gcal-test-browser-client-secrets.json
.
- Application type:
-
Change
val serverRootUrl
inSlackCalendarService.scala
to the ngrok host above. -
To run this:
sbt ~re-start
- Create a new Slack Slash Command.
https://meetuphq.slack.com/services/new/slash-commands- Command:
/findtimes
- URL:
(ngrok above)
- Method:
POST
- Description:
Finds free time on Gcal with @users as attendees.
- Usage hint:
@user[,@user,...] [YYYY-MM-dd'T'HH:mm:ssZ]
- Command:
- Make this use a Service Account rather than do this OAuth2 nonsense across Slack.
https://developers.google.com/identity/protocols/OAuth2ServiceAccount