vimal mishra vimal mishra - 1 month ago 6
Node.js Question

How do I add a URL inside the field option in a Slack attachment?

I am trying to send notifications into the Slack channel from the external source. I am trying to put the URL link inside field tag of attachment. Is there a way to do that?

"attachments": [
"fallback": "Required plain-text summary of the attachment.",

"color": "#36a64f",

"pretext": "Optional text that appears above the attachment block",

"author_name": "Bobby Tables",
"author_link": "",
"author_icon": "",

"title": "Slack API Documentation",
"title_link": "",

"text": "Optional text that appears within the attachment",

"fields": [
"title": "Priority",
"value": "High",
"short": false

"image_url": "",
"thumb_url": ""


Yes, you can use URLs in fields. But it only works in the value tag. There you can even use markup.

Here is an example in PHP:

$slack->addAttachment( array (
    "fallback" => "Fallback",
    "title" => "Title",
    "text" => "text",
    "fields" => array (
        array (
            "title" => "Priority",
            "value" => "<|test>",
            "short" => false