Slack
Slack use Incoming Webhooks whose constructs typically support both text and block rich text, and can be configured as follows:
Text formatâ
{
"text": "#{@title}\nPlatform: #{@device_type}\nUpload at: #{@uploaded_at}"
}
Block rich text formatâ
A simple block with markdown support
{
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "## #{@title}\nPlatform: #{@device_type}\nUpload at: #{@uploaded_at}\nInstal QRcode:\n"
}
}
]
}
Better look at some of the structures shown in the block
{
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": @title,
}
},
{
"type": "section",
"fields": [
{
"type": "mrkdwn",
"text": "*Platform:*\n#{@device_type}"
},
{
"type": "mrkdwn",
"text": "*Upload at:*\n#{@uploaded_at}"
}
]
},
"accessory": {
"type": "image",
"image_url": @qrcode_url,
"alt_text": "install qrcode"
}
]
}