XExecution
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
accessSecret string
OAuth Access Secret
X API OAuth 1.0a Access Token Secret. Required if bearerToken is not provided.
accessToken string
OAuth Access Token
X API OAuth 1.0a Access Token. Required if bearerToken is not provided.
bearerToken string
Bearer Token
X API Bearer Token for authentication. If provided, OAuth 1.0a credentials are not required.
consumerKey string
OAuth Consumer Key
X API OAuth 1.0a Consumer Key (API Key). Required if bearerToken is not provided.
consumerSecret string
OAuth Consumer Secret
X API OAuth 1.0a Consumer Secret (API Secret). Required if bearerToken is not provided.
customFields object
Custom fields to be added in the notification
customMessage string
Custom message to be added in the notification
executionId string
{{ 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 AbstractHttpOptionsTask-RequestOptions
Options
The options to set to customize the HTTP client
templateRenderMap object
Map of variables to use for the message template
textBody string
Post text body
Direct post text (bypasses template)
url string
https://api.x.com/2/tweetsOverride URL for testing
Optional URL to override the default X API endpoint (for testing purposes)
Definitions
java.nio.charset.Charset
io.kestra.plugin.notifications.AbstractHttpOptionsTask-RequestOptions
connectTimeout string
durationThe time allowed to establish a connection to the server before failing.
connectionPoolIdleTimeout string
PT0SdurationThe time an idle connection can remain in the client's connection pool before being closed.
defaultCharset Charsetstring
UTF-8The default charset for the request.
headers object
HTTP headers
HTTP headers to include in the request
maxContentLength integerstring
10485760The maximum content length of the response.
readIdleTimeout string
PT5MdurationThe time allowed for a read connection to remain idle before closing it.
readTimeout string
PT10SdurationThe maximum time allowed for reading data from the server before failing.