In this article
The page's title should always be the Snap's name. For example, File Reader.
Use this Snap to perform the following Workspace operations.
Provide a functional overview of the Snap. Do not mention anything about the Snap's internal technology or techniques. The user should be able to understand what the Snap. Include a screenshot of a well-configured Snap 600px.
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.
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 |
|
List all prerequisites for using the Snap as a bullet list. Use direct sentences. For example, in case of a Write-type Snap a prerequisite would be that the user must have write access. Include links to external official documentation, if required. Use "None." if there no prerequisites.
Works in Ultra Pipelines.
List all Snap-specific limitations as a bullet list. Limitations can be imposed by the Snap's development environment and also by the endpoint's API. List both. Use direct sentences. Include links to external official documentation, if required. Use "None.: if there are no limitations.
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.
Type of view: Document/Binary/Both. Get number of views from the Views tab in the Snap. List at least three compatible Snaps in each category. Provide a brief of the input/output required. If the input/output is optional then preface the description with "Optional." For example, "Transaction data complying with the Orderful schema as a JSON document."
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 |
You can get information for this section from the Snap's source code, typically the Messages.java file in GitHub. Ask the developer to access this file. Do not use "Please" in the Reason or Resolution. If there is "Please" in the error message then contact the developer to have it removed as needed.
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. |
Example title must be gerunds in title case.
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.
Workspace Operations Snap |
---|
Output |
Now, we connect a Filter Snap to extract only the users who do not have admin privileges using the Filter expression $is_admin == False. This Snap yields the following output.
Filter Snap |
---|
Output |
With this information at hand, we now connect a Mapper Snap to the Filter Snap to extract the user details we want to populate for each non-Admin user. This example showcases three fields - $id as id, $real_name as Name, and the result of an expression $is_admin == true?"Admin user":"Not Admin user" as Admin? for each non-Admin user in the list. You can map and extract as many fields as available for each user record in the Filter Snap's output.
Mapper Snap |
---|
Output |
To save the extracted data as a file, you can choose to format this data using any Formatter Snap and write the output into a file (JSON, CSV, and so on) using the File Writer.
Add a download link to the Pipeline in the the "Download" text above. Explain the Pipeline/Snap configuration in detail if a complex enough example has been used. Ensure that the functionality you are trying to illustrate is captured correctly. Include caveats as appropriate. To insert link: Press Ctrl + K --> Files --> Select the SLP file corresponding to the example.
|
Edit the Excerpt Include macro below to link to the Snap Pack page for this Snap page. Ensure that the heading Snap Pack History is not within the Snap Pack's history Excerpt.
Provide links to the endpoint's official documentation, any relevant or related internal documentation, and any other links you have referred to on this page. Care should be taken when referencing external sites/documentation that it is an official site/documentation. Do not refer to forums such as stackoverflow.