Attachements not visible in Slack Block Kit Builder

323 views Asked by At

I've almost copied that from Slack documentation but I can't see attachement part in Block Kit Builder. What am I missing?

{
    "blocks": [
        {
            "type": "section",
            "text": {
                "type": "mrkdwn",
                "text": "bar"
            }
        }
    ],
    "attachments": [
        {
            "fallback": "Plain-text summary of the attachment.",
            "color": "#2eb886",
            "pretext": "Optional text that appears above the attachment block",
            "author_name": "Bobby Tables",
            "author_link": "http://flickr.com/bobby/",
            "author_icon": "http://flickr.com/icons/bobby.jpg",
            "title": "Slack API Documentation",
            "title_link": "https://api.slack.com/",
            "text": "Optional text that appears within the attachment",
            "fields": [
                {
                    "title": "Priority",
                    "value": "High",
                    "short": false
                }
            ],
            "image_url": "http://my-website.com/path/to/image.jpg",
            "thumb_url": "http://example.com/path/to/thumb.png",
            "footer": "Slack API",
            "footer_icon": "https://platform.slack-edge.com/img/default_application_icon.png",
            "ts": 123456789,
            "blocks": {
                "type": "text",
                "text": "test"
            }
        }
    ]
}
1

There are 1 answers

0
RaGe On

Slack's Block Kit Builder page does not support attachments - it's mainly meant for Blocks. Their documentation points out that Attachments are "legacy" and you should only use blocks.

Except it sucks that blocks doesn't do everything attachments does yet. Like color for instance. Your best bet for testing to actually post to slack, perhaps into a private channel.