Microsoft Teams TeamsIncomingWebhook

Microsoft Teams TeamsIncomingWebhook

Certified

Send message via Teams incoming webhook

Posts a JSON payload to a Microsoft Teams Incoming Webhook; ideal for errors notifications. No Graph permission required, only the webhook URL.

yaml
type: io.kestra.plugin.microsoft365.teams.TeamsIncomingWebhook

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.microsoft365.teams.TeamsIncomingWebhook
    url: "{{ secret('TEAMS_WEBHOOK') }}" # format: https://microsoft.webhook.office.com/webhook/xyz
    payload: |
        {
          "type": "message",
          "attachments": [
            {
              "contentType": "application/vnd.microsoft.card.adaptive",
              "content": {
                "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
                "type": "AdaptiveCard",
                "version": "1.4",
                "body": [
                  {
                    "type": "TextBlock",
                    "size": "Large",
                    "weight": "Bolder",
                    "text": "Kestra Execution Notification"
                  },
                  {
                    "type": "TextBlock",
                    "text": "Execution ID: `{{ execution.id }}`",
                    "wrap": true
                  },
                  {
                    "type": "TextBlock",
                    "text": "Flow: `{{ flow.id }}` in namespace `{{ flow.namespace }}`",
                    "wrap": true
                  },
                  {
                    "type": "TextBlock",
                    "text": "Status: **{{ execution.state }}**",
                    "wrap": true
                  }
                ],
                "actions": [
                  {
                    "type": "Action.OpenUrl",
                    "title": "View Execution",
                    "url": "{{ kestra.url }}/ui/executions/{{ flow.namespace }}/{{ flow.id }}/{{ execution.id }}"
                  }
                ]
              }
            }
        ]
        }

Send a Microsoft Teams notification message.

yaml
id: send_notification
namespace: company.team

tasks:
  - id: send_teams_notification
    type: io.kestra.plugin.microsoft365.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
Min length1

Teams incoming webhook URL

Assets this task consumes as inputs or produces as outputs, for lineage tracking and the asset graph (Enterprise Edition). A flow declaring this property on a task is rejected in the open-source edition.

Definitions
assetFailureBehaviorstring
Possible Values
IGNOREFAILWARN

Asset failure behavior

Behavior applied to the task state when a declared asset fails to render, emit, or be persisted (e.g. a lock conflict): FAIL escalates it to FAILED, WARN (default) warns it if it would otherwise succeed, IGNORE leaves the state untouched.

enableAutobooleanstring

Whether to auto-register assets referenced dynamically at runtime that are not statically declared in inputs or outputs.

inputsarray

The assets consumed as inputs.

id*string
Min length1
typestring
outputs

The assets produced as outputs.

id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*string
Min length1

Custom asset type

descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150

HTTP client options

Optional timeouts, charset, and headers for Teams webhook calls

Definitions
connectTimeoutstring

The time allowed to establish a connection to the server before failing.

connectionPoolIdleTimeoutstring
DefaultPT0S

Idle pool timeout

Deprecated, this option has no effect: Kestra's HTTP client does not support a connection pool idle timeout.

defaultCharsetstring
DefaultUTF-8

Default charset

headersobject

HTTP headers

HTTP headers to include in the request

maxContentLengthintegerstring
Default10485760

Max response size

Deprecated, this option has no effect: Kestra's HTTP client does not limit the response size.

readIdleTimeoutstring
DefaultPT5M

The time allowed for a read connection to remain idle before closing it.

readTimeoutstring
DefaultPT10S

The maximum time allowed for reading data from the server before failing.

Deprecated, this option has no effect: Kestra's HTTP client has no separate read timeout. Use readIdleTimeout instead.

Teams message payload

Raw JSON payload for the webhook (Adaptive Card or MessageCard)