Skip to main content
Data Transformers let you run deterministic text logic on any value your agent pulls in from variables, actions, or flows—no custom code required. Use them to normalise CRM fields, branch on boolean checks, or clean up API payloads before the LLM ever sees the data.

When to use Data Transformers

  • Format external data (e.g. strip symbols from phone numbers or rewrite salutations) before you reference it inside prompts.
  • Enforce guard rails by comparing values or routing between true/false outputs.
  • Share the same transformation across multiple agents, pre-call actions, or flow nodes and keep everything in sync.

Open the workspace view

1
In the left navigation choose Build → Data Transformers.
2
Select the workspace you want to manage (you must use a non-system workspace ID).
3
Use the search bar to filter by name or description, or page through the list if you have many definitions.

Create or edit a transformer

  1. Click New Transformer (or use the menu beside an existing item and choose Edit).
  2. Provide a Name and optional Description so team-members understand what the transformer does.
  3. Build the Expression Pipeline:
    • Each block (e.g. expr1, expr2) represents one transformation step.
    • Choose the Transformation type and select the Input source:
      • Original Input runs against whatever text you paste into the top Input field.
      • Any expr# feed lets you chain from a previous block’s output.
    • Fill out the parameters that appear for the selected type (see the table below).
    • Add more blocks with Add expression or remove a block with the ✕ icon (except the first one).
  4. Click Evaluate to run the full chain against the sample input. The drawer shows intermediate outputs for each block plus the final output so you can verify the logic.
  5. Press Save. Your transformer is instantly available anywhere variables are inserted.

Supported expression types

You can mix and match types inside the same pipeline. Every block outputs plain text, so downstream steps (and the agent) can read the result immediately.
Empty inputs are handled gracefully. If an input value is empty — or an expression references an input that was never supplied — the reference resolves to an empty string and the pipeline keeps running, instead of failing the transformation. This means transformers attached to optional variables (for example, a CRM field that is sometimes blank) no longer need guard expressions just to survive missing data.

Behaviour worth knowing

  • Extract Number (min–max) matches on the whole run of digits. With a maximum of 3, a four-digit run such as 2019 is skipped entirely rather than clipped to 201 — so a date in the text will not be mistaken for a 3-digit code.
  • String Length counts characters the way software does, not the way the eye does: an emoji counts as 2.
  • Extract Email covers everyday addresses. It does not match accented or non-Latin local parts, quoted local parts, or intranet addresses without a dot (user@localhost).
  • Regex Extract and Find & Replace cap the work a pattern can do — input up to 100,000 characters, patterns up to 1,000 characters, and up to 10,000 matches — and return a clear error rather than stalling if a pattern exceeds them.

Tips for complex pipelines

  • Use descriptive descriptions so future editors understand why a pipeline exists.
  • When chaining expressions, double-check the Input selector; expr2 defaults to the previous block, but you can point it at any earlier result.
  • Evaluating often helps you catch whitespace or case-sensitivity issues before anyone attaches the transformer to production prompts.

Apply a transformer to variables

Wherever the variable popover appears (Guidelines, Initial Message, flows, etc.), you can apply a transformer in-line:
  1. Type {{ to open the variable popper and select a variable as usual.
  2. Enable Apply data transformation at the bottom of the popper.
  3. Pick the transformer by name — the popper auto-completes transformer names and shows a preview of the expression chain so you can verify the pipeline before inserting. The inserted snippet renders as [TransformerName({{variableName}})], and the stored value includes the transformer ID so the backend can execute the pipeline automatically.
This works for system, interaction, and custom variables. On execution the platform pushes the transformed value into the agent prompt, HTTP request body, or wherever the variable lives.

Manage safely

  • Usage-aware deletion – clicking Delete runs a usage check first. If the transformer is referenced by any agent, action, or flow node you will see a detailed report and deletion is blocked until you remove those references.
  • Workspace-wide search – the list view fetches every transformer in the workspace so you can filter locally without pagination round trips.
  • Exports & clones – AI Agent exports/imports and duplicates automatically carry along any referenced transformers and rebuild usage links in the target workspace.

AI Agents

Inject transformed values into greetings, guidelines, and agent settings.

Pre-Call Actions

Combine transformers with API responses before a call starts.