Before You Install the Recipe
You must perform the following configuration tasks on your Slack and ServiceNow instances in order to successfully connect to these external systems using Oracle Integration and post notification messages in Slack.
Configure ServiceNow
You can use admin account credentials or custom account credentials while configuring the ServiceNow connection in Oracle Integration.
If you do not want to use an admin account, then create a custom integration user and assign the required role and permissions to the user. For information about creating a custom user, see Prerequisites for Creating a Connection in Using the ServiceNow Adapter with Oracle Integration.
Configure Slack
Complete the following tasks in your Slack instance to successfully connect to it using Oracle Integration and post notification messages.
Set Up Your Slack WorkSpace and Channel
- Create a workspace in Slack.
- Open the Slack get started page using the following URL:
https://slack.com/get-started#/createnew - Enter your email and click Continue.
- Enter the confirmation code that you receive in your email, click Create a workspace, and follow the prompts.
- Open the Slack get started page using the following URL:
- Create a channel to post notifications.
- On your Slack instance, select your workspace.
- Click the workspace name on the left navigation pane, and from the menu that displays, select Create a channel.
- In the Create a channel dialog, enter your channel’s name in the Name field. For example,
#incident-creation. - Optionally, enter a suitable description in the Description field to let others know what the channel is about. For example: This channel notifies whenever an incident is created in ServiceNow.
- Click Create.
Repeat the steps above to create four channels.
- A channel to post ServiceNow asset creation notications (
#asset-creation). - A channel to post ServiceNow incident creation notications (
#incident-creation). - A channel to post ServiceNow request creation notications (
#request-creation). - A channel to post ServiceNow request closure notications (
#request-closure).
- A channel to post ServiceNow asset creation notications (
- Add people to your channel.
- On your Slack workspace, select the channel from the left navigation pane to open it.
- Click Add people on the top right of the channel.
- In the resulting Add people dialog, enter names, emails, or user groups of people you want to add in the field provided.
- Click Add.
Repeat the steps above for the four channels.
Get the Slack Channel ID
You must get the channel ID of the channel that you created on your Slack workspace. You'll use the channel ID for configuring the integration properties in Oracle Integration, so that notifications are sent to the right Slack channel.
- On your Slack workspace, navigate to the channel under Channels in the left navigation pane.
- Right-click the channel name.
- In the menu that displays, click Copy link.
- Copy the link to a text editor, such as Notepad.
- Note the nine characters after the last forward slash (/) in the link. This is the channel ID of the Slack channel. Note that the channel ID can be a combination of letters and numbers. For example, CB64YSB2D.
Repeat the steps above for all the four Slack channels to get their Channel IDs.
Create and Configure a Slack App
You have to create a Slack app, and configure it to receive notifications sent by Oracle Integration when an asset, incident, or request is created, and when a request is closed in ServiceNow.
- Create a Slack App.
- Log in to the Slack app platform at
https://api.slack.com. - In the Slack API title bar, click Your Apps.
- Click Create an App, and in the resulting Create an app dialog, select From scratch.
- In the Name app & choose workspace dialog, enter the following details.
Field Information to Enter App Name Enter the name of your app. For example, Oracle Integration App.Pick a workspace to develop your app in Select your workspace from the drop-down list. - Click Create App.
The app gets created and its Basic Information page appears.
- Log in to the Slack app platform at
- Get the Slack App API credentials.
- In the app's Basic Information page, scroll down to the App Credentials section.
- Note the client ID in the Client ID field, and the client secret in the Client Secret field. These API credentials, that is the client ID and secret, were automatically generated when you created the app. You'll use these later while configuring connections to your Slack instance from Oracle Integration.
- Set permissions for your Slack App.
- In the left menu, under Features, select OAuth & Permissions.
- In the OAuth & Permissions page, go to the Redirect URLs section.
- Click Add New Redirect URL and enter the URL of your Oracle Integration instance. For example,
https://your_instance_URL:443/icsapis/agent/oauth/callback, whereyour_instance_URLis the Host URL of your Oracle Integration instance. - Click Add, and then click Save URLs.
- Scroll down to the Scopes section, and under User Token Scopes click Add an OAuth Scope.
- Enter the following scopes:
- channels:read
- channels:write
- chat:write
- groups:read
- groups:write
- usergroups:write
Note the scopes. You'll use these later while configuring connections to your Slack instance from Oracle Integration.
- Press Enter.