Versions Compared

Key

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

In this article

...

Use this Snap to perform the following Channel operations in your Slack Workspaceworkspace:

  • 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 Workspaceworkspace.

Slack Scopes required

Any action you want to perform within a Slack Workspaceworkspace, 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
(scope)

User Token Accounts
(user_scope)
  • Archive Channelchannel
  • 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

Unarchive Channelchannel

N/AChannelschannels:write

Support for Ultra Pipelines

...

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. Also, select a User from the suggested list of userschannel. Requires Channel 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.
  • 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/Suggestion

Conditional: Required for all Channel channel operations except Create Channel.

Select a Channel 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
  • <11-character alphanumeric Channel ID>
N/A#testprivate:G019B3ETYMB
User/UsersString/Expression/Suggestion

Conditional: Required for Channel operations channel operation - Invite User, Remove User.

Select a user from the suggested values which are typically the list of users available in the Workspaceworkspace. 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 accordinglychannel.

N/A@user.name:W01A94P7MK1 @user.name:W01A94P7MK1
UserString/Expression/Suggestion

Required for channel operation - Remove User.

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:

  • @user.name:<11-character alphanumeric user ID> OR
  • @user.name OR
  • @<11-character alphanumeric user ID>

The specified user is removed from the selected channel.



NameString/ExpressionConditional:

Required for

Channel

channel operation - Create Channel.

Enter a name for the new

Channel

channel.

N/ASupport_Vertical
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 the token and the inputs are valid, and try again; contact support team if the problem persists.Failure: Unable to archive Channel.Channelthat the user to be removed currently exists in the channel members list.
Unable to archive channel. 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 that 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 proceedchannel 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

<Example under revision>

...