Miekrif
Miekrif

Reputation: 85

Customizing messages in Slack

There is an example of a message format that I want to achieve, the problem is that I can't find in the documentation how to customize the message in this way (I'm talking about the green line on the left, which changes color depending on Success\Failure) The message itself is generated by a third-party application and sent via integration into Slack. I would appreciate your help in finding docks about this enter image description here

Upvotes: 1

Views: 1334

Answers (2)

Miekrif
Miekrif

Reputation: 85

The last version my code method chat_postmessage can accept blocks and attachments but in slack manual it is written incorrectly

client.chat_postMessage(channel=channel, attachments=[{"color": "#ff0000", "blocks": [
                {"type": "section", "text": {"type": "plain_text", "text": f"{text}"}}]}])

Upvotes: 1

Related Questions