
Core Plugins and tasks Labels
CertifiedAdd or overwrite labels on the current execution.
Core Plugins and tasks Labels
Certified
Add or overwrite labels on the current execution.
Accepts labels as a map, list of {key,value} pairs, or JSON string. Values are rendered, merged into existing labels, and overwrite by default.
System labels (system.*) are rejected and empty values are not allowed. Useful for tagging runs with payload metadata (customer, env, etc.).
yaml
type: io.kestra.plugin.core.execution.LabelsExamples
Add labels based on a webhook payload
yaml
id: webhook_based_labels
namespace: company.team
tasks:
- id: update_labels_with_map
type: io.kestra.plugin.core.execution.Labels
labels:
customerId: "{{ trigger.body.customerId }}"
- id: by_list
type: io.kestra.plugin.core.execution.Labels
labels:
- key: order_id
value: "{{ trigger.body.orderId }}"
- key: order_type
value: "{{ trigger.body.orderType }}"
triggers:
- id: webhook
key: order_webhook
type: io.kestra.plugin.core.trigger.Webhook
conditions:
- type: io.kestra.plugin.core.condition.Expression
expression: "{{ trigger.body.customerId is defined and trigger.body.orderId is defined and trigger.body.orderType is defined }}"
Properties
labels *Requiredstringarrayobject
SubTypestring
Labels to add to the current execution
The value should result in a list of labels or a labelKey: labelValue map
pluginDefaultsRef Non-dynamicstring
Reference (ref) of the pluginDefaults to apply to this task.