from datetime import datetime
CHANNEL = '#general' # Insert the name of channel here
USERNAME = 'Deepnote Bot'
ICON = 'https://avatars.githubusercontent.com/u/45339858?s=280&v=4' # This is a URL pointing to the icon of your bot.
today = datetime.today().strftime('%B %d, %Y at %H:%M UTC')
MESSAGE_TEXT = f'Experiment status: Success!\nLast run: {today}' # This is a sample message. Replace with your own text.
def post_message_to_slack(slack_token, text, channel, blocks=None):
print('Sending message...')
# Connect to the Slack client via token
client = slack_sdk.WebClient(token=SLACK_TOKEN)
request = client.chat_postMessage(
print('Message was sent successfully.')
request = post_message_to_slack(SLACK_TOKEN, MESSAGE_TEXT, CHANNEL)