In this article
...
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 (Doc in Progress) for information on defining Scopes for your app.
To | Bot Token Accounts | User Token Accounts ( user_scope ) |
---|---|---|
View lists of users in the Workspace to select from | users:read | users:read |
| N/A | admin.users:write |
Support for Ultra Pipelines
...
Input/Output | Type of View | Number of Views | Examples of Upstream and Downstream Snaps | Description |
---|---|---|---|---|
Input | Document |
|
| A document containing information required to perform a specific User operation. |
Output | Document |
|
| A document containing the result (success/failure) of performing the selected User operation. |
Snap Settings
Parameter Name | Data Type | Description | Default Value | Example | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Label | String |
| User Operations | User Operations | ||||||||
Operation | Drop-down list | Select an operation from the following list of permitted user operations and specify the corresponding details needed:
| User Info | User Info | ||||||||
User ID | String/Expression/Suggestion | Required for User Operations. Select a user from the suggested values which are typically the list of users available in the Workspace. Alternatively, you can enter one or more usernames and/or user IDs, separated by commas, in one of the following formats.
| N/A | @user.name:W01A94P7MK1 | ||||||||
Team ID | String/Expression/Suggestion | Required for User Operations - Add User and Remove User. Select a Team (Workspace) ID from the suggested list of Team IDs to add the user to or remove the user from. | N/A | T01BLQ3PNMB | ||||||||
Is Restricted | Check box | Required for User operation - Add User. Select this check box to restrict the user's access to only multiple channels. If selected, the user is considered as a guest user with limited access. Do not select this check box if the user should be a Full Member. | Not selected | Selected | ||||||||
Is Ultra Restricted | Check box | Required for User operation - Add User. Select this check box to restrict the user's access to a single channel. If selected, the user is considered as a guest user with very limited access. Do not select this check box if the user should be a Full Member. | Not selected | Selected | ||||||||
Snap Execution | Drop-down list | Select one of the three following modes in which the Snap executes:
| Execute only | Validate & Execute |
...
Retrieving a user's information and writing it to a file
This example demonstrates the only user operation that you can perform without admin/owner privileges on your Slack app, that is User Info. using the User Operations Snap. All operations carried out in this example are for demonstration purposes only and the Pipeline reflects the actual/real-time behavior but not the values, either used or retrieved.
We use the User Operations Snap with User Info operation selected, to retrieve the user's information. We also provide the User ID of the user in this Snap. Alternatively, you can select the user from the suggested list of users using the icon. The Snap fetches the user's details and presents it in the output (see the following Output).
...