Start integrating with ONEiO for free!
SIGN UP

How to configure Slack for integration with ONEiO

Introduction

This document shows an example of what needs to be done on Slack to make it integration-ready with an endpoint in your ONEiO subscription. Note also that the number of fields used in integrations might vary.

For any questions related to setting up the integration, please send mail to support@oneio.cloud.

You can sign up for a free trial of ONEiO from the following link: ONEiO Free Trial

Overview

This article gives an overview of the required steps to integrate ONEiO and Slack. In this guide, we cover the following steps required for communication between ONEiO and Slack (one direction).

 

Info

If you want to add Slack Modal capabilities to your Slack endpoint and bi-direction communication, please refer to this article: How to add slash commands (Modal) to your Slack Endpoint

 

Creating your Slack App

Let's start creating a Slack app. The following steps show how to setup a basic Slack app and adjust its settings. After successfully creating your Slack app, we can continue to create and configure your ONEiO's Slack endpoint.

Log in to your Slack account (https://api.slack.com) with your account administrator user and select Your Apps from the top right corner of your screen.

Start by clicking on Create New App and select From Scratch

ONEiO__Endpoint_Tutorials__How_to_configure_Slack5.jpg


Write the app name and select the workspace for the App

ONEiO__Endpoint_Tutorials__How_to_configure_Slack6.jpg


Fill out the basic information/ display information

ONEiO__Endpoint_Tutorials__How_to_configure_Slack7.jpeg

 

Configuring Slack App scopes


Select OAuth & Permissions from the left menu, and then go to Scopes.

Add the scope chat:write.

ONEiO__Endpoint_Tutorials__How_to_configure_Slack14.png


To activate your app in Slack, Install to Workspace.

ONEiO__Endpoint_Tutorials__How_to_configure_Slack9.jpg

On the next page, click on "allow". 

Note: As soon as you install your app into the channel you decided on, an Incoming Webhooks is created for the selected channel.

 

Adding your App to a channel


Go to the channel on which you want to install the application and navigate to View channel details

ONEiO__Endpoint_Tutorials__How_to_configure_Slack10.jpg


Navigate to Integrations and Add an app

ONEiO__Endpoint_Tutorials__How_to_configure_Slack11.jpg


Fin your app (you can use the search box) and click on Add

ONEiO__Endpoint_Tutorials__How_to_configure_Slack12.jpg


Upon adding your app, this pop-up window will automatically close and a confirmation message will be displayed in the Slack channel where you added the app

ONEiO__Endpoint_Tutorials__How_to_configure_Slack13.png


Your Slack app setup is complete.

 

Sending messages from ONEiO to Slack

 

Creating your Slack endpoint


Now let's create your Slack endpoint.

Access your ONEiO subscription, go to Endpoints, and select New endpoint

ONEiO__Endpoint_Tutorials__How_to_configure_Slack1.jpg


Choose the Slack endpoint and click on Create

ONEiO__Endpoint_Tutorials__How_to_configure_Slack1a.jpg

  • Enter your endpoint name
  • Select your timezone
  • Insert any value on Bot User OAuth Token. This field will be updated in the next steps
  • Then, click on create

ONEiO__Endpoint_Tutorials__How_to_configure_Slack2.jpg

For more details, you can check Endpoint Configuration Guide - Slack 

 

Configuring your Slack Endpoint


Edit your Slack App and go to Features -> OAuth & Permissions

Copy the Bot User OAuth Token. We will use it in the next step.

ONEiO__Endpoint_Tutorials__How_to_configure_Slack14.png

Now, go to ONEiO App and edit your Slack endpoint. 

Insert your copied token as Bearer xoxb-*** on Bot User OAuth Token.

ONEiO__Endpoint_Tutorials__How_to_configure_Slack16.jpg


Save your endpoint and the endpoint configuration is complete.

 

Configuring Routing Rules


The last step is creating a routing rule to send data from any integration to your Slack Endpoint.

In this example, we will show how to send data from Jira to Slack.

In ONEiO app, go to Routing Rules and create a new rule.

Fill your rule name and set the Route information as shown below, just replacing the inbound endpoint with your own integrated endpoint. 

Set the outbound endpoint as Slack, Entity Type as view_submission, and Message Type as Message.

  • Rule name: Jira -> Slack: Issue Created (you can name your rule freely)
  • Route information -> Inbound: Select your connected endpoint (ex: Jira) and set the Entity Type (ex: Incident)
  • Route information -> Outbound: Select the endpoint Slack, Entity Type view_submission and Message Type: Message
  • Operation: Apply for CREATE messages 

ONEiO__Endpoint_Tutorials__How_to_configure_Slack17.jpg

 

Go to Mappings, and in Outbound mappings we will add the mapping from your endpoint to Slack. 

In this example, Slack will receive the channel id and the message text.

Source value Outbound attribute
[your channel id] channel
*A new issue was created:*#${issue.key}: ${issue.fields.summary} text

ONEiO__Endpoint_Tutorials__How_to_configure_Slack18.jpg


You can retrieve the channel id in your Slack app. Right-click in the channel you installed your app, 

select view channel details and at the very bottom you can find the channel id:

ONEiO__Endpoint_Tutorials__How_to_configure_Slack19.jpg


Save your rule and you are ready to send data from your endpoint to Slack. Just send an event and you should receive a Slack message with the event content. 

In this example, I'll send an incident from Jira:

ONEiO__Endpoint_Tutorials__How_to_configure_Slack20.jpg


And receive it in the Slack channel:

ONEiO__Endpoint_Tutorials__How_to_configure_Slack21.jpg

 

Congratulations!

Your Slack integration is complete.

 

Was this article helpful?
1 out of 1 found this helpful
Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.