
Microsoft 365 TeamsIncomingWebhook
CertifiedSend message via Teams incoming webhook
Microsoft 365 TeamsIncomingWebhook
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.
type: io.kestra.plugin.microsoft365.teams.TeamsIncomingWebhookExamples
Send a Microsoft Teams notification on a failed flow execution
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.
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
url *Requiredstring
1Teams incoming webhook URL
options
HTTP client options
Optional timeouts, charset, headers, and limits for Teams webhook calls
io.kestra.plugin.microsoft365.teams.AbstractTeamsConnection-RequestOptions
The time allowed to establish a connection to the server before failing.
PT0SIdle pool timeout
Time an idle connection stays in the pool before closing
UTF-8Default charset
java.nio.charset.Charset
HTTP headers
HTTP headers to include in the request
10485760Max response size
Maximum response content length in bytes
PT5MThe time allowed for a read connection to remain idle before closing it.
PT10SThe maximum time allowed for reading data from the server before failing.
payload string
Teams message payload
Raw JSON payload for the webhook (Adaptive Card or MessageCard)
pluginDefaultsRef Non-dynamicstring
Reference (ref) of the pluginDefaults to apply to this task.