Skip to main content

Configure a slack integration for self-hosted Lightdash

In this guide we will show you how you can enable Share in Slack on your on self-hosted Lightdash server.

Create a new Slack APP on your organization

First we will have to create a Slack APP https://api.slack.com/apps?new_app=1

You can select From an app manifest to make it easier.

Then select the workspace you want to enable this into. Later you can enable distribution if you want to use a different Slack workspace.

Then copy this manifest to allow URL unfurls in your app. Make sure you update your Lightdash URL in the manifest below (for example, app.lightdash.cloud or eu1.lightdash.cloud).

{
"display_information": {
"name": "Lightdash",
"description": "Share Lightdash URLs on your Slack",
"background_color": "#7262ff"
},
"features": {
"bot_user": {
"display_name": "Lightdash",
"always_online": false
},
"unfurl_domains": [
"<your Lightdash URL>"
]
},
"oauth_config": {
"redirect_urls": [
"https://<your Lightdash URL>/api/v1/slack/oauth_redirect"
],
"scopes": {
"bot": [
"links:read",
"links:write"
]
}
},
"settings": {
"event_subscriptions": {
"bot_events": [
"link_shared"
]
},
"interactivity": {
"is_enabled": true
},
"org_deploy_enabled": false,
"socket_mode_enabled": true,
"token_rotation_enabled": false
}
}

Finally, click on create

Copying credentials

Now copy the following credentials from your new app.

From Basic Information

  • Client ID
  • Client secret (show and copy)
  • Signing secret (show and copy)

Also create a new App-level token by clicking on Generate Token and Scopes

Copy the token it generates.

Adding credentials to your local environment

Now you need to add the following environment variables to your Lightdash server using the credentials we previously copied

  • SLACK_APP_TOKEN: App-level token
  • SLACK_CLIENT_ID: Client ID (make sure it is between quotes, so it is a string, not a number)
  • SLACK_CLIENT_SECRET: Client secret
  • SLACK_SIGNING_SECRET: Signing secret
  • SLACK_STATE_SECRET: This can be any string

Restart your Lightdash service, now you should be able to use Share in Slack on your self-hosted Lightdash.