Collect CTX variables dynamically using Jinja
Use case
{%- set keys = CTX()|list -%}
{%- set excluded_keys = ["execution_id","organization","originating_execution_id","rewst","sentry_trace","trigger_instance"] -%}
{%- set workflow_inputs = {} -%}
{%- for key in keys -%}
{%- if key not in excluded_keys -%}
{%- do workflow_inputs.update({key: CTX[key]}) -%}
{%- endif -%}
{%- endfor -%}
{{ workflow_inputs }}{%- set keys = CTX()|list -%}{%- set excluded_keys = ["execution_id","organization",...] -%}{%- set workflow_inputs = {} -%}{%- do workflow_inputs.update({key: CTX[key]}) -%}{{ workflow_inputs }}
Add formatting for email sending
Last updated
Was this helpful?

