Slack Slack: Channels

Summary

This module contains actions for viewing and selecting the channels that are available within your workspace.

Before you Start

Ensure you have created a PPA Slack app, & enabled the relevant slack app scopes.

See the Integration page for more information

Supplying Sensitive Data

You should always use a PPA Vault integration to provide sensitive data to a plugin action.

Actions

slack.channels.

display

Display channels in a table.

The table will have the following columns:

  • Name
  • Topic
  • Creator
  • ID

Minimum Plugin Version: 3.0.0

Input
  • text: the title of the table

  • channels: any number of Channels.

Output

Nothing is outputted by this action.

Example
1
2
3
4
5
6
7
8
9
- slack.channels.get_all:
  load:
    token: slack_bot_token
  save: all_channels

- slack.channels.display:
    text: All channels
  load:
    channels: all_channels

slack.channels.

get_all

Get all the private and public channels from your slack workspace.

Note

Your Slack app has to be added to a private channel for that channel to be visible.

Minimum Plugin Version: 2.0.1

Input
  • token: The slack app / bot user token
Output

A list of Channels.

Example
1
2
3
4
- slack.channels.get_all:
  load:
    token: slack_bot_token
  save: all_channels

slack.channels.

get_private

Get the private channels from your slack workspace.

Minimum Plugin Version: 2.0.1

Note

Your Slack app has to be added to a private channel for that channel to be visible.

Input
  • token: The slack app / bot user token
Output

A list of Channels.

Example
1
2
3
4
- slack.channels.get_private:
  load:
    token: slack_bot_token
  save: private_channels

slack.channels.

get_public

Get the public channels from your slack workspace.

Minimum Plugin Version: 2.0.1

Input
  • token: The slack app / bot user token
Output

A list of Channels.

Example
1
2
3
4
- slack.channels.get_public:
  load:
    token: slack_bot_token
  save: public_channels

slack.channels.

input_table

Display channels in a table, & allow the task operator to make a selection.

The table will have the following columns:

  • Name
  • Topic
  • Creator
  • ID

Deprecation Warning

This action will soon be deprecated in favour of select.

Input
  • text: the title of the table

  • channels: any number of Channels.

  • minimum: the minimum number of acceptable selections (Optional)

  • maximum: the maximum number of acceptable selections (Optional)

Output

A list of the selected Channels.

Tip
  • If neither a minimum or maximum is provided, the task operator will be able to submit 0 selections.
  • If minimum or maximum are provided, the operation will repeat until the task operator makes a valid number of selections.
Example
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
- slack.channels.get_all:
  load:
    token: slack_bot_token
  save: all_channels

- slack.channels.input_table:
    text: "Select a channel for approval request"
    maximum: 1
    minimum: 1
  load:
    channels: all_channels
  save:
    approval_channel

slack.channels.

output_table

Display channels in a table.

The table will have the following columns:

  • Name
  • Topic
  • Creator
  • ID

Deprecation Warning

This action will soon be deprecated in favour of display.

Input
  • text: the title of the table

  • channels: any number of Channels.

Output

Nothing is outputted by this action.

Example
1
2
3
4
5
6
7
8
9
- slack.channels.get_all:
  load:
    token: slack_bot_token
  save: all_channels

- slack.channels.output_table:
    text: All channels
  load:
    channels: all_channels

slack.channels.

select

Display channels in a table, & allow the task operator to make a selection.

The table will have the following columns:

  • Name
  • Topic
  • Creator
  • ID

Minimum Plugin Version: 3.0.0

Input
  • text: the title of the table

  • channels: any number of Channels

  • minimum: the minimum number of acceptable selections (Optional)

  • maximum: the maximum number of acceptable selections (Optional)

Output

A Selection containing:

Example
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
- slack.channels.get_all:
  load:
    token: slack_bot_token
  save: all_channels

- slack.channels.select:
    text: Select Channels
  load:
    channels: all_channels
  save: channel_selection

slack.channels.

select_one

Display channels in a table, & allow the task operator to make a selection.

The table will have the following columns:

  • Name
  • Topic
  • Creator
  • ID

Minimum Plugin Version: 3.0.0

Input
  • text: the title of the table

  • channels: any number of Channels.

Output

A single Channel.

Example
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
- slack.channels.get_all:
  load:
    token: slack_bot_token
  save: all_channels

- slack.channels.select_one:
    text: Select a Channel
  load:
    channels: all_channels
  save: one_channel