Slack action

The Slack action type uses Slack Incoming Webhooks.

Connector configuration

Slack connectors have the following configuration properties:

Name

The name of the connector. The name is used to identify a connector in the management UI connector listing, or in the connector list when configuring an action.

Webhook URL

The URL of the incoming webhook. See Slack Incoming Webhooks for instructions on generating this URL. If you are using the xpack.actions.whitelistedHosts setting, make sure the hostname is whitelisted.

Preconfigured action type

  1. my-slack:
  2. name: preconfigured-slack-action-type
  3. actionTypeId: .slack
  4. config:
  5. webhookUrl: 'https://hooks.slack.com/services/abcd/efgh/ijklmnopqrstuvwxyz'

config defines the action type specific to the configuration. config contains webhookUrl, a string that corresponds to Webhook URL.

Action configuration

Slack actions have the following properties:

Message

The message text, converted to the text field in the Webhook JSON payload. Currently only the text field is supported. Markdown, images, and other advanced formatting are not yet supported.

Configuring Slack Accounts

You configure the accounts Slack action type can use to communicate with Slack in the connector form.

You need a Slack webhook URL to configure a Slack account. To create a webhook URL, set up an an Incoming Webhook Integration through the Slack console:

  1. Log in to slack.com as a team administrator.
  2. Go to https://my.slack.com/services/new/incoming-webhook.
  3. Select a default channel for the integration.

    slack add webhook integration

  4. Click Add Incoming Webhook Integration.

  5. Copy the generated webhook URL so you can paste it into your Slack connector form.

    slack copy webhook url

Most Popular