Send message
Tags: #slack #message #send
Author: Martin Donadieu

Input

Import needed library

1
from naas_drivers import slack
Copied!

Put your slack token

1
token = "xoxb-232887839156-1673274923699-vTF6NOKOMosoPFI7qfnkCdRF"
Copied!

Model

Set your message

1
channel = "-team-tech"
2
message = "second test"
3
image_url = "http://i.imgur.com/c4jt321l.png" # Set to None if you don't need it
Copied!

Output

Send it

1
sk = lack.connect(token)
2
sk.send(channel, "second test", image=image_url)
Copied!
Copy link
Edit on GitHub