Versions Compared

Key

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

In this article

Table of Contents
maxLevel2
absoluteUrltrue

Overview

Use this Snap to perform the following Channel operations in your Slack Workspace.workspace:

  • Archive Channelchannel
  • Create Channelchannel
  • Invite Useruser
  • List Membersmembers
  • Remove Useruser
  • Rename Channelchannel
  • Retrieve Channel Infochannel info
  • Unarchive Channelchannel

Prerequisites

A valid and active account in the Slack Workspace.

...

Add valid Slack Scopes based on the intended operation. See Required Slack Scopes below for details.

Required Slack Scopes

Any action you want to perform within a Slack Workspace, workspace additionally needs appropriate Scopes assigned to your app/account. See Scopes for more information  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
(user_scope)
  • Archive Channel
  • Create Channelchannel
  • Invite Useruser
  • Remove Useruser
  • Rename Channelchannel
Channelschannels:manage

Channelschannels:write

  • List Members members in a Channelchannel
  • Retrieve Channel Infochannel info
Channelschannels:readChannelschannels:read
  • Archive channel
  • Unarchive
Channel
  • channel
N/AChannelschannels:write

Support for Ultra Pipelines

...

Works in Ultra Pipelines

Limitations

  • 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.
  • Channel operations Archive Channel and Unarchive Channel cannot be performed using a Bot Token account. Use a User Token account instead.

Known Issues

None.

Snap Input and Output

Input/OutputType of ViewNumber of ViewsExamples of Upstream and Downstream SnapsDescription
Input 

Document

  • Min: 0
  • Max: 1
  • Mapper
  • Copy
  • JSON Generator
A document containing details required for a specific Channel the selected channel operation.
Output

Document

  • Min: 1
  • Max: 1
  • JSON Formatter
  • CSV Parser

A document containing the result (success/failure) of performing the selected Channel channel operation.

Snap Settings

Parameter NameData TypeDescriptionDefault ValueExample 
LabelString
Insert excerpt
File Writer
File Writer
nopaneltrue
Channel OperationsChannel Operations
OperationDrop-down list

Select an operation from the following list of permitted Channel channel operations . The number and list of fields required for the operation are displayed after you select an operation to perform.and specify the corresponding details needed:

  • List Members: . To retrieve the list of users that subscribed to a specific Channel. Also, select the Channel from the suggested list of Channelschannel. Requires Channel. 
  • Invite User: To associate/add. To invite a user from in the Workspace workspace to a specific channel. Requires Channel. Also, select a User from the suggested list of users. and Users. 
  • Remove User: To dissociate/delete . To remove a user from a specific Channel. Also, select a User from the suggested list of userschannel. Requires Channel and User
  • Channel Info: . To view the details of a specific Channelchannel, like such as its creation date, purpose, creator, topic, locale, and the current number of members in the Channel, and so on. Also, select the Channel from the suggested list of Channelschannel. Requires Channel.
  • Create Channel: . To create a new Channel channel in the Workspace. Also, enter the name for the new Channel in Name fieldworkspace. Requires Name and Private.
  • Rename Channel: . To rename an existing Channel channel in the Workspace. Also, select the Channel and enter the new name for the Channel in the New Name fieldworkspace. Requires Channel and New Name.
  • Archive Channel: . To archive an existing Channel. Also, select the Channel to archivechannel. Requires Channel.
  • Unarchive Channel: . To unarchive an archived Channel. Also select the archived Channel to unarchivechannel. Requires Channel.
List MembersInvite User
ChannelString/Expression/SuggestionConditional:

Required for all

Channel

channel operations except Create Channel.

Select a Channel

Click the Image Added icon and select a channel from the list of suggested

Channels

channels to perform the selected

Channel

channel operation

on

. Alternatively, you can enter the

Channel

channel name and/or

Channel

channel ID in one of the following formats.

#Channel
  • #channel.name:<11-character alphanumeric Channel ID>
OR
#Channel
  • #channel.
name OR
  • name
  • <11-character alphanumeric Channel ID>
N/A#testprivate:G019B3ETYMB
User/UsersString/Expression/SuggestionConditional:

Required for

Channel operations

channel operation - Invite User

, Remove User. Select a

.

Click the Image Added icon and select a user from the

suggested values which are typically the list

suggested list of users available in the

Workspace

workspace.

Alternatively

 Alternatively, you can enter one or

more usernames and/or user IDs, separated by commas, in one of the following formats.
  • @user.name:<11-character alphanumeric user ID> OR
  • @user.name OR
  • @<11-character alphanumeric user ID>
The specified set of users are invited to join or removed from the selected Channel accordingly

more user IDs separated by commas. The user IDs are in the 11-character alphanumeric format.

The specified users are invited to join the selected channel when you run the pipeline.

