Slack: Messages
Summary
This module contains actions for sending messages & approval requests to a Slack channel.
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.messages.
send_approval_request
Send an approval request to a Slack channel.
This action only sends the request to a channel, it does not activate the request.
The example below shows the PPA plugin, this action, & send_approval_response used together.
An example screenshot of the Slack message can be found under the example.
Slack Channel
The message will be sent to the channel supplied to the action.
Minimum Plugin Version: 6.0.0
Minimum PPA Version: 3.3.0
Input
-
token: The slack app / bot user token
-
channel: A Channels dictionary
-
assignees: a list of usernames responsible for responding to the request
-
approval_request: An ApprovalRequest created by create_approval_request
Output
Nothing is outputted by this action.
Example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
|
Approval Request Screenshot
slack.messages.
send_approval_response
Send the response to an approval request to a Slack channel.
The example below shows the PPA plugin, send_approval_request, & this action used together.
An example screenshot of the Slack messages can be found under the example.
Slack Channel
The message will be sent to the channel supplied to the action.
Minimum Plugin Version: 6.0.0
Input
-
token: The slack app / bot user token
-
channel: A Channels dictionary
-
approval_repsonse: An ApprovalResponse created by wait_approval_response
Output
Nothing is outputted by this action.
Example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
|
Approved Message Screenshot
Rejected Message Screenshot
slack.messages.
send_file
Send a file to a Slack channel.
File Considerations
Minimum Plugin Version: 2.0.1
Input
Output
Nothing is outputted by this action.
Example
-
Save a file to the PPA workspace
-
Send the file to a selected slack channel
1 2 3 4 5 6 7 8 9 10 11 |
|
slack.messages.
send_message
Send a message to a Slack channel.
Slack Channel & Rich Messages
View the Slack block kit builder here for more information on creating rich messages.
Minimum Plugin Version: 2.0.1
Input
Output
Nothing is outputted by this action.
Simple Message
1 2 3 4 5 |
|
Markdown Message
1 2 3 4 5 6 7 8 9 10 |
|