A slack event bot built with serverless/typescript/webpack using AWS Lambda & API Gateway, that will recieve slack events and respond to them in various ways
- AWS Account
- Slack Account
- run
yarn installto install dependencies - Install a slack app to the workplace
- On the app, go to the
Basic Informationpage and get the Verification Token setting this asSLACK_SIGNING_TOKENin your.envfile - run
SLACK_SIGNING_TOKEN=123 sls deployto deploy the app - Add a slack app and click on
Event Subscriptions- You will be asked to enter a URL, enter the URL output the from Serverless deploy step
- This will respond to the verification challenge, and turn verified
- If you have issues, check the aws cloudfront logs for the slack bot lambda
- In the
Subscribe to events on behalf of userssection add the following- member_joined_channel
- team_join
- Go to the
OAuth Tokens & Redirect URLspage and in theUser Token Scopessection and check the following is enabled- channels:read
- groups:read
- users:read
- Go to them
Install Apppage and click to add the app to your workspace. You will be asked to grant permissions. - Search for an app called
botsin the slack app directory- Click Add to slack
- Add a suitable bot name and image, This will be shown with the message.
- get the API Token and set as
SLACK_TOKENin your.envfile
- Run
SLACK_SIGNING_TOKEN=123 SLACK_TOKEN-abc sls deployto deploy the application complete with slack tokens - Create a new user and join
Generaland see an epehemeral message in action.
Hi member, welcome to the Pact Foundation community!
Please join the relevant channels for your Pact implementation, so you can discuss your issues with the audience who can best help you.
If you need help with an issue please check your DM from the welcome bot for more info.
- Join a new channel and see an ephemeral message in action.
Hi member, Thanks for joining a new Pact Foundation channel. Feel free to ask questions
See https://app.slack.com/app-settings/T5F60FXSQ/A017BFQ1XPB/app-manifest