mutheud / slackbot

MIT License
0 stars 0 forks source link

Add slack integration #2

Open mutheud opened 2 years ago

mutheud commented 2 years ago
DavisRayM commented 2 years ago

Kindly share link to the API documentation you plan to use below

mutheud commented 2 years ago

SEND COMMANDS

Prerequisites: Install package slack_bolt - A Python framework to build Slack apps in a flash with the latest platform features. Install python slack SDK( pip install slack_sdk) - offers several APIs to build apps:

  1. Web API
  2. OAuth
  3. RTM API

1. create a new slack workspace

2. Create a slack app

  1. Obtain the channels ID and use it like this:

{ “channel”: “MY_CHANNEL_ID”, “Text”: “Hello, world” } Publishing my message

  1. Using chat.postMessage API call

API Documentation: https://api.slack.com/web Slack tutorial: https://github.com/slackapi/python-slack-sdk/tree/main/tutorial

@DavisRayM

DavisRayM commented 2 years ago

LGTM, Kindly go ahead and submit a PR when ready

mutheud commented 2 years ago

READ COMMANDS

1. Reinstall Slack App 2. Slack scope:

   a) Bot -> i)channels:read
                 ii)channels:history

   b) User -> i)im:read
                   ii)group:read
                   iii)im:history
                   iv)groups:history

3. Slack events respective to the slack scope chosen @DavisRayM