SlackExecution SlackExecution

yaml
type: "io.kestra.plugin.notifications.slack.SlackExecution"

Task to send a Slack message with the execution informations

Main execution informations are provided in the sent message (id, namespace, flow, state, duration, start date ...).

Examples

Send a slack notification on failed flow

yaml
id: mail
namespace: io.kestra.tests

listeners:
  - conditions:
      - type: io.kestra.core.models.conditions.types.ExecutionStatusCondition
        in:
          - FAILED
    tasks:
      - id: slack
        type: io.kestra.plugin.notifications.slack.SlackExecution
        url: "https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX"
        channel: "#random"


tasks:
  - id: ok
    type: io.kestra.core.tasks.debugs.Return
    format: "{{task.id}} > {{taskrun.startDate}}"

Properties

channel

  • Type: string
  • Dynamic: ✔️
  • Required:

Slack channel to send the message to

customFields

  • Type: object
  • Dynamic: ✔️
  • Required:

Custom fields to be added on notification

customMessage

  • Type: string
  • Dynamic: ✔️
  • Required:

Custom message to be added on notification

executionId

  • Type: string
  • Dynamic: ✔️
  • Required:
  • Default: null

The execution id to use

Default is the current execution

iconEmoji

  • Type: string
  • Dynamic: ✔️
  • Required:

Emoji icon to use

iconUrl

  • Type: string
  • Dynamic: ✔️
  • Required:

Url of the icon to use

payload

  • Type: string
  • Dynamic: ✔️
  • Required:

Slack message payload

templateRenderMap

  • Type: object
  • Dynamic: ✔️
  • Required:

Map of variables to use for the message template

url

  • Type: string
  • Dynamic: ✔️
  • Required:

Slack incoming webhook URL

See Create an Incoming Webhook

username

  • Type: string
  • Dynamic: ✔️
  • Required:

Author of the slack message