O'Reilly logo

Mastering Bash by Giorgio Zarrelli

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Message attachments

A message attachment lets us convey more content to the user, and lets it be displayed with more whistles and bells; but we have to keep an eye on a restriction imposed by Slack: no more than 20 attachments per message. It makes sense, otherwise our messages would be so messy that it would distract the average user.

What we have seen so far is a simple JSON: a one-level object, which is more or less like this example:

{    "text": "This is the first line of a messagen    This is the second line."}

In a message attachment, though we are going to see more details, more content modifier, and a flat structure like the one we just saw that has not enough complexity to convey all the information. We need structured container, still ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required