UserGroups
Create, update, and query all User Groups for a Slack team.
Select
The 本製品 uses the Slack API to process search criteria that refer to the IncludeDisabled column while other search criteria are processed client-side within the 本製品. For example, the following query is processed server side:
SELECT * FROM UserGroups WHERE IncludeDisabled = 'true'
Insert
Inserts are allowed only for paid workspaces and when you specify the Name of the user group. Other optional fields are Description, Handle, and PreferredChannelIds. For example:
INSERT INTO UserGroups (Name, PreferredChannelIds) VALUES ('newgroup', 'C5S8LAY0Y,C79J7PREU')
Update
You can update a user group by providing the Id and you can update the UserIds, Name, Description, PreferredChannelIds, and Handle columns. Updates are only allowed for paid workspaces.
UPDATE UserGroups SET PreferredChannelIds = 'C5S8LAY0Y,C79J7PREU', Name = 'newname' WHERE Id = 'U4826PEF'
Delete
Slack does not support the deletion of user groups.
Columns
Name | Type | ReadOnly | Description |
Id [KEY] | String | True |
The Id of the User Group. |
Name | String | False |
Indicates the friendly name of the group. |
Description | String | False |
Explains the purpose of the group. |
TeamId | String | True |
Identifier of the team this user group belongs to. |
UserIds | String | False |
Contains a list of user id values that belong to the User Group. |
UserCount | String | True |
Indicates the total number of users in a group. |
Handle | String | False |
Indicates the value used to notify group members via a mention without a leading @ sign. |
PreferredChannelIds | String | False |
Channels that members of this group will be invited to upon joining. |
PreferredGroupsIds | String | True |
Groups (private channels) that members of this group will be invited to upon joining. |
IsExternal | Boolean | True |
Represents this conversation as being externally shared. |
DateCreated | Datetime | True |
Datetime of the creation of the user group. |
DateUpdated | Datetime | True |
Datetime of the last update made for the user group. |
DateDeleted | Datetime | True |
Datetime that the user group became disabled. |
CreatedBy | String | True |
Id of the user who created the user group. |
UpdatedBy | String | True |
Id of the user who last modified the user group. |
DeletedBy | String | True |
Id of the user who disabled/archived the user group. |
AutoType | String | True |
This parameter's value can be admins for a Workspace Admins group, owners for a Workspace Owners group or null for a custom group. |
Pseudo-Columns
SELECT ステートメントのWHERE 句では、疑似カラムフィールドを使用します。データソースから返されるタプルを詳細に制御することができます。
Name | Type | Description |
IncludeDisabled | Boolean |
A boolean set to include or exclude disabled User Groups in the retrieved data. |