Table: slack_group
Slack workspace user groups.
Examples
List all groups (includes deleted)
select id, name, date_delete, user_countfrom slack_group;
List groups that are currently active
select id, name, user_countfrom slack_groupwhere deleted_by is not null;
List all groups a user is a member of
select g.id, g.namefrom slack_group as g, slack_user as uwhere g.users ? u.id and u.email = 'dwight.schrute@dundermifflin.com';
List all user group membership pairs
select g.name as group_name, u.email as user_emailfrom slack_group as g left join lateral jsonb_array_elements_text(g.users) as gu on true left join lateral ( select id, email from slack_user ) as u on u.id = guorder by g.name, u.email;
.inspect slack_group
Slack workspace user groups.
Name | Type | Description |
---|---|---|
_ctx | jsonb | Steampipe context in JSON form, e.g. connection_name. |
auto_type | text | The auto_type parameter can be admin for a Workspace Admins group, owner for a Workspace Owners group or null for a custom group. |
created_by | text | User who created the group. |
date_create | timestamp with time zone | Date when the group was created. |
date_delete | timestamp with time zone | Date when the group was deleted. |
date_update | timestamp with time zone | Date when the group was last updated. |
deleted_by | text | User who deleted the group. |
description | text | Description of the group. |
handle | text | The handle parameter indicates the value used to notify group members via a mention without a leading @ sign. |
id | text | ID of the group. |
is_external | boolean | True if the group is external facing. |
is_user_group | boolean | True if this is a user group. |
name | text | Name of the group. |
prefs | jsonb | The prefs parameter contains default channels and groups (private channels) that members of this group will be invited to upon joining. |
team_id | text | Team ID the group is defined in. |
updated_by | text | User who last updated the group. |
user_count | bigint | Number of users in the group. |
users | jsonb | List of users (IDs) in the group. |