Sending Looker content to Slack with the Slack Attachment (API Token) integration

You can schedule recurring or one-off deliveries of Looker content to third-party services that are integrated with Looker through the Looker Action Hub, which implements Looker's Action API and exposes popular integrations — also known as actions — for all Looker users. The Slack Attachment (API Token) integration posts an attachment with your Looker data to a Slack channel or direct message (DM). Unlike the Slack action that is offered in the Looker Action Hub, the Slack Attachment (API Token) integration is available for customer-hosted Looker deployments.

You can also send Looker content to Slack when specified thresholds in your data have been met or exceeded.

The integration uses a Slack app with specific permissions called bot token scopes, which govern what parts of your Slack workspace your app can access. Before you can use the Slack Attachment (API Token) integration in Looker, you must follow the setup instructions for configuring the integration on the Slack side, provided in the Slack Attachment (API Token) GitHub repo README file.

Enabling the Slack Attachment (API Token) integration in Looker

After the integration is set up on the Slack side, a Looker admin must must enable the Slack Attachment (API Token) action in the list of actions on the Actions page in the Admin menu:

  1. Scroll down the list of integrations and click the Enable button next to the Slack Attachment (API Token) listing.
  2. Enable the Enabled toggle.
  3. Enter the Bot User OAuth Access Token from the Slack side setup in the Slack API Token field.
  4. Click Save.

The integration is now configured. The Slack Attachment (API Token) option will now appear as a destination option in the Looker Scheduler and when you create alerts.

Delivering Looker content to Slack using the Looker Scheduler

To deliver your file attachment to Slack using the Slack Attachment (API Token) integration:

  1. Navigate to your Looker content, and then schedule a content delivery.
  2. When configuring the Scheduler, choose the Slack Attachment (API Token) option in the Destination field. Looker will display delivery options that are specific to Slack, including channel type, a list of channels, and options to add a comment that will be included with your delivery and to name the file attachment.
    • In the Channel Type field, select Channels to send the attachment to a Slack channel or Users to send the attachment to a Slack user.
    • In the Share In field, select the Slack channel or user where you want to post your attachment. This channel or user list is based on the bot credentials that you provided when you set up the Slack Attachment (API Token) app on the Slack side, and it may include public and private channels and DMs to which the bot has been invited. If you do not see a channel listed, verify that the bot has been invited to that Slack channel.
    • In the Comment field, enter any text you want to include with the attachment delivery.
    • In the Filename field, enter a filename for the attachment file. You do not need to include the file extension.
    For Slack attachments, the advanced delivery options available depend on whether you are delivering a dashboard or a Look.
  3. Click Save to save your schedule's settings, or click Send now to immediately send your attachment to Slack.