{"id":17878,"date":"2016-08-08T16:59:19","date_gmt":"2016-08-08T16:59:19","guid":{"rendered":"http:\/\/apidocs.kore.com\/?post_type=docs&#038;p=4945"},"modified":"2021-08-14T07:08:42","modified_gmt":"2021-08-14T06:08:42","slug":"adding-the-slack-channel","status":"publish","type":"post","link":"https:\/\/developer.kore.ai\/v9-0\/docs\/bots\/channel-enablement\/adding-the-slack-channel\/","title":{"rendered":"Adding the Slack Channel"},"content":{"rendered":"<section class=\"l-section wpb_row height_auto\"><div class=\"l-section-h i-cf\"><div class=\"g-cols vc_row type_default valign_top\"><div class=\"vc_col-sm-12 wpb_column vc_column_container\"><div class=\"vc_column-inner\"><div class=\"wpb_wrapper\">\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<p>To setup Slack as a channel, you must associate the bot with a Slack app. Adding the Slack channel to your Kore.ai bot allows end-users of your bot to interact with your bot using their <em>Slack<\/em> accounts.<\/p>\n<ol>\n<li><b>Create a Slack App<\/b> &#8211; Create and configure a new app in <em>Slack<\/em>, and then copy app data from Kore.ai bot builder into the <em>Slack<\/em> app configuration for the bot name and Redirect URL.<\/li>\n<li><b>Copy Authorization Details<\/b> &#8211; Copy app authorization details from <em>Slack<\/em> to the bot builder Slack channel <strong>Get App Details<\/strong> tab.<\/li>\n<li><b>Create a Bot User in Slack<\/b> &#8211; In <em>Slack<\/em>, add a bot username to identify your bot.<\/li>\n<li><b>Enable the Channel<\/b> &#8211; In Bot Builder, save the channel settings.<\/li>\n<\/ol>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"w-separator size_small with_line width_default thick_1 style_solid color_border align_center\"><div class=\"w-separator-h\"><\/div><\/div>\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<h2><span class=\"ez-toc-section\" id=\"Add_Slack_Channel_to_a_Bot\">Add Slack Channel to a Bot<\/span><\/h2>\n<p>To complete this procedure, you must already have a <em>Slack<\/em> account and be a member of a <em>Slack<\/em> team.<\/p>\n<ol>\n<li>Under the <b>Bots<\/b> section of the bot builder, click the bot to which you want to add the Slack channel.<\/li>\n<li>On the <b>Channels<\/b> tab, click the <b>Slack <\/b>icon. The <b>Slack Channel<\/b> page is displayed.<\/li>\n<li>In a new browser tab, <a href=\"https:\/\/api.slack.com\/\">Login <\/a>to the Slack developer portal and go to the Apps section <a href=\"https:\/\/api.slack.com\/apps\">https:\/\/api.slack.com\/apps<\/a>. If this is your first app, click <b>Create an App<\/b> and if you already have some apps, then click <b>Create New App<\/b>.<br \/>\n<a ref=\"magnificPopup\" href=\"\/wp-content\/uploads\/sites\/21\/1-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-14102 alignnone\" src=\"\/wp-content\/uploads\/sites\/21\/1-1.png\" alt=\"\" width=\"1321\" height=\"463\" \/><\/a><\/li>\n<li>On the <b>Create App<\/b> window, enter <b>App Name<\/b> and select a team from Development Slack Team drop-down list. Use your bot name as the App Name.<br \/>\n<a ref=\"magnificPopup\" href=\"\/wp-content\/uploads\/sites\/21\/2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-14103 alignnone\" src=\"\/wp-content\/uploads\/sites\/21\/2.png\" alt=\"\" width=\"550\" height=\"231\" \/><\/a><\/li>\n<li>After you enter the required information, click <b>Create App<\/b>. Slack will now create a new app and you are redirected to <b>Basic Information<\/b> section of the new app.<\/li>\n<li>Go to <b>OAuth &amp; Permissions<\/b> tab and click <b>Add a new Redirect URL<\/b>. Copy the Redirect URL provided in the <strong>Configurations<\/strong> tab of Slack channel page and enter in the <b>Redirect URLs<\/b> <b>field<\/b>.<\/li>\n<li>Click <b>Add<\/b> &gt; <b>Save URLs<\/b>.<br \/>\n<a ref=\"magnificPopup\" href=\"\/wp-content\/uploads\/sites\/21\/3-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-14112 alignnone\" src=\"\/wp-content\/uploads\/sites\/21\/3-1.png\" alt=\"\" width=\"500\" height=\"284\" \/><\/a><br \/>\n<a ref=\"magnificPopup\" href=\"\/wp-content\/uploads\/sites\/21\/4-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-14108 alignnone\" src=\"\/wp-content\/uploads\/sites\/21\/4-1.png\" alt=\"\" width=\"500\" height=\"292\" \/><\/a><\/li>\n<li>Proceed to the <strong>Bot Token Scopes<\/strong>\u00a0section under the &#8216;Scopes&#8217; section.<\/li>\n<li>Add &#8216;<em>incoming-webhook<\/em>&#8216; and &#8216;<em>chat:write<\/em>&#8216; scopes.<\/li>\n<li class=\"ng-binding\">If you would like your users to send attachments to your bot, then select the \u2018<em>files:write<\/em>\u2019 scope<\/li>\n<li class=\"ng-binding\">If you would like to send Proactive Notifications to your users on Slack, then select the <em>users:read<\/em>, <em>users:read.email<\/em>, <em>team:read<\/em> scopes<\/li>\n<li>In the <strong>OAuth &amp; Permissions<\/strong> tab, navigate to the <strong>OAuth Tokens &amp; Redirect URLs<\/strong> section, and select the <em>Install to Workspace<\/em>\u00a0option. Choose the required Workspace and complete the process.<br \/>\nOptionally, if you would like to send Proactive Notifications to your users on Slack, copy the \u2018Bot User OAuth Token\u2019 from the \u2018OAuth Tokens for Your Team\u2019 section and provide it in the Configurations tab of this page.<\/li>\n<li>To enable Interactive Components, go to the b section and enable <b>Interactivity<\/b>. Copy the <strong>Webhook URL<\/strong> provided in the <strong>Configurations<\/strong> tab of this page and enter it in <b>Request URL<\/b> field.<\/li>\n<li>Click <b>Save Changes<\/b>.<br \/>\n<a ref=\"magnificPopup\" href=\"\/wp-content\/uploads\/sites\/21\/6.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-14110 alignnone\" src=\"\/wp-content\/uploads\/sites\/21\/6.png\" alt=\"\" width=\"500\" height=\"288\" \/><\/a><\/li>\n<li>Go to the <strong>Event Subscriptions<\/strong> section and activate the <strong>Enable Events<\/strong>\u00a0option.\n<ul>\n<li>Copy the <em>Webhook URL<\/em> provided in the <em>Configurations<\/em> tab of Slack Channel page and enter it in the <strong>Request URL<\/strong>\u00a0field.<\/li>\n<li>In the <strong>Subscribe to Bot Events<\/strong> section, add <em>app_mention<\/em>, <em>message_channels,<\/em> and <em>message_im<\/em>\u00a0events.<\/li>\n<li>In the <strong>Subscribe to Workspace Events<\/strong> section, add <em>message_im<\/em>\u00a0event.<\/li>\n<li>Click <strong>Save Changes<\/strong>.<\/li>\n<\/ul>\n<p><a ref=\"magnificPopup\" href=\"\/wp-content\/uploads\/sites\/21\/Slack-7.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-22507\" src=\"\/wp-content\/uploads\/sites\/21\/Slack-7.png\" alt=\"\" width=\"1366\" height=\"1664\" \/><\/a><\/li>\n<li>Navigate to the <strong>App Home<\/strong> section and under <strong>Show tabs<\/strong>. Enable the <em>Messages Tab<\/em> and also enable the <em>Allow users to send Slash commands and messages from the messages tab<\/em>. This is required to allow your users to directly interact with the app from the Messages tab.<\/li>\n<li>Go to the <b>Basic Information<\/b> section and scroll down to <b>App Credentials<\/b> section. Capture the values of <b>Client ID<\/b>, <b>Client Secret<\/b>, and <b>Verification Token<\/b> fields and provide them in the <b>Configurations<\/b> tab of the Slack Channel page.<br \/>\n<a ref=\"magnificPopup\" href=\"\/wp-content\/uploads\/sites\/21\/7.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-14114 alignnone\" src=\"\/wp-content\/uploads\/sites\/21\/7.png\" alt=\"\" width=\"450\" height=\"341\" \/><\/a><\/li>\n<li>If you want to enable the public distribution of your app on Slack, you must proceed with the following steps. Go to the <b>Manage Distribution<\/b> section and click on <b>Remove Hard Coded Information<\/b>.<\/li>\n<li>Select the checkbox <b>I&#8217;ve reviewed and removed any hard-coded information<\/b> and click <b>Activate Public Distribution.<br \/>\n<a ref=\"magnificPopup\" href=\"\/wp-content\/uploads\/sites\/21\/8.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-14115 alignnone\" src=\"\/wp-content\/uploads\/sites\/21\/8.png\" alt=\"\" width=\"450\" height=\"493\" \/><\/a><br \/>\n<\/b><\/li>\n<li>Go to the <b>Configurations<\/b> tab to review and complete the channel setup.<\/li>\n<\/ol>\n<p>The <em>Successfully added Slack channel<\/em> message is displayed at the top of the Bot Builder Homepage. In <em>Slack<\/em>, it is optional to submit your app to the Slack App Directory.<\/p>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"w-separator size_small with_line width_default thick_1 style_solid color_border align_center\"><div class=\"w-separator-h\"><\/div><\/div>\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<h2><span class=\"ez-toc-section\" id=\"Edit_Slack_Channel\">Edit Slack Channel<\/span><\/h2>\n<p>To edit the Slack channel, follow the below steps:<\/p>\n<ol>\n<li>Hover over the channel and click to modify. You can make necessary updates to your channel configurations and save them.<\/li>\n<li>You can also disable or delete the channel information by clicking the <b>Settings <\/b>icon.<b><br \/>\n<a ref=\"magnificPopup\" href=\"\/wp-content\/uploads\/sites\/21\/9.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-14116 alignnone\" src=\"\/wp-content\/uploads\/sites\/21\/9.png\" alt=\"\" width=\"500\" height=\"218\" \/><\/a><\/b><\/li>\n<li>Select one of the following commands to modify the channel:<\/li>\n<\/ol>\n<ul>\n<li><b>Disable\/Enable<\/b> \u2013 Click <b>Disable<\/b> to temporarily disable the use of the Slack channel for your bot. To enable the use of the Slack, click <b>Enable<\/b>.<\/li>\n<li><b>Delete<\/b> \u2013 Click <b>Delete<\/b>, and then click <b>OK<\/b> in the <b>Delete Confirmation<\/b> dialog to permanently delete the bot channel configuration.<\/li>\n<\/ul>\n<div class=\"alert alert-warning\">Warning: This operation is permanent, and cannot be undone.<\/div>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"w-separator size_small with_line width_default thick_1 style_solid color_border align_center\"><div class=\"w-separator-h\"><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/section>\n","protected":false},"excerpt":{"rendered":"To setup Slack as a channel, you must associate the bot with a Slack app. Adding the Slack channel to your Kore.ai bot allows end-users of your bot to interact with your bot using their Slack accounts. Create a Slack App - Create and configure a new app in Slack, and then copy app data...","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[25],"tags":[],"class_list":["post-17878","post","type-post","status-publish","format-standard","hentry","category-channel-enablement"],"_links":{"self":[{"href":"https:\/\/developer.kore.ai\/v9-0\/wp-json\/wp\/v2\/posts\/17878","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/developer.kore.ai\/v9-0\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/developer.kore.ai\/v9-0\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/developer.kore.ai\/v9-0\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/developer.kore.ai\/v9-0\/wp-json\/wp\/v2\/comments?post=17878"}],"version-history":[{"count":8,"href":"https:\/\/developer.kore.ai\/v9-0\/wp-json\/wp\/v2\/posts\/17878\/revisions"}],"predecessor-version":[{"id":30868,"href":"https:\/\/developer.kore.ai\/v9-0\/wp-json\/wp\/v2\/posts\/17878\/revisions\/30868"}],"wp:attachment":[{"href":"https:\/\/developer.kore.ai\/v9-0\/wp-json\/wp\/v2\/media?parent=17878"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/developer.kore.ai\/v9-0\/wp-json\/wp\/v2\/categories?post=17878"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/developer.kore.ai\/v9-0\/wp-json\/wp\/v2\/tags?post=17878"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}