The Slack BOT program to keep track of STEPN.
It analyzes the following images and records the GST earned or used in the game in a Google Spreadsheet.
- Results screen after walking
- Screenshot of shoe level up
- Screenshot of Shoe repair
- Create an application and get URL of this application
- Create a channel for BOT
- Prepare a bot token and a signing secret and keep them on hand (ref)
- Enable events(ref)
- Set the URL prepared by preparation for Heroku
- Add
message.channels
to subscribe event - Add the application prepared in steps 2~5 to the channel created in step 1
- Activate Cloud vision API
- Prepare a service account to access Cloud vision API and download the service account key
- Activate Google Sheets API and Google Drive API
- Create a new Google Spreadsheet and note the sheet ID.
- Set environment variables on the app's dashboard. Set the following environment variables, referring to
.env.sample
SLACK_SIGNING_SECRET
: Signing Secret prepared in preparation for SlackSLACK_BOT_TOKEN
: Bot token prepared by SlackGOOGLE_SHEET_ID
: ID of Google Spreadsheet prepared by GCPGOOGLE_CREDENTIALS
: Copy and paste the contents of the service account key downloaded in preparation for GCP.
- Deploy this app to heroku
Post the results screen to the Slack channel after the walk.
Take the following screenshot and post it to Slack
Take the following screenshot and post it to Slack