Core Plugins and tasks Return

Core Plugins and tasks Return

Certified

Return a value for debugging purposes.

Render a templated string and return it so you can quickly inspect or reuse values during a flow.

Handy for troubleshooting (the rendered value is logged) or for generating small payloads such as headers or tokens that downstream tasks expect. Combine with template filters to control whitespace or formatting before the value is passed along.

yaml
type: io.kestra.plugin.core.debug.Return
yaml
id: debug_value
namespace: company.team

tasks:
  - id: return
    type: io.kestra.plugin.core.debug.Return
    format: "{{ task.id }} > {{ taskrun.startDate }}"

yaml
id: return
namespace: company.team

inputs:
  - id: token
    type: STRING
    required: false
    displayName: "API Token"

  - id: username
    type: STRING
    displayName: "Username"
    required: false

  - id: password
    type: STRING
    displayName: "Password"
    required: false

tasks:
  - id: compute_header
    type: io.kestra.plugin.core.debug.Return
    format: >-
      {%- if inputs.token is not empty -%}
      Bearer {{ inputs.token }}
      {%- elseif inputs.username is not empty and inputs.password is not empty -%}
      Basic {{ (inputs.username + ':' + inputs.password) | base64encode }}
      {%- endif -%}
Properties

Assets this task consumes as inputs or produces as outputs, for lineage tracking and the asset graph (Enterprise Edition). A flow declaring this property on a task is rejected in the open-source edition.

Definitions
assetFailureBehaviorstring
Possible Values
IGNOREFAILWARN

Asset failure behavior

Behavior applied to the task state when a declared asset fails to render, emit, or be persisted (e.g. a lock conflict): FAIL escalates it to FAILED, WARN (default) warns it if it would otherwise succeed, IGNORE leaves the state untouched.

enableAutobooleanstring

Whether to auto-register assets referenced dynamically at runtime that are not statically declared in inputs or outputs.

inputsarray

The assets consumed as inputs.

id*string
Min length1
typestring
outputs

The assets produced as outputs.

id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*string
Min length1

Custom asset type

descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150

The templated string to render.

The generated string.