Slackbot which uses the Clarifai image recognition api to automatically comment on photos as they are uploaded in a channel.
- Create an
.env
file. - 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
.env
file asSLACK_TOKEN={YOUR TOKEN HERE}
- Create an app in Clarifai.
- Find the Client ID and Client Secret fields values and set your
CLARIFAI_ID
andCLARIFAI_SECRET
values in.env
- Run
npm install
- Run
npm start
- In
.env
set theEMOJI
var to the name of a different emoji APP_NAME
can 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.