ServiceNow - Slack Integration
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-24-2024 12:46 AM
Hi Everyone!
Let's understand how we can integrate ServiceNow with Slack using existing Slack Webhooks spoke and post messages over Slack channel.
Firstly, let's try to understand what Incoming webhooks are:
Incoming Webhooks are a simple way to post messages from external sources into Slack. They make use of normal HTTP requests. The Slack Webhooks Spoke uses webhooks to enable simple integrations to:
- Post a Message
- Post Change details
- Post Incident details
- Post Problem details
Step - 1: Create a Slack Workspace
Navigate to https://slack.com/ and log-in with your account. If you don’t have one, create one.
Click the "Create a Workspace" button.
Fill out the basic details:
Input Workspace name and hit Next
Following, Input basic info about you such as Name etc., and click Next
Next you can invite your team to the workspace (you can skip this step)
Next, Input what’s your team working on - e.g., Integrations
Final step, when asked to chose subscription, select Free (Start with Free) and you are good to go!
You can use any of the pre-defined channels say #random or can create a new channel, e.g., #incidents
Step - 2: Setup Incoming Webhooks
Navigate to Sending messages using incoming webhooks | Slack (Make sure you’re already logged-in to your slack workspace in browser)
Click “Create your Slack App”
choose “From an app manifest” for now. (If you have some knowledge on slack configurations and want to build your own app from scratch, you can choose “From scratch”)
Select your workspace that was created previously and click Next.
You can continue with default name or you can change your app name in the app manifest
Click Next and then Create in step 3. Hurray! you’ve created your app.
You’ll be re-directed to app configuration page with basic information and configurations. You can see all the relevant details about your app such as App credentials, tokens, Display Information etc.
Click on Incoming Webhooks on the App Home page
Toggle ON Activate Incoming webhooks
Scroll down and select Add New Webhook to Workspace
Next you need to select a channel where your app needs to post. You can go with already defined channels such as #general or #random OR you can create a new channel for posting incident related messages. for now, we’ll go ahead and select #random channel and click Allow
You’ll be re-directed to Incoming webhooks feature in App Homepage. Scroll down and you can find Webhook URL.
Copy this URL and note it down as this will be used in our flow in coming stages.
We are done with Slack configurations. Next is to create a flow and use Slack Webhook Spoke to post messages in the #random channel
Step - 3: Create a flow in ServiceNow
Navigate to All > Flow Designer in ServiceNow
Click on New > Flow and give name to your flow
In the trigger conditions, add below trigger as shown in the image
Flow Trigger Condition
NOTE: Here, we are taking the scenario when a P1 or P2 incident is created in the ServiceNow, message has to be posted in the slack channel. You are free to use whichever scenario you want to use/test 👍
Next, click Done and then Select Add an action
Select Post a Message Webhook action from Slack Webhooks pre-installed spoke
If you cannot find this spoke, make sure you activate ServiceNow Integration Hub Installer plugin from developer site.
Next configure the action as shown in below action and you are done.
Flow Action
Feel free to customize the Message. You can also try complex messaging like providing link to the incident etc., I have covered only basic thing here.
Save and Activate your flow and test with any incident record. You’ll see the incident message in the channel you have defined over slack.
Messages posted in slack channel
That’s it, You have successfully integrated ServiceNow with Slack messaging App!!
NOTE: Feel free to modify the trigger conditions and message details and play around with it. Happy Learning!!
Also, attaching pdf file with all the relevant images related to each step for better understanding! feel free to refer 🙂 and correct me if any mistakes are there 🙂
Sumanth Reddy K
- 2,822 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-26-2024 02:57 PM
Are you aware of a way to alter the form when creating an incident from Slack to ServiceNow? I can't seem to locate documentation for that or if it's possible.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2025 04:28 AM
Do you know if there will be additional costs due to this integration with Slack or can you just use it for free?