Slack POST message with image_url

Hello,

I am trying to post a message by Slack node with image_url, but I found the image_url did’t send out … anyone can help with this issue?

@kelvinyasu welcome to the community. Yes, I just checked this out, and it’s not working. The slack documentation is advising to use block kit instead of attachments. Actually, for them, the attachment field is legacy. Sadly the implementation of block kit we have right now supports only buttons, however adding images should not be difficult. Will add this to me list and keep you posted. Thanks for letting us know.

1 Like

Thanks…
I am also trying see if I can do JSON parameters with Blocks format… but I am getting the error with “invalid_blocks_format”, do you got any idea if its work with JSON parameters?

I am trying to put this in the Blocks:

{
    "type": "image",
    "title": {
      "type": "plain_text",
      "text": "Please enjoy this photo of a kitten"
    },
   "block_id": "image4",
   "image_url": "http://placekitten.com/500/500",
   "alt_text": "An incredibly cute kitten."
}

@kelvinyasu you were almost there, the block field is an array of objects. Check the example below.

 [{
    "type": "image",
    "title": {
      "type": "plain_text",
      "text": "Please enjoy this photo of a kitten"
    },
   "block_id": "image4",
   "image_url": "http://placekitten.com/500/500",
   "alt_text": "An incredibly cute kitten."
}]
1 Like