Gomi-man-bot retrieve duties from google calendar, assign users to them, and notify about it.
Send help
to gomi-man-bot and you'll get discriptions about enable commands.
The example procedure is following.
- Create duty on google calendar. That time, Please add prefix
clean:
to dutie's name. - Save user to the app:
save me as <B4|M1|M2>
- Set channel for notification:
channel set <name>
- Assign users to duties:
assign users
(this procedure is automatically execute in the first day in the month) - You'll get notification in the day before the assigned day through the specified channel!
First you need to get client secret and client id for google api authorization on slack bot.
- Through Google api console, create project, enable google calendar api, and get authorization information (client secret, client id)
- Create
auth.json
under a scripts directory
{
"clientSecret": "your client secret",
"clientId": "your client id"
}
- Install Heroku toolbelt
heroku login
heroku create [app-name]
heroku addons:create redistogo:nano
- Create slack integration, retrieve hubot slack token, and set it to app by
heroku config:set HUBOT_SLACK_TOKEN=[your token]
heroku config:set HUBOT_HEROKU_KEEPALIVE_URL=[your bot app url]
(url
is web_url in the result ofheroku apps:info
)git push heroku master
- Throgh slack, send
auth get url
to gomi-man-bot and get url - Access the url and retrieve authorization code (
https://www.google.co.jp/?code=<your authorization code>&gws_rd=ssl
) - Get and store access token by
auth with <code>