Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/miteshsharma/slackbot
Creating a slack bot with event API, web API, and RTM stream connection to chat with a bot in specified channel
https://github.com/miteshsharma/slackbot
golang notification slackbot test
Last synced: 7 days ago
JSON representation
Creating a slack bot with event API, web API, and RTM stream connection to chat with a bot in specified channel
- Host: GitHub
- URL: https://github.com/miteshsharma/slackbot
- Owner: MiteshSharma
- License: mit
- Created: 2022-07-09T11:57:09.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2022-09-25T15:05:56.000Z (about 2 years ago)
- Last Synced: 2023-03-05T02:03:23.502Z (over 1 year ago)
- Topics: golang, notification, slackbot, test
- Language: Go
- Homepage:
- Size: 95.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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:
1. token: Bot User OAuth Token in OAuth & Permissions
2. channelName: Default channel to be used
3. signingSecret: Available in App Credentials
4. clientId: Available in App Credentials
5. clientSecret: Available in App CredentialsAdd 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: