Brian Roepke
11/06/2023, 5:27 PMBrian Roepke
11/06/2023, 6:28 PMmessage_block = dict(
{
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "New Paid Time Off request from Fred>",
},
}
]
}
)
and sending as the block:
send_incoming_webhook_message(
slack_webhook=slack_webhook, text=text_only_message, slack_blocks=message_block
)
Brian Roepke
11/06/2023, 6:29 PMBrian Roepke
11/06/2023, 7:18 PMmessage_blocks = [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "Hello, world!"
}
},
{
"type": "divider"
},
{
"type": "section",
"fields": [
{
"type": "mrkdwn",
"text": "*Priority:* High"
},
{
"type": "mrkdwn",
"text": "*Due:* Tomorrow"
}
]
},
{
"type": "actions",
"elements": [
{
"type": "button",
"text": {
"type": "plain_text",
"text": "Complete Task"
},
"value": "complete_task"
}
]
}
]
Brian Roepke
11/06/2023, 7:18 PMNate
11/07/2023, 2:05 AMmessage_block = dict(
{
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "New Paid Time Off request from Fred>",
},
}
]
}
)
the text is showing up plain in slack??Brian Roepke
11/07/2023, 2:05 AM