Connecting Slackedit

Slack is the new digital office space. Teams of all shapes and sizes use Slack to stay in touch. People share videos, pictures, GIFs and lots of emojis.

You can now connect Slack to Workplace Search, and search through all your public channels, private channels, and direct messages.

Remote sources like Slack are private sources. Once you have configured the connector, each individual member must add it as a unique private source via their personal settings. The connecting person can access their own private channels and direct messages, and only they have access. Each member may connect only one Slack private content source.

The Slack connector searches the following data from Slack:

Fetched Slack Documents

Including ID, File Metadata, Excerpt, Attachments, Sender, Recipient and Timestamps

The connector will also index the following data from Slack for speedier retrieval:

Stored Slack Documents

Users, Channels, Emojis

Configuring the Slack Connectoredit

Configuring the Slack connector is the first step prior to connecting the Slack service to Workplace Search, and requires that you create an OAuth App from the Slack platform.


Step 1. Login to the Slack Apps Portal.

Make sure that you create the app through a trusted and stable Slack account. We recommend using a team-owned account.


Step 2. Create an app, and then configure appropriate access levels. Click Create New App when prompted. In the modal, provide a name — like Workplace Search — and choose the right Workspace. After that, click Create App.

Figure 92. Connecting Slack

Step 3. A set of choices appears. Under Add features and functionality, click Permissions.

Figure 93. Connecting Slack

Step 4. Provide a redirect URL. Among other factors, the redirect URI is affected by which user interface you are using to manage Enterprise Search. Enterprise Search in Kibana and standalone Enterprise Search use different redirect URIs. See user interfaces for details on each UI.

If you are using standlone Enterprise Search, you will need to ensure the URL is relative to your Enterprise Search deployment. If you were setting it up on your local machine, you would use: http://localhost:3002/ws/sources/slack/create.

If you are using Enterprise Search in Kibana, you will use a URL relative to your Kibana deployment. If you were setting it up on your local machine, you would use: http://localhost:5601/app/enterprise_search/workplace_search/sources/added

After you have added it, click Save URLs.

Figure 94. Connecting Slack

Standalone Enterprise Search Examples:

# Deployment using a custom domain name
https://www.example.com/ws/sources/slack/create

# Deployment using a default Elastic Cloud domain name
https://c3397e558e404195a982cb68e84fbb42.ent-search.us-east-1.aws.found.io/ws/sources/slack/create

# Unsecured local development environment
http://localhost:3002/ws/sources/slack/create

Enterprise Search in Kibana Examples:

# Deployment using a custom domain name for Kibana
https://www.example.com/app/enterprise_search/workplace_search/sources/added

# Deployment using a default Elastic Cloud domain name for Kibana
https://c3397e558e404195a982cb68e84fbb42.kb.us-east-1.aws.found.io/app/enterprise_search/workplace_search/sources/added

# Unsecured local Kibana environment
http://localhost:5601/app/enterprise_search/workplace_search/sources/added

Step 5. Next, we must define scope. You will need to add five under User Token Scopes.

  • channels:read
  • users:read
  • emoji:read
  • files:read
  • search:read
Figure 95. Connecting Slack

Step 5. Next, on the left-hand side of the application menu, click Basic Information. Under the section Install your app to your workspace, select Install or Request to Install your application. Which you will see depends on your permissions. An admin must approve the application if you lack the permissions to do so.

Figure 96. Connecting Slack

Step 6. Once approved, you will have the option to view your App Credentials. Retrieve your Client ID and Client Secret. Workplace Search will need them!

Figure 97. Connecting Slack

Step 7. Return to Workplace Search. From the Workplace Search administrative dashboard, click Sources, locate Slack, click Configure and provide both your Client ID and Client Secret. Proceed forward.

Voilà! The Slack connector is now configured, and ready to be used to synchronize content. To enable Slack, visit the Security menu and enable the Slack connector for your team.

Reminder: Slack must be added as a private content source.

Connecting Slack to Workplace Searchedit

Once the Slack connector has been configured, you may connect a Slack instance to your private search experience.


Step 1. Access your own Workplace Search search dashboard, and click the Manage button.

Figure 98. Connecting Slack

Step 2. Click Add a private content source.

Figure 99. Connecting Slack

Step 3. Click Connect Slack. You will see Slack’s OAuth screen.

Accept the permissions to connect your Slack account.

Figure 100. Connecting Slack

Step 4. Success! Your personal Slack is now available to your search experience.

Figure 101. Connecting Slack

You will have the freshest content available each time you query.

Synchronized fieldsedit

The following table lists the fields synchronized from the connected source to Workplace Search. The attributes in the table apply to the default search application, as follows:

  • Display name - The label used when displayed in the UI
  • Field name - The name of the underlying field attribute
  • Faceted filter - whether the field is a faceted filter by default, or can be enabled (see also: Customizing filters)
Display name Field name Faceted filter

Id

id

No

Title

title

No

Type

type

Configurable

Slack Id

slack_id

Configurable

Username

username

Configurable

Real name

real_name

Configurable

Avatar

avatar

No

Is deleted

is_deleted

Configurable

Is bot

is_bot

Configurable

URL

url

No