Slack
Last updated
Last updated
This document describes the Dataworkz connector configuration required to access Slack. It lists the steps needed to setup Slack connected app and to configure a connector for the same in Dataworkz.
There are 2 type of connected apps for Slack:
Private connected app :- App specific to an organization that can only fetch data from organization workspace(s) linked to app.
Distributed/Public connected app :- Multiple distributed workspaces can be registered with this app which can be of any organization.
Before configuring Dataworkz for Slack, a "Distributed Connected App" needs to be configured in Slack. Following steps should be followed for the purpose.
Go to https://api.slack.com/apps and click on create new app.
Select “From Scratch” option. Enter app name and workspace to be used for connected app.
Click on “Create App” and on next page select “Add features and functionality”.
Enter following redirect URL, click Add and then save URLs.
https://<Dataworkz application domain>/dataworkz-web/restApi/oauth/slack/get_oauth_token (Go to Dataworkz Slack configuration setup and get complete url)
Add following Bot token scopes for permission.
In the “OAuth Tokens for Workspace” section click “Install to Workspace”. Select the workspace and give the permission to access workspace and that will generate the Bot Token.
Select “Opt In” to allow token rotation for security reasons.
Connect and login to slack to manage and register app with channels. https://app.slack.com/apps-manage
Search using connected app name in Description.
Select your connected app and on next page go to app details tab.
Click on “Open in Slack“. It will redirect to slack app.
Select Connected app down arrow to register with channel.
Click on Add this app to channel and configured this app with required channel.
Login to Dataworkz web and enter client Id and secret for slack configuration in dataworkz. If OAuth option selected is “Dataworkz OAuth” then add slack configuration in OAUTH_CONFIGURATION table of Dataworkz DB.
Click on save and follow authentication process to complete configuration creation.
Login to Dataworkz Application
Goto Configuration -> SaaS Applications -> Slack
Click the + icon to add a new configuration
Enter name for the connector
Select the OAuth option
Select the Workspace & Collection to which the connector data belongs to
Upon saving you will be prompted to log into Slack. Upon successful login the configuration would be saved
If custom app isn't already created selecting "No" would give the "Redirect URL" that can be used to create a connected app in Slack
Enter the Client ID and Secret that was configured during creation of the connected app
Select the Workspace & Collection that would contain the resulting dataset
Upon saving you will be prompted to log into Slack. Upon successful login the configuration would be saved
Goto Configuration -> SaaS Applications -> Slack
Click the Slack connector that was created in the previous section
Click the Configuration tab. It will open Configuration tab. Click the + icon to add a new configuration
Enter name of the dataset that would comprise the Slack data
Select the channel from which messages need to be read
Choose between pulling all the historic data or for a date range
Toggle between one time and recurring pull
Click add to create the configuration