Generating API Token and Webhook URL for Integrating eG Enterprise with Slack
The primary pre-requisite for integrating eG Enterprise with Slack is to create a dedicated channel in Slack where the eG alerts should be sent. Once this is done, then you should proceed to do the following:
-
Generate an API token and an incoming Webhook URL in Slack for the eG manager to use;
-
Configure the eG manager with the channel name, API token, and Webhook URL
The procedure below describes how to generate the API token and Webhook URL in Slack.
-
Go to the Slack API dashboard using the URL: https://api.slack.com/apps/. Figure 1 will then appear. Click on the Create an App button in Figure 1 to start creating a new app.
-
Figure 2 will then appear. Click on Blank app in Figure 2, and then click the Continue button.
-
This will open Figure 3. To create an app from scratch, specify the App name and pick the Workspace in which the app should be created. A Slack workspace is made up of channels, where team members can communicate and work together. Make sure that the Workspace you select in Figure 3 is the same workspace in which you have created the channel for posting eG alerts.
-
Upon successful app creation, Figure 4 appears by default, displaying the OAuth settings of the new app. Now, proceed to configure a webhook for the new app by clicking the Incoming Webhooks option in the left panel of Figure 4.
-
This will invoke Figure 5. Push the Activate Incoming Webhooks slider in Figure 5 to the right to activate incoming webhooks.
-
Then, scroll down Figure 5 and click the Add New Webhook button that becomes visible (see Figure 6).
-
Figure 7 will then appear. Using Figure 7, you can allow the new app access to Slack. For that, first select the Workspace of which you are a member. Then, from the Channel for webhook drop-down, select the Slack channel you have created specifically for posting eG alerts. Then, click the Allow button.
-
The Incoming Webhooks page then reappears (seeFigure 8).
-
Now, scroll down Figure 8 to view the Webhook URL that has been auto-generated by Slack (see Figure 9). This is the URL that the eG manager will use to connect to Slack and post eG alerts as notifications to the Slack channel. Make a note of this URL by clicking the Copy button and pasting the copied URL to Clipboard or to any Editor.
-
Now, click on the OAuth & Pernmissions option in the left panel, as indicated by Figure 9. Figure 10 will then appear.
-
Scroll down Figure 10 to view the Bot User OAuth Token. Make a note of this token by clicking the Copy button. You will have to configure the eG manager with this token, so as to enable the eG manager to connect to the Slack channel.
For the integration to work seamlessly, make sure you configure eG Enterprise with the dedicated Channel you created for the purpose of the integration (see Figure 7), the Webhook URL that was generated at step 9, and the Bot User OAuth Token that was generated at step 11 of the aforesaid procedure.