TeamsIncomingWebhook TeamsIncomingWebhook

yaml
type: "io.kestra.plugin.notifications.teams.TeamsIncomingWebhook"

Send a Microsoft Teams message using an incoming webhook.

Add this task to a list of errors tasks to implement custom flow-level failure noticiations. Check the Microsoft Teams documentation for more details.

Examples

Send a Microsoft Teams notification on a failed flow execution

yaml
id: unreliable_flow
namespace: company.team

tasks:
  - id: fail
    type: io.kestra.plugin.scripts.shell.Commands
    runner: PROCESS
    commands:
      - exit 1

errors:
  - id: alert_on_failure
    type: io.kestra.plugin.notifications.teams.TeamsIncomingWebhook
    url: "{{ secret('TEAMS_WEBHOOK') }}" # format: https://microsoft.webhook.office.com/webhook/xyz
    payload: |
      {
        "@type": "MessageCard",
        "@context": "http://schema.org/extensions",
        "themeColor": "0076D7",
        "summary": "Failure alert for flow {{ flow.namespace }}.{{ flow.id }} with ID {{ execution.id }}",
        "sections": [{
        "activityTitle": "Kestra Workflow Notification",
        "activitySubtitle": "Workflow Execution Finished With Errors",
        "markdown": true
        }],
        "potentialAction": [
          {
            "@type": "OpenUri",
            "name": "Kestra Workflow",
            "targets": [
            {
            "os": "default",
            "uri": "{{ vars.systemUrl }}"
            }
            ]
          }
        ]
      }

Send a Microsoft Teams notification message

yaml
id: "teams_incoming_webhook"
type: "io.kestra.plugin.notifications.teams.TeamsIncomingWebhook"
url: "https://microsoft.webhook.office.com/webhookb2/XXXXXXXXXX"
payload: |
  {
    "@type": "MessageCard",
    "@context": "http://schema.org/extensions",
    "themeColor": "0076D7",
    "summary": "Notification message",
    "sections": [{
      "activityTitle": "Rolling Workflow started",
      "activitySubtitle": "Workflow Notification",
      "markdown": true
    }],
    "potentialAction": [
      {
        "@type": "OpenUri",
        "name": "Rolling Workflow",
        "targets": [
          {
           "os": "default",
           "uri": "{{ vars.systemUrl }}"
          }
        ]
      }
    ]
  }

Properties

url

  • Type: string
  • Dynamic: ✔️
  • Required: ✔️
  • Min length: 1

Microsoft Teams incoming webhook URL

payload

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

Microsoft Teams message payload

Outputs

Definitions

Was this page helpful?