Thameem Khan

Slack + Boomi: Integration for all you Slackers

Blog Post created by Thameem Khan Employee on Apr 11, 2016

I love Slack!!! I started using it couple of months back and realized the day I logged in that it was more than a chat window. I was very fascinated by all the different apps that were part of the Slack ecosystem and variety and ease of connectivity options with other systems. The outbound/inbound hooks provided immediately caught my attention.

 

Whenever and wherever I see the word “API” my tiny brain immediately starts thinking about how I can use Boomi AtomSphere unlock data and processes across applications. What if we could...

  • Post business workflow notifications in Slack based on events from other applications or integrations?
  • Post operational alerts in Slack from Boomi events like atom offline, process failed, or even process deployed?
  • Use the catalog of Boomi connectors to lookup data from external applications right within Slack?

 

The possibilities are endless!

 

But to enable any of these great use cases we need to get Slack and Boomi talking. To do so let's walk through two examples of the most common Slack interactions:

  • Post a notification in Slack from Boomi
  • Create a Slack slash command to call Boomi and return information from somewhere

 

Post a notification in Slack from Boomi

 

In this example, we're going to have Boomi post a simple text message to a specific Slack channel.

 

Slack Configuration - Create a new Incoming WebHook

 

  1. Go to https://slack.com/apps and choose Build your own > Make a Custom Integration and choose Incoming WebHooks:
    • pasted image 0.png
  2. Configure the Integration Settings as desired. Copy the generated Webhook URL, we'll need this in a moment.
    • pasted image 1.png
  3. On the same page, expand the Message Attachments section to display the required JSON payload. Copy and paste the example in a text editor and save as a .json file.
  4. Click Save Settings.

 

That's it for the Slack side.

 

AtomSphere Configuration

 

Now back to the easy part, building the Boomi process :-)

 

  1. Create new process with a "No Data" start shape.
  2. Add a message shape to provide the necessary parameters for the call. For simplicity just enter as a CSV-formatted values. For example:
    • #integrationdemo,boomiAtom,"I am a Slacker !!!"
  3. Create a flat file profile that matches the CSV test data.
  4. Create a new JSON profile by importing the example JSON file we saved above.
  5. Add a map shape that maps the flat file to the JSON format.
    • pasted image 3.png
  6. Add an HTTP connector shape, action=Send. Create and configure the HTTP connection with the Webhook URL from Slack.
    • pasted image 2.png
  7. Create a new HTTP operation configured with Content Type=application/json and HTTP Method=POST. Leave the other fields alone.
  8. Connect the shapes and save.

 

Give it a Go

 

  1. Execute the process in Test Mode:
    • pasted image 4.png
  2. Go into Slack and you should be seeing an incoming message from Boomi in the respective channel:
    • pasted image 5.png

 

Create a Slack slash command to call Boomi and return information from somewhere

 

In this next example, we're going to create slash command in Slack that invokes a Boomi web service process in real time. That process then grabs some AtomSphere account statistics using the AtomSphere platform API and posts the message back to a Slack channel in the same fashion as the first example above.

 

Note publishing web services in Boomi requires the Services Enablement feature. Also you'll need to deploy the process to somewhere publicly accessible so that Slack can connect. In this example we deploy to the Dell Boomi Test Atom Cloud.

 

AtomSphere Configuration

 

Before we build a Slack command, we need to determine the information we want to share inside Sack and build a Boomi process published as "simple" web service endpoint.

 

Here's the high level process in AtomSphere. The subprocess makes a few calls to the AtomSphere API and posts a message to Slack just like above.

 

pasted image 6.png

 

Deploy this process to the Test Atom Cloud and get the endpoint URL. For example, https://test.connect.boomi.com/ws/simple/getMonitorForSlack. You'll also need to obtain the user name and token from the atom shared web server. This will be appended to the URL using the boomi_auth parameter (more about that).

 

Slack Configuration - Create a Slash Command

 

  1. Go to https://slack.com/apps and choose Build your own > Make a Custom Integration but this time choose Slash Command.
    • pasted image 7.png
  2. Configure the Integration Settings for the command as desired. When finished click Save Integration.
    • pasted image 8.png
    • pasted image 11.png

 

Give it a Go

 

  1. Go into Slack and start typing your command, you should be seeing an autofill option. Complete the command and click enter:
    • pasted image 9.png
  2. Slack calls the Boomi API process to retrieve the statistics and post them back to Slack:
    • pasted image 10.png

 

What's Next...

 

Just like Slack you can use any external devops tools that supports webhooks in conjunction with Boomi. Hopefully, this serves as a starting point for all the creative minds to come up with various Boomi processes that can be exposed as REST API to be consumed by Slack. In scenarios where you don't see a native Slack app for the application (especially ERPs and custom in-house applications), you have AtomSphere's full library of connectors at your disposal. Slack also allows you to pass parameters that can be leveraged within the Boomi process to perform content based routing and conditional logic. In a follow up blog, I'll share some thoughts for how you can leverage the AtomSphere API and Slack to build a complete continuous deployment process.

 

Meanwhile, stop slacking and start building some integrations :-)

 

How have you integrated Boomi into your collaboration and devops tools?

Outcomes