A8gent
GlossaryAutomation mechanics

What is data mapping?

Also called: field mapping, data transformation

Data mapping is connecting the output fields of one step to the input fields of the next, converting formats along the way - the unglamorous work that makes up most of building an automation.

Written by A8gent
Contents
  1. At a glance
  2. What data mapping is
  3. The transformations you will always need
  4. Where mapping breaks
  5. What you should know
  6. FAQ
  7. Related terms

At a glance

Category
Automation mechanics
What it is
Connecting one step's outputs to the next step's inputs, converting formats between
Always needed
Phone normalisation to E.164, date and timezone conversion, name handling, defaults
Worst failure
A silent null the API accepts, producing a blank message to a customer
Best defence
Validate required fields before sending and route failures to a human queue
Build against
A captured real payload, not the documentation example

What data mapping is

Data mapping is the work of deciding that the CRM's contact.mobile becomes the SMS step's to, and that it has to be reformatted from 07700 900123 to +447700900123 on the way. Every automation is mostly this. The connectors and the triggers are provided; the mapping is what you actually build, and it is where most production failures originate.

It looks trivial in a demo because the demo uses one clean record. It stops looking trivial when the field is sometimes absent, the name arrives as one string in one system and two fields in another, dates come in three formats, and a customer types their phone number with a space in it.

The transformations you will always need

Four recur in almost every build. Phone normalisation to E.164 - a leading plus and country code, no spaces or punctuation - because messaging APIs require it and humans never type it. Date and timezone conversion between the display format a person entered and the ISO 8601 format an API expects, in the right timezone. Name splitting and joining, which is genuinely hard and where you should accept an imperfect rule rather than pursue correctness.

And defaulting: what goes in a required field when the source is empty. Decide deliberately for each field, because the default answer - send an empty string - is how records end up with a customer called "undefined". Where a missing value means you cannot proceed, route to a human queue rather than inventing something.

Where mapping breaks

Three failure shapes dominate. Missing fields: a path like data.customer.address.postcode works until a customer has no address, and then it errors or silently yields nothing. Guard optional paths and decide the fallback. Type mismatches: a number arriving as a string, a boolean as "true", a currency as "£1,200.00" where the API wants 1200. Silent nulls: the worst case, where the mapping produces an empty value, the API accepts it, and nobody notices until a customer receives a blank message.

Validate before you send. A short check that the required fields are present and shaped correctly, with anything failing routed to a human queue, catches all three cheaply and turns a bad record into a notification rather than an incident - see error handling.

What you should know

Build against real data. Capture an actual payload from the source system - see webhook - and map against that, not the documentation's example, which is always tidier than reality. Then deliberately test with a deliberately awkward record: no surname, no address, an apostrophe in the name, an international number, an emoji in the notes field.

Keep transformations visible rather than clever. A chain of nested expressions in one field is unmaintainable by whoever inherits it; three plain steps that each do one thing can be read and fixed by anyone. That readability is worth more than elegance in a system your team has to keep running, and it is the difference between an automation that survives a staff change and one that quietly gets switched off.

Data mapping FAQ

What is data mapping in automation?

Connecting the output fields of one step to the input fields of the next, and converting formats along the way - a phone number reformatted, a date converted, a name split into two fields. It is the majority of the work in building any real automation.

How should I format phone numbers for automation?

E.164: a leading plus sign, country code, then the number with no spaces, brackets or dashes. Messaging and voice APIs require it and humans never type it that way, so normalising at the point of entry is one of the highest-value transformations you can build.

What happens when a field is missing?

Depending on the platform, the expression errors or silently yields an empty value, and the empty value is the dangerous case because the downstream API often accepts it. Guard optional paths, decide a deliberate default per field, and route genuinely unusable records to a person.

Why does my automation send blank messages?

A mapping produced an empty value and nothing checked. The path was wrong, or the source field was empty for that record, or the type did not match and the platform coerced it to nothing. Add a validation step that refuses to send when required fields are empty.

Should I use expressions or separate steps?

Separate steps for anything a colleague will need to read. A single field containing three nested function calls is impossible to debug at 6am and impossible to hand over. Readability beats elegance in systems that have to outlive the person who built them.

How do I test data mapping properly?

With deliberately awkward records, not clean ones. No surname, no address, an apostrophe in the name, an international phone number, an emoji in the notes, a very long free-text field. Those are the records that break production, so they are the ones worth testing.

Primary source

n8n - key concept glossary

Checked August 2026. Anything priced or rate-limited moves, so verify against the source before you budget.

Want this built rather than explained?

Knowing what data mapping means is one thing; having it running in your business is another. We scope one workflow at a time, quote a fixed price in writing after a free consult, build it, and hand it over with documentation you own.