Slack
This document describes the Dataworkz connector configuration required to access Slack, including the steps to set up a Slack connected app and configure a connector in Dataworkz.
There are two types of connected apps for Slack:
Private connected app — App specific to an organization that can only fetch data from organization workspaces linked to the app.
Distributed/Public connected app — Multiple distributed workspaces from any organization can be registered with this app.
Prerequisite (Creating a Distributed Slack App)
Before configuring Dataworkz for Slack, create a Distributed Connected App in Slack. Follow the steps below.
Go to https://api.slack.com/apps and click Create new app.
Select From Scratch. Enter the app name and the workspace to use for the connected app.

Click Create App and on the next page, select Add features and functionality.

Enter the following redirect URL, click Add, and then save the URLs:
https://<Dataworkz application domain>/dataworkz-web/restApi/oauth/slack/get_oauth_token (get the complete URL from the Dataworkz Slack configuration setup)
Add the following Bot token scopes for permissions:

In the OAuth Tokens for Workspace section, click Install to Workspace. Select the workspace and grant permission to access it. This generates the Bot Token.
Select Opt In to allow token rotation for security.

Connect and log in to Slack to manage and register the app with channels: https://app.slack.com/apps-manage.

Search for the connected app name in the Description field.

Select the connected app and go to the App details tab on the next page.

Click Open in Slack. This redirects to the Slack app.
Click the connected app dropdown arrow to register with a channel.

Click Add this app to channel and configure the app with the required channel.
Log in to Dataworkz and enter the Client ID and Secret for the Slack configuration. If the Dataworkz OAuth option is selected, add the Slack configuration to the
OAUTH_CONFIGURATIONtable in the Dataworkz database.

Click Save and follow the authentication process to complete the configuration.
Creating Slack Connector in Dataworkz
Log in to the Dataworkz application.
Go to Configuration > SaaS Applications > Slack.
Click the + icon to add a new configuration.
Enter a name for the connector.
Select the OAuth option.
OAuth
Select the Workspace and Collection for the connector data.
After saving, Dataworkz prompts you to log in to Slack. After a successful login, the configuration is saved.
Private Connected App
If the custom app is not yet created, select No to get the Redirect URL for creating a connected app in Slack.
Enter the Client ID and Secret configured during connected app creation.
Select the Workspace and Collection for the resulting dataset.
After saving, Dataworkz prompts you to log in to Slack. After a successful login, the configuration is saved.
Configuring Slack Connector Details
Go to Configuration > SaaS Applications > Slack.
Click the Slack connector created in the previous section.
Click the Configuration tab, then click the + icon to add a new configuration.
Enter a name for the dataset.
Select the channel from which to read messages.
Choose between pulling all historical data or a date range.
Toggle between one-time and recurring pull.
Click Add to create the configuration.
Last updated

