# n8n Data Mapping Examples: 20 Expressions to Copy

> Twenty n8n expressions from real workflows: sheet columns, names with spaces, webhook body fields, AI output paths, earlier nodes, dates and defaults.

Source: https://learn.ynteractive.com/content/blog/n8n-data-mapping-examples · Updated 2026-10-20 · Free from Stepthrough (https://learn.ynteractive.com)

Quick answer

Data mapping in n8n means filling a node's fields with [expressions](https://learn.ynteractive.com/content/glossary/expression) in double curly braces, so each item supplies its own value: `{{ $json.Email }}` for a sheet column, `{{ $json.body.email }}` for a [webhook](https://learn.ynteractive.com/content/glossary/webhook) form, `{{ $json.output.total }}` for an AI extractor. This page collects twenty expressions taken from the free Stepthrough n8n lessons, starting with [Daily Job Alerts](https://learn.ynteractive.com/content/n8n-daily-job-alerts-google-sheets-gmail), grouped by where the data comes from.

Last updated October 20, 2026

[Take the free module →](https://learn.ynteractive.com/courses/n8n-jump-start/14)Module 14 of the free [n8n Jump Start](https://learn.ynteractive.com/courses/n8n-jump-start) course, about 10 minutes. No account needed.

By [Robert Breen](https://learn.ynteractive.com/content/about) · Published October 20, 2026 · Updated October 20, 2026 · 3 min read

n8n · Expressions · Data mapping · Cheat sheet

## From a Google Sheets row

Sheet columns become fields named after the header.

| Need | Expression |
| --- | --- |
| A simple column | `{{ $json.Tech }}` |
| A column with a space | `{{ $json["Tech Email"] }}` |
| A column with an apostrophe or symbol | `{{ $json['Next Step'] }}` |
| Two columns in a subject | `{{ $json.Time }} job: {{ $json.Customer }}` |
| The row number | `{{ $json.row_number }}` |

## From a webhook or form

Data a website form posts to a webhook sits under `body`.

| Need | Expression |
| --- | --- |
| The lead's email | `{{ $json.body.email }}` |
| The service they picked | `{{ $json.body.service }}` |
| From a later node | `{{ $('Webhook').item.json.body.email }}` |

The [speed-to-lead lesson](https://learn.ynteractive.com/content/speed-to-lead-agent-n8n) feeds `{{ $json.body.service }}`, `{{ $json.body.budget }}` and `{{ $json.body.timeline }}` into its AI scoring [prompt](https://learn.ynteractive.com/content/glossary/prompt).

## From AI nodes

| Node | Expression |
| --- | --- |
| [OpenAI](https://learn.ynteractive.com/content/glossary/openai) Message a model (text) | `{{ $json.output[0].content[0].text }}` |
| Information Extractor field | `{{ $json.output.score }}` |
| Information Extractor, later | `{{ $('Information Extractor').item.json.output.total }}` |
| AI Agent | `{{ $json.output }}` |

## From an earlier node

`$json` only sees the previous node. Name the node to reach further back: `{{ $('Get row(s) in sheet').item.json.Project }}`. [n8n Reference a Previous Node](https://learn.ynteractive.com/content/blog/n8n-reference-previous-node) explains when you need it.

## Dates and times

n8n expressions use Luxon for dates, with lowercase `yyyy`.

| Need | Expression |
| --- | --- |
| Today, 2026-10-20 style | `{{ $now.toFormat('yyyy-MM-dd') }}` |
| A readable date | `{{ $now.toFormat('cccc, LLLL d') }}` |
| In three days | `{{ $now.plus({ days: 3 }).toFormat('yyyy-MM-dd') }}` |
| Today only (start of day) | `{{ $today }}` |

The workflow's timezone setting decides what "now" means; set it first under **Settings > Timezone**, as the job alerts lesson does.

## Defaults and clean-up

| Need | Expression |
| --- | --- |
| A default when empty | `{{ $json.Phone ? $json.Phone : 'not given' }}` |
| Lowercase an email | `{{ $json.Email.toLowerCase() }}` |
| Remove spaces | `{{ $json.Name.trim() }}` |
| First name only | `{{ $json.Contact.split(' ')[0] }}` |

## Try it free, step by step

**Daily Job Alerts: Email Each Tech Their Jobs from Google Sheets with n8n**. Every morning at 7, n8n reads a plumbing company's jobs sheet, skips anything not assigned yet, and emails each job to the tech it's assigned to — customer, address, time and what's wrong. No AI… You do every step yourself in a practice copy of n8n, it checks your work as you go, and “Do it for me” finishes any step you get stuck on. Free, and nothing touches your real accounts.

[Start the free lesson](https://learn.ynteractive.com/modules/job-alerts)

[Or read the full step-by-step guide](https://learn.ynteractive.com/content/n8n-daily-job-alerts-google-sheets-gmail)

## Fixed vs Expression: the one setting to check

A field only fills in values when it's in **Expression** mode. Hover over the field and click **Expression**: the braces turn green and a **Result** line shows the first item's real value. If you skip it, the braces are sent as plain text. The client status and meeting notes lessons both point this out after a real test failed that way.

## Typing expressions without typos

- Drag fields from the INPUT panel instead of typing; n8n writes the expression.
- Field names are case sensitive: `Email` is not `email`.
- Use the Result line as your check before running.
- For numbers in an If node, map a plain number like 1240.5, not "$1,240.50". The [invoice lesson](https://learn.ynteractive.com/content/invoice-inbox-to-google-sheets-approval-n8n) asks the AI for "a number with no $ sign" for this reason.

## Key takeaways

- Sheet columns are `$json.Column`; names with spaces need `$json["Column Name"]`.
- Webhook form data sits under `$json.body`.
- AI output lives under `output`; OpenAI's text is at `output[0].content[0].text`.
- Switch fields to Expression and read the Result line before you run.

## Frequently asked questions

**What is data mapping in n8n?**

Data mapping fills a node's fields with values from earlier nodes, using expressions or drag-and-drop, so each item carries its own data through the workflow.

**How do I reference a field with a space in n8n?**

Use bracket notation with quotes: {{ $json["Tech Email"] }}.

**Can I use JavaScript in n8n expressions?**

Yes. Expressions accept small JavaScript snippets, such as .toLowerCase(), .split() and a ? : check for defaults.

**Where can I practice?**

The free [n8n Jump Start](https://learn.ynteractive.com/courses/n8n-jump-start) course. Also read What Is JSON? and [n8n Expressions for Beginners](https://learn.ynteractive.com/content/blog/n8n-expressions-for-beginners).

## Free lessons in this post

- [Daily Job Alerts: Email Each Tech Their Jobs from Google Sheets with n8n](https://learn.ynteractive.com/content/n8n-daily-job-alerts-google-sheets-gmail): Every morning at 7, n8n reads a plumbing company's jobs sheet, skips anything not assigned yet, and emails each job to the tech it's assigned to — customer, address…
- [n8n: Weekly Client Status Emails from a Google Sheet, Written by AI](https://learn.ynteractive.com/content/weekly-client-status-email-google-sheets-ai-n8n): Build an n8n workflow that wakes up every Monday, reads your client tracker in Google Sheets, has AI write a friendly update for each client and saves it as a Gmail…
- [Speed-to-Lead Agent: Answer Every Web Lead in 60 Seconds](https://learn.ynteractive.com/content/speed-to-lead-agent-n8n): Build an n8n workflow that scores every website lead with AI, emails a personal first reply within seconds, and pings Slack only when a lead is hot.
- [Invoices from Your Inbox to Google Sheets, with Approval](https://learn.ynteractive.com/content/invoice-inbox-to-google-sheets-approval-n8n): Build an n8n workflow that reads each vendor invoice PDF from Gmail with AI, logs the vendor, invoice number and total in Google Sheets, and emails the owner an Approve…

## Watch it in a free lesson: Speed-to-Lead Agent: Answer Every Web Lead in 60 Seconds

### Speed-to-Lead Agent: Answer Every Web Lead in 60 Seconds: video walkthrough

Full walkthrough · 3:28 · with captions

Build an n8n workflow that scores every website lead with AI, emails a personal first reply within seconds, and pings Slack only when a lead is hot. The whole lesson narrated step by step, recorded in Stepthrough’s simulated practice environment.

[Watch it with chapters and the full transcript](https://learn.ynteractive.com/content/speed-to-lead-agent-n8n#watch)

From the free lesson [Speed-to-Lead Agent: Answer Every Web Lead in 60 Seconds](https://learn.ynteractive.com/content/speed-to-lead-agent-n8n)

## Related terms

Plain-English definitions, each with an example from a free lesson.

[Webhook](https://learn.ynteractive.com/content/glossary/webhook) · [Prompt](https://learn.ynteractive.com/content/glossary/prompt) · [OpenAI](https://learn.ynteractive.com/content/glossary/openai) · [AI data entry](https://learn.ynteractive.com/content/glossary/ai-data-entry) · [AP aging report](https://learn.ynteractive.com/content/glossary/ap-aging-report) · [Apollo.io](https://learn.ynteractive.com/content/glossary/apollo-io) · [Approval threshold](https://learn.ynteractive.com/content/glossary/approval-threshold) · [Automation](https://learn.ynteractive.com/content/glossary/automation)

[The full AI glossary](https://learn.ynteractive.com/content/glossary)

## Related prompts

- [Appointment reminder text prompt and examples](https://learn.ynteractive.com/content/prompts/appointment-reminder-text-prompt): Appointment reminder text examples and a ChatGPT prompt that writes day-before reminders: time window, who is coming, one prep…
- [Automation time savings estimate prompt](https://learn.ynteractive.com/content/prompts/automation-time-savings-estimate-prompt): Estimate what one automation saves from your own numbers only: minutes before and after, setup and upkeep, costs you look up…
- [Invoice approval request email prompt](https://learn.ynteractive.com/content/prompts/invoice-approval-request-email-prompt): A copy-ready prompt that writes a clear approval request for a large invoice, so the owner can say yes or no in one reply with…
- [Rental property repair coordination prompt](https://learn.ynteractive.com/content/prompts/rental-property-job-coordination-prompt): Coordinate a repair at a rental: a clear email to the owner or property manager about approval and billing, and a short access…

[All free prompt templates](https://learn.ynteractive.com/content/prompts)

## Visual guides

The same ideas as quick visual guides: swipe through the slides, or read each one as text.

- [Email each tech their jobs at 7am with n8n](https://learn.ynteractive.com/content/visual/job-alerts-n8n): Every morning someone at Rapid Flow Plumbing copies the day's jobs into emails, one tech at a time. Hand it to n8n.
- [Mistake to Avoid: Scheduling Before Setting the Timezone](https://learn.ynteractive.com/content/visual/mistake-scheduling-before-the-timezone): A visual tip for n8n schedules: set the workflow timezone before the schedule, so 7am means 7am where your business is.
- [Mistake to Avoid: Sending Every Job Email to One Address](https://learn.ynteractive.com/content/visual/mistake-one-address-for-every-job): A visual tip for n8n and Gmail: make the To field an expression for the Tech Email column, written in square brackets because of the space.

[All visual guides](https://learn.ynteractive.com/content/visual)

## Keep reading

- [n8n Gmail Node Examples: Send, Draft, Wait for Approval](https://learn.ynteractive.com/content/blog/n8n-gmail-node-examples): Five n8n Gmail node setups from real workflows: send a message, create a draft, send and wait for approval, email type and the n8n footer.
- [n8n $('Node').item.json: Use Data from an Earlier Node](https://learn.ynteractive.com/content/blog/n8n-reference-previous-node): How $('Node name').item.json reaches back to an earlier node in n8n, when $json isn't enough, and examples from Gmail, If and Slack steps.
- [n8n OpenAI JSON Output: Get Data Back, Not a Paragraph](https://learn.ynteractive.com/content/blog/n8n-openai-json-output): Make the n8n OpenAI node return usable JSON: the exact shape in the prompt, Output Format set to JSON Object, the output path and when to use Extractor.

[All blog posts](https://learn.ynteractive.com/content/blog) · [All free tutorials](https://learn.ynteractive.com/content)
