DiscordIncomingWebhook
yaml
type: "io.kestra.plugin.notifications.discord.discordincomingwebhook"
Examples
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.discord.DiscordIncomingWebhook
url: "{{ secret('DISCORD_WEBHOOK') }}" # https://discord.com/api/webhooks/000000/xxxxxxxxxxx
payload: |
{
"username": "MyUsername",
"content": "Failure alert for flow {{ flow.namespace }}.{{ flow.id }} with ID {{ execution.id }}",
"embedList": [{
"title": "Discord Notification"
}]
}
yaml
id: discord_incoming_webhook
namespace: company.team
tasks:
- id: send_discord_message
type: io.kestra.plugin.notifications.discord.DiscordIncomingWebhook
url: "{{ secret('DISCORD_WEBHOOK') }}"
payload: |
{
"username": "MyUsername",
"tts": false,
"content": "Hello from the workflow {{ flow.id }}",
"embeds": [
{
"title": "Hello from Kestra",
"color": 16777215,
"description": "This is a test message from Kestra",
"footer": {
"text": "Footer text"
}
}
]
}
Properties
Definitions
java.nio.charset.Charset
io.kestra.plugin.notifications.AbstractHttpOptionsTask-RequestOptions
connectTimeout string
Format
duration
connectionPoolIdleTimeout string
Default
PT0S
Format
duration
defaultCharset Charsetstring
Default
UTF-8
headers object
SubType string
maxContentLength integerstring
Default
10485760
readIdleTimeout string
Default
PT5M
Format
duration
readTimeout string
Default
PT10S
Format
duration