Slack
App Vendor: Slack
App Category: Messaging
Connector Version: 2.2.2
API Version: 2.0.0
About App
Slack is the collaboration hub that brings the right people, information, and tools together to get work done. It allows you to collaborate, make decisions and move work forward with a common purpose.
The Slack app allows you to fetch channel information or send messages to a channel or to a user from the Orchestrate platform.
The Slack app is configured with the Orchestrate application to perform the following actions:
Action Name | Description |
---|---|
List Details of all Channels | This action retrieves details of the specified channel. |
Get Details of all Users | This action retrieves information of all users on your Slack workspace. |
Send Messages to a Channel | This action sends messages to the specified channel. |
Send Messages to a User | This action sends messages to the specified user. |
Send Attachment to a User | This action sends an attachment to a user based on the specified Email address. |
Send Attachment to a Channel | This action sends an attachment to a channel based on the specified channel ID. |
Create a Channel | This action creates a channel. |
Invite Users to Channel | This action adds a list of users to a channel. |
Configuration Parameters
The following configuration parameters are required for the Slack app to communicate with the Slack enterprise application. The parameters can be configured by creating instances in the app.
Parameter | Description | Field Type | Required/Optional | Comments |
---|---|---|---|---|
Slack Token | Enter your Slack Access Token. The token should have the following rights:
| Password | Required |
Action: List Details of all Channels
This action retrieves information of all channels on your Slack workspace.
Action Input Parameters
Parameter | Description | Field Type | Required/Optional | Comments |
Limit | Enter the maximum number of results you want to retrieve. Example: 10 | Integer | Optional | Default value: 200 |
Page Cursor | Enter the value from which you want to retrieve results. Example: "unique_id_5" | Text | Optional | This parameter is used in conjunction with the Limit parameter for pagination. When no input is passed, the API retrieves the first set of results. |
Team ID | Enter the encoded team ID to list channels. Example: "T1234567890" | Text | Optional | |
Types | Enter the channel type. | Text | Optional | Mix and match channel types by providing a comma-separated list of any combination of the following.
|
Exclude Archived | Enter your preference to exclude archived channels from the list. Example: Yes | Boolean | Optional | Default value: No |
Example Request
[ { "limit": 5, "cursor": "unique_id_5" } ]
Action Response Parameters
Parameter | Field Type | Description |
---|---|---|
| JSON Object | This parameter indicates the ID of the app instance configured in Orchestrate from which the response is retrieved. |
| JSON Object | Includes the response received from the app action. |
| Boolean | Indicates if the response is successful |
| Array of JSON Objects | List of channels |
| String | The unique identifier for the channel |
| String | The name of the channel |
| Boolean | Indicates if the object is a channel |
| Boolean | Indicates if the object is a group |
| Boolean | Indicates if the object is an instant message |
| Integer | Timestamp for when the channel was created |
| String | User ID of the channel creator |
| Boolean | Indicates if the channel is archived |
| Boolean | Indicates if the channel is the general channel |
| Integer | Number of times the channel has been unlinked |
| String | Normalized name of the channel |
| Boolean | Indicates if the channel is shared |
| Boolean | Indicates if the channel is externally shared |
| Boolean | Indicates if the channel is shared across the organization |
| Array | List of pending shared channels |
| Boolean | Indicates if the channel is pending external sharing |
| Boolean | Indicates if the user is a member of the channel |
| Boolean | Indicates if the channel is private |
| Boolean | Indicates if the channel is a multi-party instant message |
| Integer | Timestamp for when the channel was last updated |
| String | The value of the channel topic |
| String | User ID of the topic creator |
| Integer | Timestamp for when the topic was last set |
| String | The value of the channel purpose |
| String | User ID of the purpose creator |
| Integer | Timestamp for when the purpose was last set |
| Array | List of previous names of the channel |
| Integer | Number of members in the channel |
Action: Send Messages to a Channel
This action sends messages to the specified channel.
Action Input Parameters
Parameter | Description | Field Type | Required/Optional | Comments |
---|---|---|---|---|
Channel Name | Enter the channel name to which the message should be sent. Example: "test_channel" | Text | Required | |
Slack Message | Enter the message to be sent. Example: "Test message" | Text | Required | |
Parent Message Timestamp | Enter the parent message timestamp in epoch time format. Use this parameter when replying to a message in a thread. Example: "1403051575.000407" | Text | Optional | |
Username | Enter the username with which the message should be sent. Example: "Test User" | Text | Optional | Default value: cybot |
Example Request
[ { "slack_channel_name": "test_channel", "slack_message": "Test message", "thread_ts": "1403051575.000407", "username": "Test User" } ]
Action Response Parameters
Parameter | Field Type | Description |
---|---|---|
| JSON Object | This parameter indicates the ID of the app instance configured in Orchestrate from which the response is retrieved. |
| JSON Object | Includes the details of the response retrieved from the action. |
| String | ID of the Slack channel to which the message is sent. |
| JSON Object | Includes the details of the message sent to the channel. The details include the app_id, blocks, bot_id, bot_profile, team, text, ts, type, and user. |
| Boolean | Returns true if the message is sent successfully. |
| JSON Object | Returns the response metadata received from Slack, such as a warning. |
| String | The ID of the message sent. |
| String | The warning message, if any. |
| Integer | HTTP status code of the API request. |
Action: Send Messages to a User
This action sends messages to the specified user.
Action Input Parameters
Parameter | Description | Field Type | Required/Optional | Comments |
---|---|---|---|---|
User Email | Enter the email address of the user you want to message. Example: "test.user.01@example.com" | Text | Required | |
Slack Message | Enter the message to be sent. Example: "Test message" | Text | Required | |
Username | Enter the username with which the message should be sent. Example: "Test User" | Text | Optional | Default value: cybot |
Example Request
[ { "slack_email": "test.user.01@example.com", "slack_message": "Test message", "username": "Test User" } ]
Action Response Parameters
Parameter | Field Type | Description |
---|---|---|
| JSON Object | This parameter indicates the ID of the app instance configured in Orchestrate from which the response is retrieved. |
| JSON Object | Includes the details of the response retrieved from the action. |
| String | ID of the Slack channel. |
| JSON Object | Includes the details of the message sent to the channel. The details include the app_id, blocks, bot_id, bot_profile, team, text, ts, type, and user. |
| Boolean | Returns true if the message is sent successfully. |
| JSON Object | Returns the response metadata received from Slack, such as a warning. |
| String | The ID of the message sent. |
| Integer | HTTP status code of the API request. |
Action: Get Details of all Users
This action retrieves information of all users on your Slack workspace.
Action Input Parameter
Parameter | Description | Field Type | Required/Optional | Comments |
Limit | Enter the maximum number of results you want to retrieve. Example: 10 | Integer | Optional | Default: 200 |
Page Cursor | Enter the value from which you want to retrieve results. Use this in conjunction with the Limit parameter for pagination. When no input is passed, the API retrieves the first set of results. Example: "unique_id_5" | Text | Optional |
Example
[ { "limit": 5, "cursor": "unique_id_5" } ]
Action Response Parameters
Parameter | Field Type | Description |
---|---|---|
| JSON Object | This parameter indicates the ID of the app instance configured in Orchestrate from which the response is retrieved. |
| JSON Object | Includes the response received from the app action. |
| Boolean | Indicates if the response is successful |
| Array of JSON Objects | List of members |
| String | Identifier for this workspace user. It is unique to the workspace containing the user. Use this field together with |
| String | The ID of the team to which the member belongs |
| String | Don't use this. It once indicated the preferred username for a user, but that behavior has fundamentally changed since. |
| Boolean | Indicates if the member's account is deleted |
| String | Used in some clients to display a special username color. |
| String | Real name of the member |
| String | A human-readable string for the geographic timezone-related region this user has specified in their account. |
| String | Describes the commonly used name of the |
| Integer | Indicates the number of seconds to offset UTC time by for this user's |
| Object | Profile information of the member |
| String | Hash of the member's avatar |
| String | The displayed text of up to 100 characters. We strongly encourage brevity. |
| String | The displayed emoji that is enabled for the Slack team, such as |
| String | The user's first and last name. Updating this field will update |
| String | The display name the user has chosen to identify themselves by in their workspace profile. Do not use this field as a unique identifier for a user, as it may change at any time. Instead, use |
| String | The |
| String | The |
| String | A valid email address. It cannot have spaces, and it must have an |
| String | URL of the member's 24x24 image |
| String | URL of the member's 32x32 image |
| String | URL of the member's 48x48 image |
| String | URL of the member's 72x72 image |
| String | URL of the member's 192x192 image |
| String | URL of the member's 512x512 image |
| String | The ID of the team the user is on. |
| Boolean | Indicates whether the user is an Admin of the current workspace. |
| Boolean | Indicates whether the user is an Owner of the current workspace. |
| Boolean | Indicates whether the user is the Primary Owner of the current workspace. |
| Boolean | Indicates whether or not the user is a guest user. Use in combination with the |
| Boolean | Indicates whether or not the user is a single-channel guest. |
| Boolean | Indicates whether the user is actually a bot user. Bleep bloop. Note that Slackbot is special, so |
| Integer | Timestamp for when the member's information was last updated |
| Boolean | Indicates whether the user is an authorized user of the calling app. |
| Boolean | Describes whether two-factor authentication is enabled for this user. Only visible if the user executing the call is an admin. |
Action: Send Attachment to a Channel
This action sends an attachment to the channel based on the specified Channel ID.
Action Input Parameters
Parameter | Description | Field Type | Required/Optional | Comments |
---|---|---|---|---|
Channel ID | Enter the channel ID to which you would like to send attachment. Example: "C02NEQPKAUF" | Text | Required | |
Message | Enter the message to send along with the attachment. | Text | Required | |
File Name | Enter the name of the file to download. Example: "sample.txt" | Text | Required | |
File Path | Enter the file path. Example: "/tmp/testfilepath/test.txt" | Text | Required | |
Title | Enter the title to display (in the download progress bar) when this object downloads. | Text | Optional | Default value:<file_name> |
Example Request
[ { "file_name": "Sample.txt", "file_path": "/tmp/ba32d856-5b54-4239-9092-f3c3d5ac4880/SLACKTESTFILE.txt", "channel_id": "C02NEQPKAUF", "slack_message": "Test" } ]
Action: Send Attachment to a User
This action sends an attachment to the user based on the specified Email address.
Action Input Parameters
Parameter | Description | Field Type | Required/Optional | Comments |
---|---|---|---|---|
Email Address of User to Send | Enter the Email address of the user to send the attachment. Example: "testuser@sampledomain.com" | Text | Required | |
Message | Enter the message to send with the attachment. Example: "Example Message" | Text | Required | |
File Name | Enter the name of the file to download. Example: "sample.txt" | Text | Required | |
Title | Enter the title to display (in the download progress bar) when this object downloads. | Text | Optional | Default value:<file_name> |
File Path | Enter the file path. Example: "/tmp/ba32d856-f3c3d5ac4880/SLACKTESTFILE.txt" | Text | Required |
Example Request
[ { "file_name": "sample.txt", "file_path": "/tmp/ba32d856-f3c3d5ac4880/SLACKTESTFILE.txt", "slack_email": "testuser@sampledomain.com", "slack_message": "Example Message" } ]
Action: Create a Channel
This action creates a channel.
Action Input Parameters
Parameter | Description | Field Type | Required/Optional | Comments |
Name of Channel | Enter the channel name to create a channel. Example: "cyware-autogen-channel-4" | Text | Required | The channel name must not contain any upper case characters or spaces. |
Example Request
[ { "name_of_channel": "cyware-autogen-channel-4" } ]
Action Response Parameters
Parameter | Field Type | Description |
---|---|---|
| JSON Object | This parameter indicates the ID of the app instance configured in Orchestrate from which the response is retrieved. |
| JSON Object | Includes the response received from the app action. |
| Boolean | Indicates if the response is successful |
| String | The unique identifier for the channel |
| String | The name of the channel |
| Boolean | Indicates if the object is a channel |
| Boolean | Indicates if the object is a group |
| Boolean | Indicates if the object is an instant message |
| Integer | Timestamp for when the channel was created |
| String | User ID of the channel creator |
| Boolean | Indicates if the channel is archived |
| Boolean | Indicates if the channel is the general channel |
| Integer | Number of times the channel has been unlinked |
| String | Normalized name of the channel |
| Boolean | Indicates if the channel is shared |
| Boolean | Indicates if the channel is externally shared |
| Boolean | Indicates if the channel is shared across the organization |
| Array | List of pending shared channels |
| Boolean | Indicates if the channel is pending external sharing |
| Boolean | Indicates if the user is a member of the channel |
| Boolean | Indicates if the channel is private |
| Boolean | Indicates if the channel is a multi-party instant message |
| String | Timestamp of the last read message in the channel |
| Null | The latest message in the channel (null if none) |
| Integer | Number of unread messages in the channel |
| Integer | Number of unread messages displayed |
| String | The value of the channel topic |
| String | User ID of the topic creator |
| Integer | Timestamp for when the topic was last set |
| String | The value of the channel purpose |
| String | User ID of the purpose creator |
| Integer | Timestamp for when the purpose was last set |
| Array | List of previous names of the channel |
| Integer | The priority of the channel |
Action: Invite Users to Channel
This action adds a list of users to a channel.
Action Input Parameters
Parameter | Description | Field Type | Required/Optional | Comments |
Name of Channel | Enter the channel name to add users. Example: "cyware-autogen-channel-4", | Text | Required | |
List of User Emails | Enter the list of user emails to add to the channel. Example: $LIST[sampleuser@cyware.com] | List | Required | The user emails must belong to the workspace |
Example Request
[ { "channel_name":"cyware-autogen-channel-4", "list_of_user_emails":[ "sampleuser@cyware.com" ] } ]
Action Response Parameters
Parameter | Field Type | Description |
---|---|---|
| JSON Object | This parameter indicates the ID of the app instance configured in Orchestrate from which the response is retrieved. |
| JSON Object | Includes the response received from the app action. |
| Boolean | Indicates if the response is successful |
| Object | Details of the channel to which the user was invited |
| String | The unique identifier for the channel |
| String | Indicates the name of the channel-like thing, without a leading hash sign. Don't get too attached to that name. It might change. Don't even bother storing it. When thinking about channel-like things, think about their IDs, their type, and the team/workspace they belong to. |
| Boolean | Indicates if the object is a channel |
| Boolean | Indicates if the object is a group |
| Boolean | Indicates if the object is an instant message |
| Integer | Timestamp for when the channel was created |
| String | User ID of the channel creator |
| Boolean | Indicates if the channel is archived |
| Boolean |
|
| Integer | Number of times the channel has been unlinked |
| String | Normalized name of the channel |
| Boolean | Indicates if the channel is read-only |
| Boolean | Indicates if the channel is shared |
| Boolean | Indicates if the channel is externally shared |
| Boolean | Indicates if the channel is shared across the organization |
| Array | List of pending shared channels |
| Boolean | Indicates if the channel is pending external sharing |
| Boolean | Indicates if the user is a member of the channel |
| Boolean | Indicates if the channel is private |
| Boolean | Indicates if the channel is a multi-party instant message |
| String | Timestamp of the last read message |
| Object | Details of the channel's topic |
| String | The value of the channel topic |
| String | User ID of the topic creator |
| Integer | Timestamp for when the topic was last set |
| Object | Details of the channel's purpose |
| String | The value of the channel purpose |
| String | User ID of the purpose creator |
| Integer | Timestamp for when the purpose was last set |
| Array | List of previous names of the channel |