Go SlackBot
We are running an slack bot that listens to bot messages in a specified channel to reply to user. This connection is created using RTM stream connection with slack.
Slack Channel --> Message to SlackBot --> Parse Message --> Reply --> Go to slack channel
Slack parameters needed:
- token: Bot User OAuth Token in OAuth & Permissions
- channelName: Default channel to be used
- signingSecret: Available in App Credentials
- clientId: Available in App Credentials
- clientSecret: Available in App Credentials
Add slack button: https://api.slack.com/docs/slack-button
Enable Home tab to show home screen:
Add interactivity URL for callbacks in section: Interactivity & Shortcuts
URL from current project: /api/v1/slack/interaction
Add slash comment in section: Slash Commands
Slash comment API: /api/v1/slack/command (All commands handled in same API)
Enable events API callback on receiving mentions, home page view etc to take action in Event Subscriptions section:
Event API: /api/v1/slack
Subscribe bot for different events that we want to be called in event API webhook specified: