Skip to Content
πŸ›  Build🧠 Core ConceptsData Transformation

Data Transformation

When building workflows, incoming data is rarely in the exact format your downstream apps expect. Customer names might have accidental spaces, prices might lack tax or currency symbols, and timestamps might be in UTC instead of your local timezone.

Instead of cluttering your canvas with intermediate code or formatting steps, Data transformation lets you clean, calculate, and reshape data directly inside any step field.


The Core Concept

Whenever you reference data from an earlier step (like {{ 2.email }} or {{ 3.total }}), you can attach a chain of transformations to it. The transformations execute in-memory right when the step reads the token, without creating intermediate canvas steps or spending extra step credits.

Interactive Data Transformation Flow
Typeform
Source Data: New Lead SubmissionOriginal incoming value referenced by token
{{ 1.email }}
Raw Value:
Configured in Workflow Data β†’ Data transformation tab
Transformation Chain
In-Field In-Memory OperationsTidies value before the step runs β€” without extra canvas steps
In-Memory
1
Trim whitespace| trim
Strips leading and trailing spaces
2
To lowercase| lower
Converts entire string to lowercase
3
Extract domain| extract_domain
Pulls the domain portion after @
Yields"cyberdyne.com"
Evaluated result directly populates the field
HubSpot
Step Field: Company Domain FieldClean, transformed value used during step execution
Ready for API
Field Payload:
"cyberdyne.com"

How to Use Data Transformation

You can configure transformations visually or write them inline using pipe syntax.

1. Visual Configuration (Workflow Data Panel)

You can configure transformations visually without writing formulas or syntax:

Open the Workflow Data Panel

Click into any step input field on your canvas to open the Workflow data drawer/modal (where you select dynamic variables).

Switch to the Data Transformation Tab

In the Workflow data top bar, click the Data transformation tab (next to Data select and Data flow).

Add Transformations to Step Variables

All variables mapped in the current step appear here. Click Add transformation on any variable to add operations (such as Trim spaces, To lowercase, Times, Format as currency, or Format the date).

Live In-Memory Execution

The transformations run in memory when this step resolves the field. The transformed value is used in that field, while the earlier step’s stored output stays unchanged. If later steps need the changed value as a reusable result, use a dedicated canvas step instead.

2. Fast Inline Pipe Syntax

If you prefer writing directly inside text inputs, append a pipe (|) and the operation name inside any variable token:

{{ 2.email | trim | lower }} {{ 3.subtotal | times:1.21 | format_currency:"$" }} {{ 1.created_at | format_date:date_medium:Europe/Prague }}

Everyday Examples

Common GoalOriginal DataTransformationResult
Clean up customer name" john doe "Trim spaces + Capitalise Each Word"John Doe"
Extract email domain"[email protected]"Take the domain"acme.com"
Add 21% VAT and format price100Times: 1.21 + Format as currency: "$""$121.00"
Format phone number"777123456"Format a phone number: CZ"+420 777 123 456"
Human-readable date"2026-09-01T12:00:00Z"Format the date: 13 Aug 2026"1 Sep 2026"
Join list into text["Apple", "Banana"]Join items (comma + space)"Apple, Banana"
Fallback for missing valuenull or ""If empty, use: "Unknown""Unknown"

Operation Catalogue

Text & Clean Up Operations

Use these operations to clean user input, change capitalization, slice text, and extract specific tokens.

OperationInline SyntaxDescriptionExample
Trim spaces| trimRemoves leading and trailing whitespace." hello " β†’ "hello"
lower case| lowerConverts all letters to lowercase."Hello World" β†’ "hello world"
UPPER CASE| upperConverts all letters to uppercase."Hello World" β†’ "HELLO WORLD"
Capitalise Each Word| capitalizeCapitalizes first letter of each word; preserves hyphens."john doe" β†’ "John Doe"
Take the text out of HTML| strip_htmlRemoves HTML tags while preserving line breaks and converting list items to bullets."<p>Hi</p>" β†’ "Hi"
Take the markdown out| strip_markdownRemoves markdown headings, bolding, and links for plain text messaging."**Important**" β†’ "Important"
Remove the code fence| strip_fenceUnwraps outer ``` markdown code blocks from AI outputs."```json\n{}\n```" β†’ "{}"
Replace text| replace:"old":"new"Replaces all occurrences of a search string."cat" | replace:"cat":"dog" β†’ "dog"
Everything before| before:"@"Extracts text before the first occurrence of a delimiter."[email protected]" β†’ "user"
Everything after| after:"@"Extracts text after the first occurrence of a delimiter."[email protected]" β†’ "glow.app"
First line only| first_lineTakes only the first non-empty line of text."Line 1\nLine 2" β†’ "Line 1"
Shorten to| limit:100Truncates text after a specified character count."Long text" | limit:4 β†’ "Long"
Split on| split:commaSplits text into a true list (by comma, space, newline, or tab)."a, b" | split:comma β†’ ["a", "b"]
Take the domain| extract_domainExtracts clean domain from URL or email (removes www. and protocols)."https://glow.app" β†’ "glow.app"
Take the email address| extract_emailFinds and extracts the first valid email address from raw text."Contact [email protected]" β†’ "[email protected]"
Take the number| extract_numberExtracts first numeric sequence (preserves leading zeros for SKUs)."Order #0042" β†’ "0042"
Take the link| extract_urlFinds and extracts the first web address from text."Visit https://glow.app" β†’ "https://glow.app"
Make safe for JSON| escape_jsonEscapes quotes and newlines so text can safely sit inside raw JSON."A \"quote\"" β†’ "A \\\"quote\\\""
Make safe for web address| url_encodeEncodes special characters for URL parameters."Hello World" β†’ "Hello%20World"
Count characters / words| count_charactersReturns the total character or word count as a number."Hello" β†’ 5

Fallback Values (If empty)

If an upstream field might be missing, null, or an empty string, append If empty, use (or | default:"value") to provide a fallback:

{{ 3.company | default:"Individual / Self-Employed" }}

Safe Defaults: The default operation only replaces missing values or empty strings. Valid values such as 0 or false are preserved and will never be overwritten.


Choosing Between In-Field Transforms and Canvas Steps

Use In-Field Data TransformationUse Dedicated Canvas Steps
Formatting & Cleaning: Lowercase text, trim spaces, extract domains, format currencies.Branching & Logic: Routing workflows based on complex condition branches (Conditions).
Direct Field Aggregation: Plucking emails from a list and joining with commas.Looping Over API Actions: Calling an external API once per item (Repeater).
Dataset Size: Up to 10,000 items.Large Scale Datasets: Sorting and filtering 100,000+ items (Sort, Filter).

What’s Next?