Skip to main content

interpolate

Function interpolate 

Source
pub fn interpolate(template: &str, payload: &Value) -> Result<String, String>
Expand description

Substitute {{ dotted.path }} placeholders in a task template from payload.

The payload is data, not instruction. Whoever writes the automation chooses where a webhook’s fields land in the prompt; the sender only fills those slots. Values are truncated at MAX_SUBSTITUTION.

A path that is missing or null is an error naming that path — the run is recorded as failed instead of spawning an agent on a half-formed prompt.