Intermediate9 min

Data Mapping and Transforming Fields

Most of the real work in automation is moving data between shapes. App A gives you a full name; App B wants first and last separately. A date arrives as text; the next step needs a real date. This plumbing is unglamorous and it is where flows break, so it pays to get comfortable with it.

Built-in functions

Every tool ships text and date functions you can use inline: split, uppercase, trim, format date, substring. In Make they live in the function picker; in n8n you write small expressions in double curly braces.

n8n expression
// split a full name into first and last
{{ $json.fullName.split(' ')[0] }}
{{ $json.fullName.split(' ').slice(1).join(' ') }}

// normalize an email
{{ $json.email.trim().toLowerCase() }}

Looping over lists

When a step returns many items, like ten rows from a sheet, the following steps run once per item automatically in n8n, or you use an Iterator module in Make. Understanding this prevents the classic bug where you expected ten Slack messages and got one.

n8n - item list
Input: 3 items
{ name: 'Ada', email: 'ADA@x.io ' }
{ name: 'Lin', email: 'lin@x.io' }
{ name: 'Sam', email: ' sam@x.io' }
After normalize node: 3 clean items, each routed onward.
Each item flows through the rest of the workflow on its own.
Null is not empty string
A missing field is often null, not the empty text you expect. Calling toLowerCase on null throws an error and kills the run. Guard with a default, for example the nullish coalescing operator in n8n expressions.

Result: clean, predictable data flowing into every downstream step, which is what keeps a flow alive after the first hundred runs.

Hands-on tasks