Using the Slack integration from the Looker Action Hub, you can install a Looker App into your Slack workspace to send or schedule data deliveries directly to public and private Slack channels. The Slack Attachment (API Token) integration is still available for use.
The Slack integration is available to Looker-hosted deployments that satisfy these conditions:
- The Looker instance is on 6.24 or later.
- The Looker instance is not IP whitelisted.
This Slack integration is not supported for customer-hosted instances.
To enable installation of the Looker App, your Slack workspace owner may need to adjust the app installation settings for your Slack workspace.
Looker admins can connect multiple Looker instances to a Slack workspace by following the steps in the Enabling the Integration in the Looker Action Hub section on this page for each Looker instance.
Enabling the Integration in the Looker Action Hub
If your Looker instance meets the required conditions, your Looker admin must enable the Slack integration in the Looker Action Hub before users can deliver data with the Slack integration.
- Go to the Admin panel and then, under Platform, go to the Actions page.
- Click the Enable button to enable the Slack integration in the Looker Action Hub.
- On the Slack action page, click Connect to connect to your Slack workspace. Looker will request access to the Slack workspace indicated in the drop-down menu on the top right of the page. To connect multiple Slack workspaces to a single Looker instance, admins can click the + Connect to Slack workspace link.
- Click Allow, and return to the Slack action page.
- Click the Enable switch, and then click Save.
Managing Slack Workspace Connections to Looker
You can disconnect an existing Slack workspace connection by clicking the Disconnect button on the Slack action page and then clicking OK on the pop-up warning message. You will not need to click Save on the Slack page to save these settings, and the action will still show as Enabled even though no Slack workspace is connected.
To connect multiple Slack workspaces to a single Looker instance, admins can click the + Connect to Slack workspace link on the Slack action page, which is located on the Actions page under Platform in the Admin panel.
Authenticating into Your Slack Workspace
Users must authenticate into the same Slack workspace that the Looker admin has connected to Looker. Users must also be existing members of the workspace before they can authenticate into it from Looker.
These are the options for authenticating into a Slack workspace for the first time:
- From the Account page. (This is your only option if there are multiple Slack workspaces connected to your Looker instance.)
- From the Send or Schedule window.
You will receive a confirmation Slack message once you have successfully authenticated into Slack from Looker.
Authenticating into a Slack Workspace from the Account Page
- In Looker, click your user profile icon in the upper right of the screen, and select Account.
- You can see a list of any integrations enabled for your instance under Integrations. For Slack, if your Looker admin has enabledat least one Slack workspace, you’ll see a button to Sign in with Slack. Looker admins can connect multiple Slack workspaces to a single Looker instance. If your Looker admin has connected more than one Slack workspace to your Looker instance, you’ll see a list of workspaces with options to log in to each one individually.
- Looker will request access to the Slack workspace. Click Allow.
Returning to your Account page, you’ll see an option to revoke your Slack credentials for any workspaces that you’re connected to. Now that you’re authenticated, you can start to send or schedule dashboards, Looks, and Explores.
Be careful not to revoke your Slack token — if you do, any schedules you’ve already created will fail.
See the Delivering Data to Slack section on this page for more information on delivering data to the Slack action.
Authenticating into a Slack Workspace from the Send or Schedule Window
- In Looker, navigate to the content that you’d like to deliver, click the gear menu, and then click Send or Schedule.
- In the Send or Schedule window, select the Slack action as the delivery destination under Where should this data go?
- Next to Slack, click Log in. This will open a new window.
- Looker will request access to the Slack workspace. Click Allow.
- The Send or Schedule window should now show your Slack delivery options, including your Slack workspace’s public and private channels.
Delivering Data to Slack
Before you can deliver data to the Slack integration, Looker admins must grant users the
send_to_integrationpermission and enable the Slack integration in the Looker Action Hub. Users must also authenticate into the same Slack workspace or workspaces that your admin has connected to Looker.
You can deliver content to one of multiple Slack workspaces. Once the Looker admin has set up the workspace connections, you can sign in to each one from your user Account page. Then you can select a destination workspace from those listed in the Workspaces drop-down of the Send or Schedule pop-up.
The example below shows formatting options for delivering a dashboard, which include:
- Visualization (PNG)
- CSV ZIP file
Sending or scheduling a Look or an Explore will have different formatting options available, including:
- JSON — Simple
- JSON — Label
- JSON — Simple, Inline
- JSON — Detailed, Inline
To send an Explore — in PDF or PNG format, save the Look to a dashboard and schedule the dashboard in the desired format. To schedule an Explore, you must first save it as a Look.
To send or schedule a Look in PDF or PNG format, save the Look to a dashboard and schedule the dashboard in the desired format.
To deliver a user-defined dashboard, a LookML dashboard, a Look, or an Explore, first navigate to your content and then perform these steps:
- Click the gear menu, and click Send or Schedule. (You will not have the option to schedule an Explore.)
- In the Send or Schedule window, select the Slack integration as the delivery destination under Where should this data go? If this is your first time using the Slack integration, you will need to authenticate into the Slack workspace.
- Once you authenticate into Slack, Looker will display delivery options that are specific to the Slack workspace or workspaces connected to this Looker instance.
- In the Share In field, enter the name of the Slack channel where you want to post your data. You can send direct messages or messages to public or private channels. Include the leading # character, for example, #Sales.
- In the Comment field, enter any text you want to include with the delivery.
- In the Filename field, enter the name you want to give to the attachment file.
- If you are scheduling a data delivery, once you have configured all the options, click Save All. Your query or dashboard will be delivered to Slack as scheduled. Or, if you are sending your data, click Send. Your data will be delivered to your Slack channel.
Accessing Looker from Slack
There are several ways to access Looker data from within Slack, including:
- Sharing links to Looker content
- Using slash commands to retrieve Looker information in Slack
- Viewing your Looker App Home tab in Slack
Sharing Links to Looker Content in Slack
You can share links to SQL Runner visualizations, user-defined dashboards (including dashboards (beta) content), LookML dashboards, Looks (but not publicly embedded Looks), or Explores in Slack.
The link unfurls in Slack to show the content’s title and some of its metadata, which will be visible only to those who have access to the underlying content. Once the link unfurls, you or other users have options to:
- Post a link back to the content in Looker and a snapshot of the content in the channel — click Post to this Channel. Once the content is posted to the channel, anyone in the channel will be able to view the content snapshot and title, even if they do not have access to the underlying content in Looker.
- Add the content to their Looker Favorites folder — click Add to Favorites. Once you’ve added content to your Favorites folder, the Looker App in Slack will display a message in Slack with a link to access your Favorites folder in Looker.
Using Slash Commands to Retrieve Looker Information in Slack
If you also have Lookerbot enabled, you may need to rename some slash commands. Custom Slack commands cannot be configured with the Slack integration. Use Lookerbot for custom commands.
You can use the following slash commands to retrieve information from Looker and post it to Slack:
/looker whoami— The Looker App in Slack greets you by name; tells you the Looker instance to which you’re connected; and provides links to your Looker Favorites folder, to your personal folder, and to Help.
/looker help— The Looker App in Slack lists supported slash commands.
/looker favorites— The Looker App in Slack lists the content from your Looker Favorites folder. Click the ellipsis (
...) beside each piece of content to access a menu from which you can Post to this Channel or Remove from Favorites.
/looker folder— The Looker App in Slack lists the content from your Looker personal folder. Click the ellipsis (
...) beside each piece of content to access a menu from which you can Post to this Channel or Remove from Favorites (if the content is also in your Favorites folder).
/looker select— The Looker App in Slack lists the instance or instances connected to that Slack workspace. To set a default instance for your Slack workspace, click it from this list. All instance-specific slash commands would apply to the default Looker instance.
Viewing Your Looker App Home Tab in Slack
You can see a list of your favorite Looker content and folders in Slack by clicking on the Home tab in the Looker App.
If you have set a default Looker instance for your Slack workspace, you will only see content from that instance from your Looker App Home tab.
Setting a Default Looker Instance for Your Slack Workspace
If your Looker admin has connected multiple Looker instances to your Slack workspace, you can set one of the instances as the default Looker instance. Any instance-specific slash commands — most commands besides
/looker help — would apply to the default instance.
If your Looker admin has connected only a single Looker instance to your Slack workspace, that instance is your default.
In Slack, run the slash command
/looker select to see a list of the Looker instances connected to your Slack workspace. The Looker App will ask Which instance would you like to set as a default? Click the button corresponding to the name of the Looker instance to set this instance as your default. Once you’ve set your default instance, the Looker App will confirm your selection.
You can switch your default Looker instance by running
/looker select again and selecting a different Looker instance.