AutoMerge is generally available

Last updated:

Variables Show as {{...}} in Output

Why variables aren't resolving correctly and how to fix it.

When Agent0's output or tool calls contain literal {{variable}} text instead of actual values, the variable isn't being resolved. This happens when variables don't exist for the trigger that fired.

Wrong Trigger Type for Variable

The most common issue: using trigger-specific variables with the wrong trigger type.

Example problem:

Prompt: "Post findings to {{slack.channel.name}}"
Trigger: Schedule (runs daily at 9am)
Result: "Post findings to {{slack.channel.name}}" (literal text)

Why: Schedule triggers don't have {{slack.channel.name}}. That variable only exists for Slack triggers.

Fix:

Option 1: Use Only Compatible Variables

Only use variables that exist for your trigger type:

  • Schedule → {{now}}, {{today}}, built-in variables
  • Slack message → {{slack.channel.name}}, {{slack.message.text}}, etc.
  • Failed check → {{check.name}}, {{label.service}}, etc.

Option 2: Use parameters instead

Define values that don't change under Sandbox → Parameters:

  1. Go to Sandbox → Parameters
  2. Click Add parameter and enter alert_channel = incidents
  3. Use in prompt: Post to #{{alert_channel}}

This works for all trigger types.

Option 3: Handle Multiple Trigger Types

If your automation has different triggers, branch on trigger type:

If this is a Slack message, post findings to {{slack.channel.name}}.

If this is a scheduled run, post findings to #daily-reports.

Reference {{dash0.trigger.kind}} to differentiate.

Typo in Variable Name

Small typos break variable resolution silently.

Common mistakes:

  • {{slack.chanel.name}} (should be channel - typo in attribute name)
  • {{Slack.channel.name}} (wrong capitalization)
  • {{label-service}} (should be label.service with dot)

Fix:

  • Copy variable names from trigger documentation
  • Use autocomplete in the prompt editor (type {{ to see suggestions)
  • Double-check spelling and capitalization

Variable Doesn't Exist for This Trigger

Some variables only exist in specific contexts.

Example:

{{slack.thread.timestamp}} only exists if the Slack message was in a thread. Top-level messages don't have this variable.

Fix:

  • Check trigger documentation for available variables
  • Don't assume variables exist in all contexts
  • For optional variables, write prompts that work whether the variable is present or not

Parameter not defined

If a parameter is missing, the editor can report an unknown variable. An unresolved placeholder can also remain literal in a run's prompt.

Custom webhook variables are an exception to relying on editor hints. A key such as serviceName in the incoming variables map resolves {{serviceName}} at runtime even if the editor marks it as unknown. Check the actual webhook request and resolved prompt before treating the warning as a runtime failure. Parameters override webhook values with the same key, and built-in variables take precedence over both. See Working with the payload.

Check:

  1. Go to Sandbox → Parameters
  2. Verify the parameter name matches what you're using in the prompt
  3. Keys are case-sensitive

Example:

  • Parameter defined: environment = production
  • Prompt uses: {{Environment}} ❌
  • Should use: {{environment}} ✓

If you added the value under Setup variables, it is available only to the setup script, not as a prompt placeholder. Add a Parameter to use {{name}} in the prompt. To pass a non-secret setup value to later shell commands, see Setup variables.

Built-in Variable Misspelled

Built-in variables have specific names.

Correct built-in variables:

  • {{now}}
  • {{today}}
  • {{dash0.dataset}}
  • {{dash0.trigger.kind}}
  • {{dash0.workflow.name}}

Common mistakes:

  • {{date}} (should be {{today}})
  • {{dataset}} (should be {{dash0.dataset}})
  • {{trigger}} (should be {{dash0.trigger.kind}})

Testing Variable Resolution

Use the test dialog to verify variables resolve correctly.

Steps:

  1. Click Test in the automation editor
  2. Choose Test with Past Trigger to use real event data
  3. Look at the resolved prompt in run results
  4. Variables should show actual values, not {{...}} text

If variables show as {{...}} even in tests:

  • The variable truly doesn't exist for that trigger type
  • There's a typo in the variable name
  • The variable is optional and wasn't present in that specific event

Debugging Variable Issues

1. Check Trigger Type

What trigger fired the automation?

  • View the run history
  • Check the "Trigger" column
  • Verify your variables are available for that trigger type

2. Check Available Variables

For your trigger type, what variables should exist?

Reference:

3. Test with Manual Run

Manual test runs show which variables are missing:

  1. Test manually with empty/default variables
  2. See which {{...}} remain unresolved
  3. Either fill them in manually or remove them from prompt

4. Use Autocomplete

The prompt editor's autocomplete shows known variables, but cannot discover custom keys that a webhook caller will send:

  • Type {{ in the prompt field
  • Select variables from the suggestion list
  • This prevents typos

Common Scenarios

Schedule Posts to Slack Channel

Problem:

Prompt: "Post daily report to {{slack.channel.name}}"
Trigger: Schedule
Result: Literal {{slack.channel.name}} in output

Fix using constant:

1. Define constant: report_channel = "daily-reports"
2. Update prompt: "Post daily report to #{{report_channel}}"

Slack Response Uses Service Name

Problem:

Prompt: "Check service {{label.service}}"
Trigger: Slack message
Result: Literal {{label.service}} in output

Fix:

  • {{label.service}} only exists for failed check triggers
  • For Slack triggers, parse service name from {{slack.message.text}}
  • Or use parameters if service is always the same

Multiple Triggers, Different Variables

Problem:

  • Automation has both Slack and schedule triggers
  • Prompt uses {{slack.channel.name}}
  • Schedule runs show {{slack.channel.name}} literally

Fix - branch on trigger type:

If {{dash0.trigger.kind}} is "slack_bot.message":
  Post findings to {{slack.channel.name}}

If {{dash0.trigger.kind}} is "schedule":
  Post findings to #daily-reports

Further Reading