Mengirim konten Looker ke Slack dengan integrasi Lampiran Slack (Token API)
Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Anda dapat menjadwalkan pengiriman konten Looker berulang atau satu kali ke layanan pihak ketiga yang terintegrasi dengan Looker melalui Looker Action Hub, yang menerapkan Action API Looker dan menampilkan integrasi populer, yang juga dikenal sebagai tindakan, untuk semua pengguna Looker. Integrasi Lampiran Slack (Token API) memposting lampiran dengan data Looker Anda ke saluran Slack atau pesan langsung (DM). Berbeda dengan tindakan Slack yang ditawarkan di Looker Action Hub, integrasi Lampiran Slack (Token API) tersedia untuk deployment Looker yang dihosting pelanggan.
Integrasi ini menggunakan aplikasi Slack dengan izin khusus yang disebut cakupan token bot, yang mengatur bagian mana saja dari ruang kerja Slack yang dapat diakses oleh aplikasi Anda. Sebelum dapat menggunakan integrasi Lampiran Slack (Token API) di Looker, Anda harus mengikuti petunjuk penyiapan untuk mengonfigurasi integrasi di sisi Slack, yang disediakan di file README repo GitHub Lampiran Slack (Token API).
Mengaktifkan integrasi Lampiran Slack (Token API) di Looker
Setelah integrasi disiapkan di sisi Slack, admin Looker harus mengaktifkan tindakan Lampiran Slack (Token API) dalam daftar tindakan di halaman Actions pada menu Admin:
Scroll ke bawah daftar integrasi dan klik tombol Enable di samping listingan Lampiran Slack (API Token).
Integrasi kini telah dikonfigurasi. Opsi Lampiran Slack (Token API) kini akan muncul sebagai opsi tujuan di Penjadwal Looker dan saat Anda membuat pemberitahuan.
Mengirimkan konten Looker ke Slack menggunakan Looker Scheduler
Untuk mengirimkan lampiran file ke Slack menggunakan integrasi Lampiran Slack (Token API):
Saat mengonfigurasi Scheduler, pilih opsi Lampiran Slack (Token API) di kolom Tujuan. Looker akan menampilkan opsi pengiriman yang spesifik untuk Slack, termasuk jenis saluran, daftar saluran, dan opsi untuk menambahkan komentar yang akan disertakan dengan pengiriman Anda dan memberi nama lampiran file.
Di kolom Channel Type, pilih Channels untuk mengirim lampiran ke saluran Slack, atau Users untuk mengirim lampiran ke pengguna Slack.
Di kolom Bagikan Di, pilih saluran atau pengguna Slack tempat Anda ingin memposting lampiran. Saluran atau daftar pengguna ini didasarkan pada kredensial bot yang Anda berikan saat menyiapkan aplikasi Lampiran Slack (Token API) di sisi Slack, dan dapat mencakup saluran publik dan pribadi serta DM yang mengundang bot. Jika Anda tidak melihat channel yang tercantum, pastikan bot telah diundang ke saluran Slack tersebut.
Di kolom Komentar, masukkan teks yang ingin Anda sertakan dengan pengiriman lampiran.
Di kolom Filename, masukkan nama file untuk file lampiran. Anda tidak perlu menyertakan ekstensi file.
Untuk lampiran Slack, opsi pengiriman lanjutan yang tersedia bergantung pada apakah Anda mengirim dasbor atau Tampilan.
Klik Save untuk menyimpan setelan jadwal Anda, atau klik Kirim sekarang untuk segera mengirim lampiran ke Slack.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-08-25 UTC."],[],[],null,["# Sending Looker content to Slack with the Slack Attachment (API Token) integration\n\nYou can schedule recurring or one-off deliveries of Looker content to [third-party services that are integrated with Looker](/looker/docs/admin-panel-platform-actions#list_of_integrated_services) 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](/looker/docs/scheduling-slack) action that is offered in the Looker Action Hub, the Slack Attachment (API Token) integration is available for customer-hosted Looker deployments.\n\n\nYou can also send Looker content to Slack when [specified thresholds in your data have been met or exceeded](/looker/docs/alerts-overview#sending_alerts_to_the_slack_attachment_(api_token)_integration).\n\n\nThe 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](https://github.com/looker-open-source/actions/blob/master/src/actions/slack/legacy_slack/README.md).\n| **Note:** If you have a permission that provides access to only select pages in the Admin panel, such as [`manage_schedules`](/looker/docs/admin-panel-users-roles#manage_schedules), [`manage_themes`](/looker/docs/admin-panel-users-roles#manage_themes), or [`see_admin`](/looker/docs/admin-panel-users-roles#see_admin), but you don't have the [Admin role](/looker/docs/admin-panel-users-roles#default_roles), the page or pages that are described here may not be visible to you in the Admin panel.\n\nEnabling the Slack Attachment (API Token) integration in Looker\n---------------------------------------------------------------\n\n\nAfter 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**](/looker/docs/admin-panel-platform-actions) page in the **Admin** menu:\n\n1. Scroll down the list of integrations and click the **Enable** button next to the Slack Attachment (API Token) listing.\n2. Enable the **Enabled** toggle.\n3. Enter the **Bot User OAuth Access Token** [from the Slack side setup](https://github.com/looker-open-source/actions/blob/master/src/actions/slack/legacy_slack/README.md) in the **Slack API Token** field.\n4. Click **Save**.\n\n\nThe 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](/looker/docs/creating-alerts#sending_alerts_to_the_slack_attachment_api_token_integration).\n\nDelivering Looker content to Slack using the Looker Scheduler\n-------------------------------------------------------------\n\n\nTo deliver your file attachment to Slack using the Slack Attachment (API Token) integration:\n\n1. Navigate to your Looker content, and then [schedule a content delivery](/looker/docs/scheduling).\n2. 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.\n - 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.\n - 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](https://github.com/looker-open-source/actions/blob/master/src/actions/slack/legacy_slack/README.md) 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.\n - In the **Comment** field, enter any text you want to include with the attachment delivery.\n - In the **Filename** field, enter a filename for the attachment file. You do not need to include the file extension.\n\u003e For Slack attachments, the advanced delivery options available depend on whether you are delivering a [dashboard](/looker/docs/scheduling-and-sending-dashboards#advanced_options) or a [Look](/looker/docs/delivering-looks-explores#applying_advanced_delivery_options).\n3. Click **Save** to save your schedule's settings, or click **Send now** to immediately send your attachment to Slack."]]