In this article
...
- Workspace Info
- Create Workspace
- List Workspaces
- List Channels
- List Users
- Delete Channel
Prerequisites
A valid and active account in the Slack Workspace. You Add valid Slack Scopes based on the intended operation. You must have the owner or administrator privileges to perform some of these operations. See Required Slack Scopes below for details.
Required Slack Scopes
...
Any action you want to perform within a Slack Workspace, additionally needs appropriate Scopes assigned to your app. See the Scope and Permissions article in Slack API documentation for the complete list and each Account page under Configuring Slack Accounts for information on defining Scopes for your app.
To | Bot Token Accounts ( scope ) | User Token Accounts |
---|---|---|
Workspace Info | N/A | admin.teams:read |
Create Workspace | N/A | admin.teams:write |
List Workspaces | N/A | admin.teams:read |
List Channels in a Workspace | N/A | admin.usergroups:read |
List Users in a Workspace | N/A | admin.users:read |
Delete Channel | N/A |
|
Support for Ultra Pipelines
...
- Workspace operations work with User Tokens only. Do not use Bot Token Account with this Snap.
- Snaps in this Snap Pack use conditional display/hiding of fields. So, ensure that you always use the New Form UI (and not the classic UI) for the Snaps to function as designed/expected.
Known Issues
This Snap is not tested with admin credentials against an Enterprise-oriented Slack installation and this document does not deal with these features in detail.
...
Input/Output | Type of View | Number of Views | Examples of Upstream and Downstream Snaps | Description |
---|---|---|---|---|
Input | Document |
|
| A document with an input to perform one of the Workspace operations. |
Output | Document |
|
| A document containing the output records or result (success/failure) based on the operation performed. |
...
Parameter Name | Data Type | Description | Default Value | Example | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Label | String |
| Workspace Operations | Workspace Operations | ||||||||
Operation | Drop-down list | Select an operation from the following list of permitted workspace operations and specify the corresponding details needed:
| Workspace Info | Create Workspace | ||||||||
Snap Execution | Drop-down list | Select one of the three following modes in which the Snap executes:
| Execute only | Validate & Execute |
...
Error | Reason | Resolution |
---|---|---|
Unable to list all the workspaces. missing_scope | The token corresponds to an individual (non-Enterprise Grid) installation and hence not authorized to perform this Admin operation. OR The token associated with your Snap account does not have the required Slack Scope assigned. | If the Snap account/token is related to an individual installation of Slack, you cannot perform this operation. For Enterprise Grids, ensure that the token, and hence the account, have the required Slack Scope assigned as mentioned in the Prerequisites section of this document. You must re-install the Slack application for the new Scope assignments to take effect. |
Examples
Extracting the
...
List of non-Admin
...
Users in the Workspace
This example demonstrates how we can use the Workspace Operations Snap to extract/prepare a list of users in the Workspace that do not have admin privileges.
Firstly, we select List Users as the Operation in Workspace Operations Snap. This Snap does not need any other input and generates the list of all users added to the Workspace.
...