New in Looker 7.4, you can see a list of your Looker Favorites and folders in Slack — just click the Looker App Home tab!
Looker 6.24 introduces a new Slack integration action where you can send or schedule data deliveries to Slack, including direct messages and messages to public or private channels. The existing Slack integration, Slack Attachment (API Token), is still available.
The new Slack integration is a Looker Labs feature and 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.
Enabling the Slack (Beta) Action
Before you can enable the Slack (Beta) action, your Looker admin must perform these steps:
- Go to Admin > Labs and enable the Slack App Labs feature.
- Go to Admin > Actions to enable the Slack (Beta) action in the Looker Action Hub and connect it to the Slack workspace.
Once your Looker admin has enabled the feature and connected it to your workspace, perform these steps:
In Looker 6.24 and 7.0, you cannot change your Slack workspace connection!
- From the Actions page, scroll down to the Slack (Beta) action, and click the Enable switch.
- On the Slack (Beta) page, click Connect. Looker will request access to the Slack workspace indicated in the drop-down menu on the top right of the page.
- Click Allow, and return to the Slack (Beta) page.
- Click the Enable switch, and then click Save. Your connection should be indicated by the Test Action field. You can click Test Again to test your Looker connection to your Slack workspace.
Starting in Looker 7.2, you can disconnect an existing Slack workspace connection by clicking the Disconnect button on the Slack (Beta) action page and then clicking OK on the pop-up warning message. You will not need to click Save on the Slack (Beta) page to save these settings, and the action will still show as Enabled even though no Slack workspace is connected.
Starting in Looker 7.4, you can connect to multiple Slack workspaces from a single Looker instance. Admins can add more workspaces by clicking the + Connect to Slack (Beta) workspace link on the Slack (Beta) action page, which is located on the Actions page under Platform in the Admin panel.
Authenticating into Your Slack Workspace
You must authenticate into the same Slack workspace that your Looker admin has connected to Looker. You must be an existing member of the workspace before you can authenticate into it from Looker.
These are the options for authenticating into a Slack workspace for the first time:
- From the Account page. (Starting in Looker 7.4, this is the only option to log in to multiple Slack workspaces.)
- From the Send or Schedule window.
Authenticating into Your 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 enabled a single Slack workspace, you'll see a button to Sign in with Slack. Starting in Looker 7.4, your Looker admin 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 created will fail.
Authenticating into Your Slack Workspace from the Send or Schedule Window
See the next section for more information on delivering data to the Slack action.
- 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 (Beta) action as the delivery destination under Where should this data go?
- Next to Slack, click Log in.
- Looker will request access to the Slack workspace. Click Allow.
- The Send or Schedule window should now show your Slack delivery options.
Delivering Data to Slack (Beta)
Before you can deliver data to the new Slack (Beta) action, Looker admins need to follow the steps above to enable the Slack App Labs feature and enable the Slack (Beta) action in the Looker Action Hub. You must also authenticate into the same Slack workspace that your admin has connected to Looker.
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, depending on what is available for your content.
- In the Send or Schedule window, select the Slack (Beta) action as the delivery destination under Where should this data go? If this is your first time using the Slack (Beta) action, you will need to authenticate into Slack (see the previous section about authenticating into your Slack workspace).
- Once you authenticate into Slack, Looker will display delivery options that are specific to Slack (Beta). The example below shows formatting options for delivering a dashboard. Sending or scheduling a Look or Explore will have different formatting options available, including CSV; XLSX; JSON — Simple; JSON — Label; JSON — Simple, Inline; JSON — Detailed, Inline; Text; and HTML.
- Starting in Looker 7.4, 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.
- 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.
Sharing Links to Looker Content in Slack
You can share links to user-defined dashboards, LookML dashboards, Looks (but not public 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 (by clicking Post to this Channel) and to add the content to their Looker Favorites folder (by clicking Add to Favorites). 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.
Once you've added content to your Favorites folder, the Looker Slack app 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 (Beta) 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 Slack app 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 Slack app lists supported slash commands.
/looker favorites— The Looker Slack app 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 Slack app 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).