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

TransformationTypical use casesKey parameters
Find & ReplaceSwap keywords, scrub PII, convert newlines to HTML, etc.searchValue, replaceValue, caseSensitive, optional regex flags.
CompareTurn comparisons into explicit true/false answers (e.g. numeric thresholds, matching strings).comparisonOperator (==, !=, <, >, <=, >=), rightOperand, caseSensitive.
ConditionsCombine two boolean inputs with AND or OR. Ideal for pre-call/action gating.logicalOperator and a secondary input (expr#) to compare.
Ternary OperatorReturn a custom message depending on whether the incoming value is truthy/falsy.trueOutput, falseOutput.
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.

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 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.