Created
September 8, 2022 13:26
-
-
Save marvinhoxha/32a30ceaa168c9b041ed9d5d0d13b97b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def send_photo_to_slack(result): | |
image = open("foo.png", 'rb').read() | |
client = WebClient("Slack_Bot_User_OAuth_Token") #input OAuth token | |
client.files_upload( | |
channels = "Slack_channel_id", #input channel id | |
initial_comment = f"{result}", | |
filename = "dog photo", | |
content = image | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment