Check out python-slackclient on GitHub.
To run your program when Slack events occur, use the Slack Trigger.
When using Slack module for the first time, follow the prompt to authorize access.
You can add additional accounts from 'Select Workspace' dropdown in the Slack module settings
Select the workspace that you would like to work with.
Create a Channel
Write to a Channel
Get a List of Channel Members
Invite Users to a Channel
Get Channel's History of Messages
Name (required)
Make Private
New_Channels_Id : String
Choose any channel in your Workspace.
Message
As Bot (Choose whether to send the message as a bot or as yourself)
Action_status : String
Choose any channel in your Workspace.
List_Of_Channel_Members : [String,]
Choose any channel in your Workspace.
Users IDs
Action_status : String
Choose any channel in your Workspace
Number of Messages to Retrieve
Message_History = [{username : String,text : String,timestamp : Date,is_bot : Bool,attachments : [{title : String,text : String,author_name : String,fallback : String,color : String,pretext : String,author_link : Url,author_icon : Url,title_link : Url,image_url : Url,fields : [{title : String,value : String,short : Bool,},],thumb_url : Url,footer : String,footer_icon : Url,timestamp : Date,},],},]
Choose a channel in your Workspace where the command you would like to run is available.
Command: The slash command you would like to run. (e.g. /poll "A question" "An answer" "Another Answer") Click here to learn about Slack slash commands.
Legacy Token: Your Legacy account token. Running slash commands via API requires a legacy account token. You can generate a token for your workspace here: https://api.slack.com/custom-integrations/legacy-tokens
Action_status : String
Get a User's Member ID
Lookup a User by their Email
Send a Direct Message
Choose a User
Member_ID : String
User = {username : String,real_name : String,id : String,is_admin : Bool,is_app_user : Bool,is_bot : Bool,is_owner : Bool,is_primary_owner : Bool,is_restricted : Bool,is_ultra_restricted : Bool,profile : {display_name : String,email : String,phone : String,skype : String,status_emoji : String,status_text : String,status_expiration : String,title : String,image_192 : Url,image_24 : Url,image_32 : Url,image_48 : Url,image_512 : Url,image_72 : Url,},timezone : String,tz_label : String,}
Message
Action_status : String
Message
Users to Message
As Bot (Choose whether to send the message as a bot or as yourself)
Action_status : String
You cannot message "Slackbot," and you must include a minimum of two users besides yourself to include in the chat.