Slack

Post messages to Slack

Component key: slack

Description#

This component allows you to post messages to a Slack channel using a Slack incoming webhook.

Generate a webhook URL#

In order to use the Slack component, you will need to generate a webhook URL:

  1. Navigate to https://api.slack.com/apps
  2. Click Create New App, adding an app to your workspace.
  3. Under Add features and functionality select Incoming Webhooks
  4. Activate Incoming Webhooks and then Add New Webhook to Workspace
  5. Take note of the Webhook URL. It should be of the form https://hooks.slack.com/services/foo/bar/baz

Actions#

Slack Message#

Post a message to a Slack channel | key: postSlackMessage

InputKeyNotesExample

Message

string
/ Required
messageThe message to send the Slack channel.Hello from Prismatic!

Webhook URL

string
/ Required
webhookUrlThe Slack webhook URL. Instructions for generating a Slack webhook are available on the Slack component docs page.https://hooks.slack.com/services/A/B/C

Output Example Payload#

{
"data": {
"text": "ok"
}
}