This page describes how to connect Slack to Agentspace Enterprise.
After you set up your data source and import data the first time, the data store syncs data from that source at a frequency that you select during setup.
Before you begin
Before setting up your connection:
Set up access control for your data source. For information about setting up access control, see Use data source access control.
To follow the steps in Configure your Slack app, you must have the permissions to install new apps in your workspace, that's included in the Workspace Owner role. Contact your Workspace Primary Owner to be assigned as a Workspace Owner.
Understand that by default, Slack restricts crawling and syncing content from private channels, group messages, and direct messages.
Configure the Slack app
The Slack connector requires an access token to be able to ingest documents from your Slack workspace. To obtain an access token to allow Agentspace Enterprise to ingest documents from your Slack workspace.
For more information, see [Quickstart][slack-quickstart] and [How to quickly get and use a Slack API token][slack-token] in the Slack documentation.
There are two different types of tokens you can use:
- Bot token
- Benefits:
- It's not tied to a specific user.
- It can have a more secure access to private Slack channels, instant messages (IM), and multi-person instant messages (MPIM). The members involved in those channels and messages can invite the bot.
- The bot can also be invited to public channels. When configuring the
bot token, you can add the
channels:join
permission for the crawler to automatically attempt to join all public channels.
- Limitations:
- When the bot attempts to join public channels, a join message is sent to the channel.
- Benefits:
- User token
- Benefits:
- It can access all public channels without the need to join them beforehand.
- Limitations:
- It's tied to a specific user.
- With user token, users can't crawl private channels, IMs, and MPIMs that they're not a part of.
- Benefits:
Configure bot token
The following steps show you how to configure a bot token:
- Sign in to Slack API Apps.
- Click Create new app.
Create new app in Slack App - Select From scratch. This option lets you configure the app's
information, scopes, settings, and features.
Start creating the app from scratch - Enter a name for your app. The name you select is visible to all Slack users.
- Select the workspace for integration.
Because you can't change an app's workspace later, ensure that you select the
correct workspace.
Enter a name and select the correct workspace - Click Create app.
- In the sidebar, select OAuth & permissions.
OAuth & Permissions in the Slack app's sidebar - Under Bot token scopes, add the following required scopes:
#general
and#random
channels.Select the scopes for the bot token
By default, the bot reads from the - To enable the bot to crawl the channels, do the following:
- For public channels, do one of the following:
- Invite the bot manually.
- Grant the
channels:join
scope to allow the bot to attempt join automatically.
- For private channels, invite the bot manually.
- For public channels, do one of the following:
- On the same page, click Install to WORKSPACE_NAME.
Install the app in your workspace - Follow the on-screen instructions to install the app and after the app is
installed, copy and note the bot's OAuth token.
Copy the bot's OAuth token
Configure a user token
The following steps show you how to configure a bot token:
- Sign in to Slack API Apps.
- Click Create new app.
Create new app in Slack App - Select From scratch. This option lets you configure the app's
information, scopes, settings, and features.
Start creating the app from scratch - Enter a name for your app. The name you select is visible to all Slack users.
- Select the workspace for integration.
Because you can't change an app's workspace later, ensure that you select the
correct workspace.
Enter a name and select the correct workspace - Click Create app.
- In the sidebar, select OAuth & permissions.
OAuth & Permissions in the Slack app's sidebar - Under User token scopes, add the following required scopes:
Select the scopes for the user token - On the same page, click Install to WORKSPACE_NAME.
Install the app in your workspace - Follow the on-screen instructions to install the app and after the app is
installed, copy and note your user OAuth token.
Copy the user's OAuth token
Create a Slack Cloud connector
Console
To use the Google Cloud console to sync data from Slack to Agentspace Enterprise , follow these steps:
In the Google Cloud console, go to the Agentspace page.
In the navigation menu, click Data stores.
Click
Create data store.In the Google Cloud console, create a data store On the Select a data source page, scroll or search for Slack to connect your third-party source.
Enter your Slack authentication information.
- Instance ID (Workspace ID):
- To obtain your workspace ID, sign in to your Slack workspace using a web browser. Don't use the Slack app. For more information, see [Specify the Slack source for your data store][slack-workspace-id].
- In the URL, note the unique workspace ID, which is the string after
/client
beginning with T.Obtain the instance ID (workspace ID)
- Auth token: Use the token obtained from the last when you generated the bot token or the user token.
- Instance ID (Workspace ID):
Select which entities to sync and click Continue.
- To crawl all channels, retain the default selections.
- To crawl specific channels, click Filter and select the channels.
The following image shows an example configuration that allows crawling
of channels named
general
andrandom
.Select the channels to crawl
Select a region for your data store.
Enter a name for your data store.
Select a synchronization frequency for your data store.
Click Create. Agentspace Enterprise creates your data store and displays your data stores on the Data stores page.
To check the status of your ingestion, go to the Data stores page and click your data store name to see details about it on its Data page. The Connector state changes from Creating to Running when it starts synchronizing data. When ingestion is complete, the state changes to Active to indicate that the connection to your data source is set up and awaiting the next scheduled synchronization.
Depending on the size of your data, ingestion can take minutes or hours.
Next steps
To attach your data store to an app, create an app and select your data store following the steps in Create an app.
To preview how your search results appear after your app and data store are set up, see Preview search results. If you used third-party access control, see Preview results for apps with third-party access control.
To enable alerts for the data store, see Configure alerts for third-party data stores.