
XExecution
Send an X (Twitter) post with execution information.
Send an X (Twitter) post with execution information.
Send an X (Twitter) post with execution information.
Send execution details via X (Twitter) including execution link, ID, namespace, flow name, start date, duration, and status.
type: "io.kestra.plugin.notifications.x.XExecution"Examples
Send an X notification on a failed flow execution using Bearer Token.
id: failure_alert_x
namespace: company.team
tasks:
- id: send_x_alert
type: io.kestra.plugin.notifications.x.XExecution
bearerToken: "{{ secret('X_BEARER_TOKEN') }}"
executionId: "{{ trigger.executionId }}"
customMessage: "Production workflow failed - immediate attention required!"
customFields:
Environment: "Production"
Team: "DevOps"
Priority: "High"
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
Send an X notification using OAuth 1.0a credentials.
id: success_alert_x
namespace: company.team
tasks:
- id: send_x_success
type: io.kestra.plugin.notifications.x.XExecution
consumerKey: "{{ secret('X_CONSUMER_KEY') }}"
consumerSecret: "{{ secret('X_CONSUMER_SECRET') }}"
accessToken: "{{ secret('X_ACCESS_TOKEN') }}"
accessSecret: "{{ secret('X_ACCESS_SECRET') }}"
executionId: "{{ trigger.executionId }}"
customMessage: "Deployment completed successfully!"
triggers:
- id: successful_deployments
type: io.kestra.plugin.core.trigger.Flow
conditions:
- type: io.kestra.plugin.core.condition.ExecutionStatus
in:
- SUCCESS
Properties
accessSecretstring
OAuth Access Secret
X API OAuth 1.0a Access Token Secret. Required if bearerToken is not provided.
accessTokenstring
OAuth Access Token
X API OAuth 1.0a Access Token. Required if bearerToken is not provided.
bearerTokenstring
Bearer Token
X API Bearer Token for authentication. If provided, OAuth 1.0a credentials are not required.
consumerKeystring
OAuth Consumer Key
X API OAuth 1.0a Consumer Key (API Key). Required if bearerToken is not provided.
consumerSecretstring
OAuth Consumer Secret
X API OAuth 1.0a Consumer Secret (API Secret). Required if bearerToken is not provided.
customFieldsobject
Custom fields to be added in the notification
customMessagestring
Custom message to be added in the notification
executionIdstring
{{ execution.id }}The execution ID to use
Default is the current execution, change it to if you use this task with a Flow trigger to use the original execution.
options
Options
The options to set to customize the HTTP client
io.kestra.plugin.notifications.AbstractHttpOptionsTask-RequestOptions
durationThe time allowed to establish a connection to the server before failing.
PT0SdurationThe time an idle connection can remain in the client's connection pool before being closed.
UTF-8The default charset for the request.
java.nio.charset.Charset
HTTP headers
HTTP headers to include in the request
10485760The maximum content length of the response.
PT5MdurationThe time allowed for a read connection to remain idle before closing it.
PT10SdurationThe maximum time allowed for reading data from the server before failing.
templateRenderMapobject
Map of variables to use for the message template
textBodystring
Post text body
Direct post text (bypasses template)
urlstring
https://api.x.com/2/tweetsOverride URL for testing
Optional URL to override the default X API endpoint (for testing purposes)