Skip to main content
A workflow agent’s opening line (greeting_message) is said word for word as the call connects. It can now include the result of a Before the call step:
That makes a common pattern a few lines of setup: look the caller up in your own system before they are answered, and greet them with the sentence your system returns.

The pattern

  1. A tool that asks your server about the caller. Create an HTTP tool (Create tool) whose output declares the field you will say, for example greeting:
    Your server answers {"greeting": "Hi Dana, your order 4411 shipped today. How can I help?"}.
  2. A Before step that runs it. In the workflow document (Save workflow), bind the tool and run it before the call. Pass the caller’s number as a fixed input that is exactly one call reference:
    continue_with_available answers the call even when the lookup fails, which is what you want for a greeting.
  3. The opening line reads its result. Set it with Update agent:
  4. Check and publish. Check workflow and Publish validate the line’s references against the document’s Before steps. Calls from then on open with your server’s sentence.
In the dashboard, open Answer the call on the workflow: the list under the opening line offers every field your Before steps return and inserts the reference where your cursor is.

What the caller hears

A raw {{...}} is never said. The value is said as written: it is not read as a variable or a random variation, and braces in it are dropped. Values the platform treats as secrets (tokens, keys) are never filled in; the fallback is used instead. The reference works next to everything else the line already supports: {{Hi|Hello}} {{FirstName}}, {{before.lookup.greeting|how can I help?}}.

Rules

  • <step_id> must be one of the workflow’s Before the call steps. Dots walk into the result and a number addresses a position in a list: {{before.lookup.orders.0.status}}.
  • A result is read at most 8 levels down, and only the first 64 items of a list. A reference that goes deeper, or names a position of 64 or more, says its fallback although Publish accepts it.
  • Write it exactly as shown — lowercase, no spaces inside the braces. A near miss such as {{ Before.lookup.greeting }} is refused.
  • Every engine and every model, on inbound and outbound phone calls (the channels a Before phase runs on).
  • The line is rendered once per call, after the Before phase has finished and before the agent speaks; it is never prepared ahead of the result.

Errors

Check and Publish answer 422 WORKFLOW_VALIDATION_FAILED with an issue at path /settings/greeting_message: