Rendering and Debugging Functions
This group matters when expressions stop behaving the way you expect. render() and printContext() are often the quickest way to understand whether a value is missing, nested, or still just a string.
render()
Use render() when a variable itself contains Pebble and must be evaluated:
{{ render(namespace.github.token) }}{{ render("{{ trigger.date ?? execution.startDate | date('yyyy-MM-dd') }}") }}Without render(), namespace or flow variables that contain Pebble are treated as plain strings.
This pattern is especially useful with namespace variables, composed flow variables, and fallback logic based on trigger context:
variables: trigger_or_yesterday: "{{ trigger.date ?? (execution.startDate | dateAdd(-1, 'DAYS')) }}"
tasks: - id: yesterday type: io.kestra.plugin.core.log.Log message: "{{ render(vars.trigger_or_yesterday) }}"renderOnce()
Equivalent to render(expression, recursive=false). Use renderOnce() when you need one extra evaluation pass but do not want recursive expansion to keep walking nested Pebble content:
{{ renderOnce(namespace.github.token) }}renderOnce() is the safer choice when you need one extra evaluation pass but do not want recursive expansion to keep walking nested Pebble content.
printContext()
Outputs the full execution context as a string. Use it in the Debug Expression console to inspect every variable available at that point in the execution:
{{ printContext() }}This is the fastest way to discover the exact key names and structure of inputs, outputs, trigger, and other context variables when an expression is not resolving as expected.
Template inheritance helpers
These are less common than runtime-oriented helpers, but they matter when you are using Pebble blocks and template inheritance directly.
block()
block() renders the contents of a named block multiple times. It is different from the Pebble block tag, which declares the block:
{% block "post" %}content{% endblock %}
{{ block("post") }}parent()
Use parent() inside an overriding block to include the original block content from the parent template:
{% extends "parent.peb" %}
{% block "content" %}child content{{ parent() }}{% endblock %}Was this page helpful?