steampipe plugin install slack

Table: slack_search - Query Slack Search Results using SQL

Slack Search is a feature within Slack that allows you to find specific items within your workspace, including messages, files, and users. It provides a way to navigate through the large amount of data generated in a busy workspace, and can be used to locate specific pieces of information, or to understand the context of a discussion or project. Slack Search helps you stay informed about the content and context of communications in your workspace.

Table Usage Guide

The slack_search table provides insights into the search results within Slack. As a Slack workspace administrator or a team lead, explore specific details through this table, including messages, files, and users that match the search criteria. Utilize it to uncover information about communications, such as the context of a discussion, the details of a project, or the specific pieces of information you are looking for.

Important Notes

  • You must specify the query in the where clause to query this table.

Examples

Search for anything using standard slack search syntax

Explore the usage of standard Slack search syntax to pinpoint specific conversations. This can be particularly useful in larger teams where tracking down important information from a particular user or channel after a certain date can be time-consuming and challenging.

select
user_name,
timestamp,
channel ->> 'name' as channel,
text
from
slack_search
where
query = 'in:#steampipe from:nathan urgent after:3/12/2021';
select
user_name,
timestamp,
json_extract(channel, '$.name') as channel,
text
from
slack_search
where
query = 'in:#steampipe from:nathan urgent after:3/12/2021';

Consolidate results of multiple searches

Analyze the settings to understand urgent messages from specific users in a particular channel after a certain date. This can help in prioritizing responses and managing communication effectively.

select
user_name,
timestamp,
channel ->> 'name' as channel,
text
from
slack_search
where
query in(
'in:#steampipe from:nathan urgent after:3/12/2021',
'in:#steampipe from:kai urgent after:3/12/2021'
);
select
user_name,
timestamp,
json_extract(channel, '$.name') as channel,
text
from
slack_search
where
query in(
'in:#steampipe from:nathan urgent after:3/12/2021',
'in:#steampipe from:kai urgent after:3/12/2021'
);

Schema for slack_search

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form, e.g. connection_name.
attachmentsjsonbAttachments matching the query.
blocksjsonbBlock sections in the matching artifact.
channeljsonbChannel or conversation where the search result was found.
permalinktextURL for the search result.
querytext=The search query.
texttextSearch result text, including query.
timestamptimestamp with time zoneTimestamp of the matching artifact.
typetextType of the artifact matching the search.
user_idtextID of the user responsible for the matching text.
user_nametextName of the user responsible for the matching text.
workspace_domaintextThe domain name for the workspace.

Export

This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.

You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh script:

/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- slack

You can pass the configuration to the command with the --config argument:

steampipe_export_slack --config '<your_config>' slack_search