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
- Click New Transformer (or use the menu beside an existing item and choose Edit).
- Provide a Name and optional Description so team-members understand what the transformer does.
- Build the Expression Pipeline:
- Each block (e.g.
expr1,expr2) represents one transformation step. - Choose the Transformation type and select the Input source:
Original Inputruns 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).
- Each block (e.g.
- 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.
- 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
2019is skipped entirely rather than clipped to201— 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;
expr2defaults 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:- Type
{{to open the variable popper and select a variable as usual. - Enable Apply data transformation at the bottom of the popper.
- 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.
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.
Related pages
AI Agents
Inject transformed values into greetings, guidelines, and agent settings.
Pre-Call Actions
Combine transformers with API responses before a call starts.