{"id":25507,"date":"2020-01-20T23:43:44","date_gmt":"2020-01-20T15:43:44","guid":{"rendered":"https:\/\/www.hongkiat.com\/blog\/?p=25507"},"modified":"2020-01-20T20:29:45","modified_gmt":"2020-01-20T12:29:45","slug":"send-messages-to-slack","status":"publish","type":"post","link":"https:\/\/www.hongkiat.com\/blog\/send-messages-to-slack\/","title":{"rendered":"How to Send Customized Messages to Slack From your App"},"content":{"rendered":"<p><a target=\"_blank\" href=\"https:\/\/slack.com\/\" rel=\"noopener noreferrer\">Slack<\/a> is a popular messaging app used by many teams. It comes with a lot of services and an API for developers to integrate it with their applications. In today\u2019s post we\u2019ll see how to use one of its services called <a href=\"https:\/\/api.slack.com\/incoming-webhooks\">Incoming Webhooks<\/a>, to send data to slack from an external application.<\/p>\n<p>This way we can <strong>easily send messages to Slack from any application we already have<\/strong>; we can send reports, updates, news, notifications and more. For this post, I\u2019ve used JavaScript in the example. To begin,  sign into your team\u2019s Slack account.<\/p>\n<div class=\"ref-block ref-block--post\" id=\"ref-post-1\">\n\t\t\t\t\t<a href=\"https:\/\/www.hongkiat.com\/blog\/slack-productivity-tools\/\" class=\"ref-block__link\" title=\"Read More: 10 Useful Slack Tools For Better Productivity\" rel=\"bookmark\"><span class=\"screen-reader-text\">10 Useful Slack Tools For Better Productivity<\/span><\/a>\n<div class=\"ref-block__thumbnail img-thumb img-thumb--jumbo\" data-img='{ \"src\" : \"https:\/\/assets.hongkiat.com\/uploads\/thumbs\/250x160\/slack-productivity-tools.jpg\" }'>\n\t\t\t\t\t\t\t<noscript>\n<style>.no-js #ref-block-post-24081 .ref-block__thumbnail { background-image: url(\"https:\/\/assets.hongkiat.com\/uploads\/thumbs\/250x160\/slack-productivity-tools.jpg\"); }<\/style>\n<\/noscript>\n\t\t\t\t\t\t<\/div>\n<div class=\"ref-block__summary\">\n<h4 class=\"ref-title\">10 Useful Slack Tools For Better Productivity<\/h4>\n<p class=\"ref-description\">\n\t\t\t\t\t\tSince its launch in 2013, Slack has grown to become a top team communication tool to generate conversations,...\t\t\t\t\t\t<span>Read more<\/span><\/p>\n<\/div>\n<\/div>\n<h2>1. Set up the Integration<\/h2>\n<p>You\u2019ll first have to set up an incoming webhook integration. Go to <em>yourteam.slack.com\/apps\/build\/custom-integration<\/em> and click on <strong>Incoming Webhooks<\/strong>, then select a channel or user you want to post your messages to (this selection can be overridden later in code).<\/p>\n<p>Once done, you\u2019ll see your incoming webhook integration\u2019s configuration page.<\/p>\n<p>Scroll down and there\u2019ll be a Webhook URL in the format <code>https:\/\/hooks.slack.com\/services\/TXXXXXXXX\/BXXXXXXXX\/token<\/code>. Save that URL somewhere, we\u2019ll need it later. You can further change the icon and name of the integration in this page itself, but we\u2019ll do that in code.<\/p>\n<h2>2. Create the Message<\/h2>\n<p>Let\u2019s imagine you\u2019ve already created a web app that seeks out Valentine\u2019s Day sales in popular sites as well as the offer codes for use during the sale, and for some reason, you want to share this result with your Slack team members.<\/p>\n<p>All we have to do now is to use the webhook URL created in the previous step and post a request to it from your application with JSON data, which will concoct the sale offer message.<\/p>\n<p>Let\u2019s first put together the JSON string that\u2019ll be turned into the Slack message. The parameter carrying the JSON data is called payload, hence the JSON string should  look like this:<\/p>\n<pre>var myJSONStr = 'payload= {\"username\": \"SALE BOT\", \"icon_url\": \"example.com\/img\/icon.jpg\", \"channel\": \"#general\"}'\r\n<\/pre>\n<p><code>icon_url<\/code> is the URL to the image that\u2019ll show up as the profile picture, you can also use <code>icon_emoji<\/code> to display an emoji as the profile picture instead, for example <code>\"icon_emoji\": \":gift:\"<\/code>. <code>\"channel\"<\/code> specifies the channel or username who\u2019ll see your message. For username use the syntax <code>\"@username\"<\/code>, for channel <code>\"#channelname\"<\/code>.<\/p>\n<p>Now for the actual message; you can either add the <code>\"text\"<\/code> property and write your message as its value and be done with it, or use the property called <code>\"attachment\"<\/code> to add richly formatted text, which is what we\u2019ll be doing now.<\/p>\n<p>The <code>\"attachment\"<\/code> property of <code>payload<\/code> goes like this:<\/p>\n<pre>\"attachments\": [{\r\n    \"fallback\": \"The attachement isn't supported.\",\r\n    \"title\": \"VALENTINE'S DAY OFFER\",\r\n    \"color\": \"#9C1A22\",\r\n    \"pretext\": \"Today's list of awesome offers picked for you\",\r\n    \"author_name\": \"Preethi\",\r\n    \"author_link\": \"https:\/\/www.hongkiat.com\/blog\/author\/preethi\/\",\r\n    \"author_icon\": \"https:\/\/assets.hongkiat.com\/uploads\/author\/preethi.jpg\",\r\n    \"mrkdwn_in\": [\"text\",\"fields\"],\r\n    \"text\": \"Just click the site names and start buying. Get *extra reduction with the offer code*, if provided.\",\r\n    \"thumb_url\": \"http:\/\/example.com\/thumbnail.jpg\"\r\n}]<\/pre>\n<p><code>\"fallback\"<\/code> is the alternative text to be shown when the Slack message is viewed in an application that doesn\u2019t support message attachment (like in mobile notifications).<\/p>\n<p><code>\"color\"<\/code> is the left border color of the message.<\/p>\n<p><code>\"pretext\"<\/code> is the text that\u2019s shown before the main content.<\/p>\n<p><code>\"author_link\"<\/code> is the URL hyperlinked in author\u2019s name (if provided).<\/p>\n<p><code>\"mrkdwn_in\"<\/code> is an array of property names whose values are shown formatted in the message \u2014 based on markdown syntax like (*) for bold and (_) for italics. The three possible values for <code>\"mrkdwn_in\"<\/code> are \"text\", \"pretext\" and \"fields\"<\/p>\n<p><code>\"thumb_url\"<\/code> is the thumbnail image\u2019s URL.<\/p>\n<p>Here\u2019s how the message will look like so far.<\/p>\n<figure><img decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/send-messages-to-slack\/incoming-webhook-1.jpg\" alt=\"\"><\/figure>\n<p>Now let\u2019s add the fields to the attachment array, which will display the sites and offer codes in two columns.<\/p>\n<pre>\"fields\": [{\r\n    \"title\": \"Sites\", \r\n    \"value\": \"_&lt;https:\/\/www.amazon.com\/|Amazon&gt;_\\n_&lt;http:\/\/www.ebay.com|Ebay&gt;_\",\r\n    \"short\": true\r\n}, {\r\n    \"title\": \"Offer Code\",\r\n    \"value\": \"UI90O22\\n-\",\r\n    \"short\": true\r\n}],\r\n<\/pre>\n<p>Use <code>\\n<\/code> to add line break and the syntax <code>&lt;link|link name&gt;<\/code> to add hyperlinks.<\/p>\n<p>Underscore is used to format text in italics.<\/p>\n<p><code>short<\/code> is set to <code>true<\/code> if the values are to be displayed side by side (like if it\u2019s short). Put together, the JSONString will look like this (keep the string in a single line in actual working code)<\/p>\n<pre>var myJSONStr = 'payload= {\r\n    \"username\": \"SALE BOT\",\r\n    \"icon_url\": \"example.com\/img\/icon.jpg\",\r\n    \"attachments\": [{\r\n        \"fallback\": \"This attachement isn't supported.\",\r\n        \"title\": \"VALENTINE'S DAY OFFER\",\r\n        \"color\": \"#9C1A22\",\r\n        \"pretext\": \"Today's list of awesome offers picked for you\",\r\n        \"author_name\": \"Preethi\",\r\n        \"author_link\": \"https:\/\/www.hongkiat.com\/blog\/author\/preethi\/\",\r\n        \"author_icon\": \"https:\/\/assets.hongkiat.com\/uploads\/author\/preethi.jpg\",\r\n        \"fields\": [{\r\n            \"title\": \"Sites\",\r\n            \"value\": \"_&lt;https:\/\/www.amazon.com\/|Amazon&gt;_\\n_&lt;http:\/\/www.ebay.com|Ebay&gt;_\",\r\n            \"short\": true\r\n        }, {\r\n            \"title\": \"Offer Code\",\r\n            \"value\": \"UI90O22\\n-\",\r\n            \"short\": true\r\n        }],\r\n        \"mrkdwn_in\": [\"text\", \"fields\"],\r\n        \"text\": \"Just click the site names and start buying. Get *extra reduction with the offer code*, if provided.\",\r\n        \"thumb_url\": \"http:\/\/example.com\/thumbnail.jpg\"\r\n    }]\r\n}';\r\n<\/pre>\n<h2>3. Post the Request<\/h2>\n<p>Now to make the post request in JavaScript, use the  function below:<\/p>\n<pre>function postMessageToSlack(){\r\n    var xmlhttp = new XMLHttpRequest(),\r\n        webhook_url = url-you-saved-from-before,\r\n        myJSONStr= json-string-from-above;\r\n    xmlhttp.open('POST', webhook_url, false);\r\n    xmlhttp.setRequestHeader('Content-Type', 'application\/x-www-form-urlencoded');\r\n    xmlhttp.send(myJSONStr);\r\n}\r\n<\/pre>\n<p><strong>Add this function to a button click or page load<\/strong> to see it working.<\/p>\n<p>The final output will look something like this:<\/p>\n<figure><img decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/send-messages-to-slack\/incoming-webhook-2.jpg\" alt=\"incoming webhook\"><\/figure>","protected":false},"excerpt":{"rendered":"<p>Slack is a popular messaging app used by many teams. It comes with a lot of services and an API for developers to integrate it with their applications. In today\u2019s post we\u2019ll see how to use one of its services called Incoming Webhooks, to send data to slack from an external application. This way we&hellip;<\/p>\n","protected":false},"author":145,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[3398],"tags":[1966,3538],"topic":[4521],"class_list":["entry-content","is-maxi"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v22.8 (Yoast SEO v27.5) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>How to Send Customized Messages to Slack From your App - Hongkiat<\/title>\n<meta name=\"description\" content=\"Slack is a popular messaging app used by many teams. It comes with a lot of services and an API for developers to integrate it with their applications. In\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.hongkiat.com\/blog\/send-messages-to-slack\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Send Customized Messages to Slack From your App\" \/>\n<meta property=\"og:description\" content=\"Slack is a popular messaging app used by many teams. It comes with a lot of services and an API for developers to integrate it with their applications. In\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.hongkiat.com\/blog\/send-messages-to-slack\/\" \/>\n<meta property=\"og:site_name\" content=\"Hongkiat\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/hongkiatcom\" \/>\n<meta property=\"article:published_time\" content=\"2020-01-20T15:43:44+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/assets.hongkiat.com\/uploads\/send-messages-to-slack\/incoming-webhook-1.jpg\" \/>\n<meta name=\"author\" content=\"Preethi Ranjit\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@hongkiat\" \/>\n<meta name=\"twitter:site\" content=\"@hongkiat\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Preethi Ranjit\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/send-messages-to-slack\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/send-messages-to-slack\\\/\"},\"author\":{\"name\":\"Preethi Ranjit\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/person\\\/e981676afae36d1ff5feb75094950ab3\"},\"headline\":\"How to Send Customized Messages to Slack From your App\",\"datePublished\":\"2020-01-20T15:43:44+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/send-messages-to-slack\\\/\"},\"wordCount\":627,\"commentCount\":4,\"publisher\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/send-messages-to-slack\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/send-messages-to-slack\\\/incoming-webhook-1.jpg\",\"keywords\":[\"Productivity Tools\",\"slack\"],\"articleSection\":[\"Internet\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/send-messages-to-slack\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/send-messages-to-slack\\\/\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/send-messages-to-slack\\\/\",\"name\":\"How to Send Customized Messages to Slack From your App - Hongkiat\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/send-messages-to-slack\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/send-messages-to-slack\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/send-messages-to-slack\\\/incoming-webhook-1.jpg\",\"datePublished\":\"2020-01-20T15:43:44+00:00\",\"description\":\"Slack is a popular messaging app used by many teams. It comes with a lot of services and an API for developers to integrate it with their applications. In\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/send-messages-to-slack\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/send-messages-to-slack\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/send-messages-to-slack\\\/#primaryimage\",\"url\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/send-messages-to-slack\\\/incoming-webhook-1.jpg\",\"contentUrl\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/send-messages-to-slack\\\/incoming-webhook-1.jpg\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/send-messages-to-slack\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Send Customized Messages to Slack From your App\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\",\"name\":\"Hongkiat\",\"description\":\"Tech and Design Tips\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\",\"name\":\"Hongkiat.com\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wp-content\\\/uploads\\\/hkdc-logo-rect-yoast.jpg\",\"contentUrl\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wp-content\\\/uploads\\\/hkdc-logo-rect-yoast.jpg\",\"width\":1200,\"height\":799,\"caption\":\"Hongkiat.com\"},\"image\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/hongkiatcom\",\"https:\\\/\\\/x.com\\\/hongkiat\",\"https:\\\/\\\/www.pinterest.com\\\/hongkiat\\\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/person\\\/e981676afae36d1ff5feb75094950ab3\",\"name\":\"Preethi Ranjit\",\"description\":\"A .NET developer with a JavaScript background, Preethi is expert in front-end coding, JavaScript, HTML, and CSS.\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/author\\\/preethi\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to Send Customized Messages to Slack From your App - Hongkiat","description":"Slack is a popular messaging app used by many teams. It comes with a lot of services and an API for developers to integrate it with their applications. In","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.hongkiat.com\/blog\/send-messages-to-slack\/","og_locale":"en_US","og_type":"article","og_title":"How to Send Customized Messages to Slack From your App","og_description":"Slack is a popular messaging app used by many teams. It comes with a lot of services and an API for developers to integrate it with their applications. In","og_url":"https:\/\/www.hongkiat.com\/blog\/send-messages-to-slack\/","og_site_name":"Hongkiat","article_publisher":"https:\/\/www.facebook.com\/hongkiatcom","article_published_time":"2020-01-20T15:43:44+00:00","og_image":[{"url":"https:\/\/assets.hongkiat.com\/uploads\/send-messages-to-slack\/incoming-webhook-1.jpg","type":"","width":"","height":""}],"author":"Preethi Ranjit","twitter_card":"summary_large_image","twitter_creator":"@hongkiat","twitter_site":"@hongkiat","twitter_misc":{"Written by":"Preethi Ranjit","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.hongkiat.com\/blog\/send-messages-to-slack\/#article","isPartOf":{"@id":"https:\/\/www.hongkiat.com\/blog\/send-messages-to-slack\/"},"author":{"name":"Preethi Ranjit","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/person\/e981676afae36d1ff5feb75094950ab3"},"headline":"How to Send Customized Messages to Slack From your App","datePublished":"2020-01-20T15:43:44+00:00","mainEntityOfPage":{"@id":"https:\/\/www.hongkiat.com\/blog\/send-messages-to-slack\/"},"wordCount":627,"commentCount":4,"publisher":{"@id":"https:\/\/www.hongkiat.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.hongkiat.com\/blog\/send-messages-to-slack\/#primaryimage"},"thumbnailUrl":"https:\/\/assets.hongkiat.com\/uploads\/send-messages-to-slack\/incoming-webhook-1.jpg","keywords":["Productivity Tools","slack"],"articleSection":["Internet"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.hongkiat.com\/blog\/send-messages-to-slack\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.hongkiat.com\/blog\/send-messages-to-slack\/","url":"https:\/\/www.hongkiat.com\/blog\/send-messages-to-slack\/","name":"How to Send Customized Messages to Slack From your App - Hongkiat","isPartOf":{"@id":"https:\/\/www.hongkiat.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.hongkiat.com\/blog\/send-messages-to-slack\/#primaryimage"},"image":{"@id":"https:\/\/www.hongkiat.com\/blog\/send-messages-to-slack\/#primaryimage"},"thumbnailUrl":"https:\/\/assets.hongkiat.com\/uploads\/send-messages-to-slack\/incoming-webhook-1.jpg","datePublished":"2020-01-20T15:43:44+00:00","description":"Slack is a popular messaging app used by many teams. It comes with a lot of services and an API for developers to integrate it with their applications. In","breadcrumb":{"@id":"https:\/\/www.hongkiat.com\/blog\/send-messages-to-slack\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.hongkiat.com\/blog\/send-messages-to-slack\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.hongkiat.com\/blog\/send-messages-to-slack\/#primaryimage","url":"https:\/\/assets.hongkiat.com\/uploads\/send-messages-to-slack\/incoming-webhook-1.jpg","contentUrl":"https:\/\/assets.hongkiat.com\/uploads\/send-messages-to-slack\/incoming-webhook-1.jpg"},{"@type":"BreadcrumbList","@id":"https:\/\/www.hongkiat.com\/blog\/send-messages-to-slack\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.hongkiat.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Send Customized Messages to Slack From your App"}]},{"@type":"WebSite","@id":"https:\/\/www.hongkiat.com\/blog\/#website","url":"https:\/\/www.hongkiat.com\/blog\/","name":"Hongkiat","description":"Tech and Design Tips","publisher":{"@id":"https:\/\/www.hongkiat.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.hongkiat.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.hongkiat.com\/blog\/#organization","name":"Hongkiat.com","url":"https:\/\/www.hongkiat.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.hongkiat.com\/blog\/wp-content\/uploads\/hkdc-logo-rect-yoast.jpg","contentUrl":"https:\/\/www.hongkiat.com\/blog\/wp-content\/uploads\/hkdc-logo-rect-yoast.jpg","width":1200,"height":799,"caption":"Hongkiat.com"},"image":{"@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/hongkiatcom","https:\/\/x.com\/hongkiat","https:\/\/www.pinterest.com\/hongkiat\/"]},{"@type":"Person","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/person\/e981676afae36d1ff5feb75094950ab3","name":"Preethi Ranjit","description":"A .NET developer with a JavaScript background, Preethi is expert in front-end coding, JavaScript, HTML, and CSS.","url":"https:\/\/www.hongkiat.com\/blog\/author\/preethi\/"}]}},"jetpack_featured_media_url":"https:\/\/","jetpack_shortlink":"https:\/\/wp.me\/p4uxU-6Dp","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/25507","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/users\/145"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/comments?post=25507"}],"version-history":[{"count":3,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/25507\/revisions"}],"predecessor-version":[{"id":49281,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/25507\/revisions\/49281"}],"wp:attachment":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/media?parent=25507"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/categories?post=25507"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/tags?post=25507"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/topic?post=25507"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}