SlackExecution SlackExecution

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

Task to send a slack message with execution information

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

# Examples

Send a slack notification on failed flow

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: {{ execution.id }}

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:

Render map to use for template

# templateUri

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

Template to use

# url

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

Slack incoming webhook url

See Create an Incoming Webhook

# username

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

Author of the slack message