N/AW01A94P7MK1, W01A94P7MK2, W01A94P7MK3
UserString/Expression/Suggestion

Required for channel operation - Remove User.

Click the Image Added icon and select a user from the suggested list of users available in the workspace. Alternatively, you can enter the user ID in the 11-character alphanumeric format.

The specified user is removed from the selected channel when you run the pipeline.

N/A@user.name:W01A94P7MK1
NameString/ExpressionConditional:

Required for

Channel

channel operation - Create Channel.

Enter a name for the new

Channel

channel.

N/ASupport_Vertical
PrivateCheck box

Required for channel operation - Create Channel.

Select this check box to keep the new channel private – visible to only members/invitees.

Not selectedSelected
New NameString/Expression/SuggestionConditional:

Required for

Channel

channel operation - Rename Channel.

Enter the new name for the

Channel

channel.

N/AReleaseTeam_Channel
Snap ExecutionDrop-down list

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 generating preview data.
  • Disabled. Disables the Snap and all Snaps downstream from it.

Execute onlyValidate & Execute

Troubleshooting

Failure:
ErrorReasonResolution
Failure: Unable to rename the given Channelchannel. Reason: invalid_name_specialsYou have provided an invalid name for renaming the channel.

Ensure that the token and the inputs are valid, and try again; contact support team if the problem persists.

name provided for the channel is valid (does not contain invalid special characters).

Unable to kick user from Channel.Channelchannel. Reason: Channel_not_foundYou have specified an invalid channel to remove the user.Ensure that the token channel’s name is valid and the inputs are valid, and try again; contact support team if the problem persists.Failure: that the user is a member of the channel.
Unable to archive Channel.Channelchannel. Reason: Channel_not_foundYou have specified an invalid channel to archive.Ensure that the token and the inputs are valid, and try again; contact support team if the problem persists.Failure: channel exists in the workspace and is not archived already.
Unable to unarchive Channel.Channelchannel. Reason: Channel_not_foundYou have specified an invalid channel to unarchive.Ensure the token and the inputs are valid, and try again; contact support team if the problem persists.
Failure: Input error.No Channel providedSupply an existing Channel, and proceed

Examples

...

that the channel exists in the workspace and is archived already.
Input error. Reason: No Channel providedYou have not specified a channel to perform the selected channel operation.Ensure that you provide a channel in the Channel field and that it exists in this workspace.

Examples

Using Channel Operations Snap

This example uses a series of Pipelines to demonstrate the different operations that you can perform on channels using the Channel Operations Snap. All operations carried out in this example are for demonstration purposes only and these Pipelines do not reflect any actual/real-time scenario.

Image Added

  1. A Pipeline with two Channel Operations Snaps to create a channel and invite one or more users to it.
  2. A Pipeline with three Channel Operations Snaps to rename a channel and retrieve users and generic information about the channel.
  3. The Remove user Snap to remove the user from the channel

Example 1: Create a channel and Invite User to join

This pipeline uses two features of the Channel Operations Snap – Create Channel and Invite User. The first Channel Operations Snap is configured to create a channel with a unique name defined as an expression. It creates the channel and displays its details in the output view.

Channel Operations Snap (Create Channel)Output

Image Added

Image Added

The next Snap invites a user to the channel. It displays the result of the Invite User operation in the output view.

Channel Operations Snap (Invite User)Output

Image Added

Image Added

Example 2: Rename a channel and view its details and subscribers

This Pipeline uses three features of the Channel Operations Snap – Rename Channel, List Members and Channel Info

Channel Operations Snap (Rename Channel)Output

Image Added

Image Added

The first Channel Operations Snap is configured to rename the channel generic_edit to generic_edited (for example purposes only). You can see the updated details in the output view. The Snap also retrieves the previous 10 names that the channel was given. The next Channel Operations Snap is configured to retrieve the list of members in the channel. 

Channel Operations Snap (List Members)Output

Image Added

Image Added

Based on the channel specified, this Snap returns the list of all members in the channel. You can see the updated details in the output view. The Snap also returns the entire output from the previous Snap, for each member entry retrieved. The next Channel Operations Snap is configured to retrieve details of the channel.

Channel Operations Snap (Channel Info)

Image Added

Output

Image Added

Based on the channel selected in this Snap, it returns the details of the channel. You can see these details in the output view.

Example 3: Remove user from the channel

This Channel Operations Snap removes the specified user from the channel. It displays the result of the Remove User operation in the output view.

Channel Operations Snap (Remove User)Output

Image Added

Image Added

Downloads

Note
titleImportant 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.

...

Insert excerpt
Slack Snap Pack (Doc in Progress)
Slack Snap Pack (Doc in Progress)
nopaneltrue

...

See Also