In this article
Overview
Use this Snap to perform the following operations upon the specified channel:
- Add members
- Remove members
- List members
- Rename channel
Prerequisites
None.
Support for Ultra Pipelines
Works in Ultra Pipelines.
Limitations
None.
Known Issues
None.
Snap Input and Output
Input/Output | Type of View | Number of Views | Examples of Upstream and Downstream Snaps | Description |
---|---|---|---|---|
Input | Document |
|
| A document containing channel details, member list, team ID, or channel ID. |
Output | Document |
|
| A document containing details of the selected operation's execution. |
Snap Settings
Parameter Name | Data Type | Description | Default Value | Example |
---|---|---|---|---|
Label | String | Specify a name for the Snap. You can modify this to be more specific, especially if you have more than one of the same Snap in your pipeline. | Channel Operations | Add Members |
Operation | String | Required. Select the channel operation to perform. Available options are:
Add/Remove Members You can add or remove members in private channels only. Public channels contain all team members, by default. | Add Members | Rename Channel |
Team ID | String/Expression/Suggestion | Required. Enter the ID of the team. Alternatively, click the icon to fetch a list of team IDs associated with the account. | N/A | b22e8da4-17c1-45c0-baa9-47aed7344e92 |
Channel ID | String/Expression/Suggestion | Required. Enter the ID of the target channel that belongs to the selected team. Alternatively, click the icon to fetch a list of channel IDs associated with the specified team. Channel ID format Use this format to specify the channel in this field. <Channel_Name><space>:<space><Channel_ID> | N/A | Chat, teams, channels and apps : 12:34ab567d89012b34b0fba40f987f2f3d@thread.tacv2 |
Add Members | Activates when you select the Add Members option in the Operation field. Use this field set to add members to the channel. This field set contains the Member ID field. | |||
Member ID | String/Expression/Suggestion | Enter the ID of the member to add. Alternatively, click the icon to fetch a list of member IDs associated with the team. You can use each row to specify a member or include multiple members separated by commas, in the same row. | N/A | e12b3456-7c89-012b-345f-67c89dca0bcd |
Add Channel Owners | Activates when you select the Add Members option in the Operation field. Use this field set to assign owners for the channel. This field set contains the Owner ID field. | |||
Owner ID | String/Expression/Suggestion | Enter the ID of the member. Alternatively, click the icon to fetch a list of member IDs associated with the team. You can use each row to specify an owner or include multiple owners separated by commas, in the same row. | N/A | e12b3456-7c89-012b-345f-67c89dca0bcd |
Remove Members | Activates when you select the Remove Members option in the Operation field. Use this field set to remove members from the channel. This field set contains the Member ID field. | |||
Member ID | String/Expression/Suggestion | Enter the ID of the member to remove. Alternatively, click the icon to fetch a list of member IDs associated with the team. You can use each row to specify a member or include multiple members separated by commas, in the same row. | N/A | e12b3456-7c89-012b-345f-67c89dca0bcd |
New Channel Name | String/Expression | Activates when you select the Rename Channel option in the Operation field. Enter the new name for the channel. | N/A | New_Contractors |
Number of retries | String/Expression | Activates when you select the Add Members, Remove Members, or Rename Channel option in the Operation field. Enter the number of attempts the Snap makes to perform the selected operation in case of connection failure/unsuccessful attempts. To avoid 502 Bad Gateway error Use a higher value (such as 3, 4, or more) in this field to ensure the Snap/Pipeline runs successfully. | 0 | 3 |
Retry Interval (seconds) | String/Expression | Activates when you select the Add Members, Remove Members, or Rename Channel option in the Operation field. Enter the time interval in seconds between retry attempts. To avoid 502 Bad Gateway error Use a higher value (such as 3, 4, or more) in this field to ensure the Snap/Pipeline runs successfully. | 1 | 6 |
Snap Execution | Drop-down list | Select one of the three following modes in which the Snap executes:
| Execute only | Validate & Execute |
Troubleshooting
Error | Reason | Resolution |
---|---|---|
Unsupported Operation | You tried adding members to a public channel. | Verify whether the specified/selected channel is a public channel. |
Examples
Performing Channel Operations
The following example Pipeline demonstrates how you can use the Channel Operations Snap to perform various actions on channels within your Microsoft Teams instance. This example assumes that you have:
- Set up your application in Azure Portal with necessary permissions.
- Configured the required Snap account with necessary scopes.
- Created a public or private channel using the Create Channel Snap.
This Pipeline uses the OAuth2 user account (authorization code grant type) to carry out the channel operations on behalf of a signed-in user. It uses five instances of the Channel Operations Snap, each performing one of the following operations on the channel:
- Add Members (to the channel)
- Rename Channel
- Remove Members (from the channel)
- List Members (in the channel)
Adding members to the channel
In the Channel Operations Snap's settings, select the Add Members option from the Operation drop-down list. Configure the Snap further by providing the channel details and the member/s to add. You can set one or more channel owners, who need not be members of the channel. Besides the Suggest icons provided, you can also use expressions to specify these details.
Channel Operations Snap to add members to a channel |
---|
Output |
Make a copy of this Snap's output using the Copy Snap to simultaneously use the output in two Snaps.
Copy Snap |
---|
Outputs |
Renaming a channel
Add a Channel Operations Snap to one of the Copy Snap outputs and choose Rename Channel option as the Operation. Configure the Snap further to provide the channel details and the new name for the channel. Besides the Suggest icons provided, you can also use expressions to specify these details.
Channel Operations Snap to rename a channel |
---|
Output |
Removing members from a channel
Add another Channel Operations Snap to the other Copy Snap output and choose Remove Members option as the Operation. Configure the Snap further to provide the channel details and the new name for the channel. Besides the Suggest icons provided, you can also use expressions to specify these details.
Removing a channel member
To remove a channel member without using the Suggest icon in the Member ID field, ensure that you specify/pass the id
of the member along with the Team ID and Channel ID and not the userId
.
Retrieving the updated list of members in the channel
To retrieve and verify the updated list of channel members, you can add a Channel Operations Snap to either or both the Snaps (Rename Channel and Remove Member). You can also configure these Snaps to perform List members operation.
Channel Operations Snap to retrieve updated list of channel members after renaming the channel | Channel Operations Snap to retrieve updated list of channel members after removing one |
---|---|
Output | Output |
Downloads
Important Steps to Successfully Reuse Pipelines
- Download and import the Pipeline into SnapLogic.
- Configure Snap accounts as applicable.
- Provide Pipeline parameters as applicable.