Use functions when you need to generate or retrieve a value dynamically with syntax such as {{ functionName(...) }}.

Functions are best thought of as helpers that either fetch something, compute something, or force evaluation behavior that plain variables and filters cannot provide on their own.

Function groups

  • Rendering and debuggingrender(), renderOnce(), printContext(), template inheritance helpers
  • Data accesssecret(), credential(), read(), fileURI(), kv(), encrypt(), decrypt()
  • Data parsingfromJson(), fromIon(), yaml()
  • Workflow helperserrorLogs(), currentEachOutput(), tasksWithState(), iterationOutput(), parentOutput(), appLink()
  • Utilitiesnow(), uuid(), randomInt(), http(), fileSize(), fileExists(), and more
  • Date and calendarisWeekend(), isPublicHoliday(), dayOfWeek(), monthOfYear(), and more

Worked example

This flow uses several runtime functions together: now() for a timestamp, uuid() for a unique run identifier, secret() for a credential, and render() to evaluate a namespace variable containing Pebble:

id: function_reference_example
namespace: company.team
tasks:
- id: log_context
type: io.kestra.plugin.core.log.Log
message:
- "Run ID: {{ uuid() }}"
- "Started at: {{ now() | date('yyyy-MM-dd HH:mm:ss') }}"
- "API key: {{ secret('MY_API_KEY') }}"
- "Config value: {{ render(namespace.my_config) }}"

Was this page helpful?