Slackbot which uses the Clarifai image recognition api to automatically comment on photos as they are uploaded in a channel.
- Create an
.envfile. - Configure a Slack integration. Instructions can be found by by following this path:
https://{slack directory}/apps/build. Add your - Find the application token and copy it into your
.envfile asSLACK_TOKEN={YOUR TOKEN HERE} - Create an app in Clarifai.
- Find the Client ID and Client Secret fields values and set your
CLARIFAI_IDandCLARIFAI_SECRETvalues in.env - Run
npm install - Run
npm start
- In
.envset theEMOJIvar to the name of a different emoji APP_NAMEcan also be customized.
Comment templates are located in messages.js. The app uses string-template to consume a list of tags (guesses about the contents of the image) Clarifai supplies to the image.
