Start using slack.com Now

Given that I work remotely most of the time I am quick to try new tools but very rarely does something change enough to provide a reason to change.  Over the years IM, Email and Yammer have held true while Mumble, IRC and others have failed.

Well today I finally signed up for slack.com, an enterprise communication platform, and I immediately realized the awesome potential.  The interface is clean and to the point but just beneath the surface are a ton of functions that either completely missing or practically unusable in other apps.  File sharing and code sharing were the two that jumped out immediately.  Then digging even more the integrations hooks caught my eye.

Of course this is ripe for integrating with ServiceNow so I took a stab at it.  Turned out to be incredibly easy.

Here I will walk you through setting up Slack with ServiceNow.

First set up a private test channel in Slack.  Then go to “+ Add a service integration”.  Towards the bottom is “Incoming WebHooks”

Add an Incoming WebHook and copy the WebHook URL that was generated.  Believe it or not we are already half done.

In ServiceNow create a new Outbound REST Web Message.  Set the REST Endpoint to that WebHook URL and Save.

Then go to the “post” function – actually this is the only one we need so you can remove the others.  In the Content field add the following:

{"text":"${text}"}

Add a REST Message Function Parameter and name it text and set the value to Hello World.

That’s it.  Run a test to make sure it works and you are good to start using the integration.

Now you may want to add additional configuration, such as setting the name and channel which you can do by adding more parameters into the Content field.  You can also configure these properties in Slack on the Integration details page.

Here’s an example with Username specified.  Don’t forget to add the Function Parameter.

{"text":"${text}","username":"${user}"}

So that’s a basic integration.  You can also build more complicated messages.  Here is one setup for sending out an Incident notification.


{
"fallback": "${fallback}",
"text": "${text}",
"pretext": "${pretext}",
"color": "${color}",
"fields": [{"title":"Priority","value":"${priority}","short":false},{"title":"Short Description","value":"${short_description}","short":false}]
}

slack

That’s it!  I wish they were all that easy.

 

One Reply to “Start using slack.com Now”

  1. This is a great start on pushing info into Slack. What would the next steps be to setup a Slack command? Example: /servicenowme INC100225
    returns the fields and values defined in the POST message for that record.

    Also, what would it take to link a channel in slack to the live feed of a record?

Leave a Reply

Your email address will not be published. Required fields are marked *