
X XExecution
CertifiedPost execution summary to X
X XExecution
Post execution summary to X
Renders the bundled x.peb template with execution details (id, namespace, link, status, timings) plus custom fields/message, then sends it to X via bearer token or OAuth 1.0a with a 280-character cap.
type: io.kestra.plugin.x.XExecutionExamples
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.x.XExecution
bearerToken: "{{ secret('X_BEARER_TOKEN') }}"
executionId: "{{ trigger.executionId }}"
customMessage: "Production workflow failed - immediate attention required!" # Keep total text <= 280 chars
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.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!" # Keep total text <= 280 chars
options:
readTimeout: PT5S
headers:
X-Datacenter: "eu-west-1"
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
OAuth 1.0a access token secret required when bearer authentication is not used.
accessToken string
OAuth access token
OAuth 1.0a access token required when bearer authentication is not used.
bearerToken string
Bearer token
X API bearer token for app-only authentication; overrides OAuth 1.0a credentials when set.
consumerKey string
OAuth consumer key
OAuth 1.0a consumer key (API key) used when no bearer token is provided.
consumerSecret string
OAuth consumer secret
OAuth 1.0a consumer secret (API secret) required when bearer authentication is not used.
customFields object
Custom fields
Key-value pairs appended to the rendered template output
customMessage string
Custom message
Optional extra text appended to the template output
executionId string
{{ execution.id }}Execution ID
Execution to include in the template; defaults to the current execution and should be set to {{ trigger.executionId }} when called from a Flow trigger
options
Options
The options to set to customize the HTTP client
io.kestra.plugin.x.AbstractXConnection-RequestOptions
Connection timeout
Time allowed to establish a server connection before failing
PT0SConnection pool idle timeout
How long an idle connection stays in the pool before closure; defaults to 0s
UTF-8Default charset
Charset used for requests when none is specified; defaults to UTF-8
java.nio.charset.Charset
HTTP headers
HTTP headers to include in the request
10485760Max content length
Maximum response size in bytes; defaults to 10 MB
PT5MRead idle timeout
How long a read connection may stay idle before closing; defaults to 5 minutes
PT10SRead timeout
Max time allowed for reading data from the server before failing; defaults to 10s
pluginDefaultsRef Non-dynamicstring
Reference (ref) of the pluginDefaults to apply to this task.
templateRenderMap object
Template variables
Key-value map rendered and injected into the template before sending
textBody string
Post text body
Direct post text that bypasses the template; must fit within 280 characters
url string
https://api.x.com/2/tweetsOverride URL for testing
Optional X API endpoint override; defaults to https://api.x.com/2/tweets