git clone https://github.com/BadIdeaFactory/scriptchat-bot.git
cd scriptchat-bot
npm ci
In order to deploy the endpoint run:
npx serverless deploy
To set up an app in Slack,
- Create an app here: https://api.slack.com/apps
- Set up as a bot
- Add a Slash command
- Set up permissions. Needs:
channels:history
,commands
,groups:history
,im:history
,mpim:history
,users:read
- Add to a test Slack
You will need an authenticated aws-cli. The default behavior is to use a profile named "personal."
This uses AWS Secret Manager parameters to store secrets. Get the OAuth token from the OAuth & Permissions tab on the Slack App admin and the signing secret from Basic Information tab, then create a scriptchat-bot secret with SLACK_TOKEN and SLACK_SIGNING_SECRET.