Skip to main content

Template Tools

eval_template

Evaluate a CEL expression or Go template against an environment map and return the rendered string.

This is useful for checking an expression before putting it in a playbook filter, a notification template, or a transform.

Provide exactly one of cel_expression or gotemplate.

FieldDescriptionScheme
cel_expression

CEL expression to evaluate against env

string

change_id

Catalog change UUID to fetch and inject into env as change

string

check_id

Check UUID to fetch and inject into env as check

string

config_id

Config item UUID to fetch and inject into env as config

string

env

Environment map available to the expression or template

object

gotemplate

Go text/template to render using env

string

Example Usage

Prompt: "Would this notification filter match that pod?"

Parameters Used:

{
"config_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"cel_expression": "config.tags.namespace == 'production'"
}

Result: Returns the rendered result of the expression against the real config item.