Microsoft 365 TeamsExecution

Microsoft 365 TeamsExecution

Certified

Send Teams notification with execution details

Renders a template with execution metadata (ID, namespace, flow, start time, duration, status, failing task) and posts via Teams webhook. Use with Flow triggers; for errors handlers prefer TeamsIncomingWebhook. No Graph permission required.

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

Send a Microsoft Teams notification on a failed flow execution.

yaml
id: failure_alert
namespace: company.team

tasks:
  - id: send_alert
    type: io.kestra.plugin.microsoft365.teams.TeamsExecution
    url: "{{ secret('TEAMS_WEBHOOK') }}" # format: https://microsoft.webhook.office.com/webhook/xyz
    activityTitle: "Kestra Teams notification"
    executionId: "{{ trigger.executionId }}"

triggers:
  - id: failed_prod_workflows
    type: io.kestra.plugin.core.trigger.Flow
    conditions:
      - type: io.kestra.plugin.core.condition.ExecutionStatus
        in:
          - FAILED
          - WARNING
      - type: io.kestra.plugin.core.condition.ExecutionNamespace
        namespace: prod
        prefix: true
Properties
Min length1

Teams incoming webhook URL

Activity subtitle

Activity title

Custom fields to be added on notification

Custom message to be added on notification

Default{{ execution.id }}

The execution id to use

Default is the current execution, change it to {{ trigger.executionId }} if you use this task with a Flow trigger to use the original execution.

HTTP client options

Optional timeouts, charset, headers, and limits for Teams webhook calls

Definitions
connectTimeoutstring

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

connectionPoolIdleTimeoutstring
DefaultPT0S

Idle pool timeout

Time an idle connection stays in the pool before closing

defaultCharsetstring
DefaultUTF-8

Default charset

headersobject

HTTP headers

HTTP headers to include in the request

maxContentLengthintegerstring
Default10485760

Max response size

Maximum response content length in bytes

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.

Teams message payload

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

Reference (ref) of the pluginDefaults to apply to this task.

Template variables

Key-value map rendered into the template before sending

Default0076D7

Theme color