Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

In this article

Table of Contents
maxLevel2
absoluteUrltrue

Overview

Use You can use this Snap to perform the following operations upon the specified channel:

  • Add members

  • Remove members

  • List members

  • Rename channel

...

...

Snap Type

Teams - Channel Operations Snap is a Write-type Snap that performs channel operations like add/remove/list members and updating channel names.

Prerequisites

None.

Support for Ultra Pipelines

Works in Ultra Pipelines

Limitations

...

None.

& Known Issues

None.

Snap

...

Views

Type

Format

Number of Views

Examples of Upstream and Downstream Snaps

Description

Input 

Document

  • Min: 0

  • Max: 1

  • Mapper Snap

  • Copy Snap

A document containing channel details, member list, team ID, or channel ID.

Output

Document

  • Min: 1

  • Max: 1

  • JSON Formatter + File Writer

  • Mapper

A document containing details of the selected operation's execution.

Error

Error handling is a generic way to handle errors without losing data or failing the Snap execution. You can handle the errors that the Snap might encounter while running the Pipeline by choosing one of the following options from the When errors occur list under the Views tab:

  • Stop Pipeline Execution: Stops the current pipeline execution if the Snap encounters an error.

  • Discard Error Data and Continue: Ignores the error, discards that record, and continues with the remaining records.

  • Route Error Data to Error View: Routes the error data to an error view without stopping the Snap execution.

Learn more about Error handling in Pipelines.

Snap Settings

...

Info
  • Asterisk (*): Indicates a mandatory field.

  • Suggestion icon ((blue star)): Indicates a list that is dynamically populated based on the configuration.

  • Expression icon ((blue star)): Indicates whether the value is an expression (if enabled) or a static value (if disabled). Learn more about Using Expressions in SnapLogic.

  • Add icon ((blue star)): Indicates that you can add fields in the field set.

  • Remove icon ((blue star)): Indicates that you can remove fields from the field set.

Field Name

Field Type

Field Dependency

Description

Label*

Default ValueChannel Operations
Example: Channel Operations

String

N/A

Specify a unique 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.

Operation*

Default ValueAdd Members
Example: Rename Channel

String

N/A

Select the channel operation to perform.

 Available

 Available options

are

include:

  • Add Members

.
  • : Activates the Add Members and Add Channel Owners field sets, and the Number of Retries and Retry Interval (seconds) fields.

  • Remove Members

.
  • : Activates the Remove Members field set, and the Number of Retries and Retry Interval (seconds) fields.

  • List Members:

  • Rename Channel

.
  • : Activates the New Channel Name, Number of Retries, and Retry Interval (seconds) fields.

InfotitleTeam ID

Add/Remove Members

You can add or remove members in private channels only. Public channels contain all team members, by default.

Add MembersRename Channel

Team ID*

Default Value: N/A
Example: b22e8da4-17c1-45c0-baa9-47aed7344e92

String/Expression/Suggestion

Required. Enter the

N/A

Specify the ID of the team. Alternatively, click the Image Modified icon to fetch a list of team IDs associated with the account. 

N/Ab22e8da4-17c1-45c0-baa9-47aed7344e92Channel ID

Channel ID*

Default Value: N/A
Example: Chat, teams, channels and apps : 12:34ab567d89012b34b0fba40f987f2f3d@thread.tacv2

String/Expression/Suggestion

Required. Enter the

N/A

Specify the ID of the target channel that belongs to the selected team. Alternatively, click the Image Modified icon to fetch a list of channel IDs associated with the specified team. 

Infotitle

Channel ID format

Use this format to specify the channel in this field

.

: <Channel_Name><space>:<space><Channel_ID>

N/AChat, 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

fieldset to add members to the channel.

This field set contains the

Member ID

field.Member ID

Default Value: N/A
Example: e12b3456-7c89-012b-345f-67c89dca0bcd

String/Expression/Suggestion

Enter

Activates when you select the Add Members option in the Operation field.

Specify the ID of the member to add. Alternatively, click the Image Modified 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

Add Channel Owners

Use this fieldset to assign owners for the channel.

Owner ID

Default Value: N/A
Example: e12b3456-7c89-012b-345f-67c89dca0bcd

Add Channel Owners

String/Expression/Suggestion

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 IDString/Expression/SuggestionEnter

Specify the ID of the member. Alternatively, click the Image Modified icon to fetch a list of member IDs associated with the team.

 You

 You can use each row to specify an owner or include multiple owners separated by commas, in the same row.

N

Remove Members

Use this fieldset to remove members from the channel. 

Member ID

Default Value: N/A
Example: e12b3456-7c89-012b-345f-67c89dca0bcd

Remove Members

String/Expression/Suggestion

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 IDString/Expression/SuggestionEnter the ID

Specify the ID of the member to remove. Alternatively, click the Image Modified icon to fetch a list of member IDs associated with the team.

 You

 You can use each row to specify a member or include multiple members separated by commas, in the same row.

NNew Channel Name

New Channel Name

Default Value: N/A

e12b3456-7c89-012b-345f-67c89dca0bcd

Example: New_Contractors

String/Expression

Activates when you select the Rename Channel option in the Operation field.

Enter Number of retriesString

Specify the new name for the channel.

N/ANew_Contractors

Number of Retries

Default Value0
Example3

Integer/Expression

Activates when you select the Add Members, Remove Members, or Rename Channel option in the Operation field.

Enter

Specify the number of attempts the Snap makes to perform the selected operation in case of connection failure/unsuccessful attempts. 

Infotitle

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. 

03

Retry Interval (seconds)

String

Default Value1
Example6

Integer/Expression

Activates when you select the Add Members, Remove Members, or Rename Channel option in the Operation field.

Enter

Specify the time interval in seconds between retry attempts.

info

titleSnap ExecutionDrop-down list

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. 

16

Snap Execution

Default ValueExecute only
ExampleValidate & Execute

Dropdown list

N/A

Select one of the three following modes in which the Snap executes:

  • Validate & Execute. Performs limited execution of the Snap and generates a data preview during Pipeline validation, then performs full execution of the Snap (unlimited records) during Pipeline runtime.

  • Execute only. Performs full execution of the Snap during Pipeline

execution without
  • execution without generating preview data.

  • Disabled. Disables the Snap and all Snaps downstream from it.

Execute onlyValidate & 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:

...

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

Image Removed

Output

Output
Image Added
Image Removed
Image Added

Make a copy of this Snap's output using the Copy Snap to simultaneously use the output in two Snaps.

Copy Snap

Image Removed

Output

Outputs
Image Added

Image Removed
Image Added

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

Image Removed

Output

Output
Image Added
Image Removed
Image Added

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.

...

Image Removed

...

Removing Members Snap to remove member from channel

Output

Image AddedImage Added

Info

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

...

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

Output

Image Added

Image Added

Channel Operations Snap to retrieve updated list of channel members


after removing one

Image Removed

Image Removed

Output

Output
Image Added

Image Removed

Image Removed
Image Added

Download this Pipeline.

Downloads

title
Note
Info

Important Steps to Successfully Reuse Pipelines

  1. Download and import the Pipeline into SnapLogic.

  2. Configure Snap accounts as applicable.

  3. Provide Pipeline parameters as applicable.

Attachments
patterns*.slp, *.zip

...

Snap Pack History

Expand

Multiexcerpt-include-macro
nameTeams

...

_SPH
templateData[]
pageTeams Snap Pack

...

addpanel

...

false

...

Related Content