# n8n Expressions for Beginners: {{ $json }} Explained

> n8n expressions in plain English: what {{ }} and $json mean, when to use brackets for names with spaces, and why one step runs once per item.

Source: https://learn.ynteractive.com/content/blog/n8n-expressions-for-beginners · Updated 2026-10-01 · Free from Stepthrough (https://learn.ynteractive.com)

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

n8n · Automation

An [n8n expression](https://learn.ynteractive.com/content/glossary/expression) is anything inside double curly brackets, like `{{ $json.Tech }}`: it pulls data from an earlier step into a field, and `$json` means the data of the item the step is working on. Use dot notation for simple names and brackets with quotes for names with spaces, like `{{ $json["Tech Email"] }}`. You can practice expressions free in the [Daily Job Alerts](https://learn.ynteractive.com/content/n8n-daily-job-alerts-google-sheets-gmail) lesson, with more examples in [AI Email Responder](https://learn.ynteractive.com/content/ai-email-responder-gmail-drafts-n8n).

When you open someone else's [n8n workflow](https://learn.ynteractive.com/content/glossary/workflow), fields full of `{{ $json["Tech Email"] }}` can make you think you need to learn to code. You don't. Three small ideas cover almost every expression a beginner workflow uses.

## What is an n8n expression?

An n8n expression is text inside `{{ }}` that n8n replaces with data from an earlier step when the workflow runs, instead of using a fixed value you typed.

In the Daily Job Alerts lesson, the Gmail step's subject is:

```text
{{ $json.Time }} job: {{ $json.Customer }}
```

The text outside the brackets (" job: ") stays the same. The two expressions change for every row, so for the first job the subject comes out like "8:00 AM job: Hannah Ortiz."

n8n shows a preview under any field with an expression, using the first item. When you paste `{{ $json.Tech }}` into the lesson's Filter, the preview shows **Dave**.

## What does $json mean in n8n?

In n8n, `$json` is the data of the item the current step is working on, as it came from the previous step.

In the Daily Job Alerts lesson, the Google Sheets step reads the Today's Jobs sheet for Rapid Flow Plumbing (a made-up company) and returns six items, one per row. The column names become the labels: Customer, Address, Job, Time, Tech and Tech Email. For each row, `{{ $json.Customer }}` is that row's customer, `{{ $json.Time }}` is its time and `{{ $json.Tech }}` is its tech.

The same works for data that isn't a spreadsheet. In the AI Email Responder lesson, the [Gmail Trigger](https://learn.ynteractive.com/content/glossary/gmail-trigger) turns each new email into fields: From, Subject, snippet and threadId. An email is like one row in a spreadsheet, so `{{ $json.From }}` is the sender and `{{ $json.Subject }}` is the subject.

Match each name exactly as it appears in the step's output, including capitals and spaces. The Gmail fields From and Subject start with capitals, but snippet and threadId start lowercase.

## When do I use brackets instead of a dot in n8n expressions?

Use bracket notation with quotes, like `$json["Tech Email"]`, whenever the field name has a space; use dot notation, like `$json.Tech`, for single-word names.

The Daily Job Alerts sheet has a column called Tech Email. Dot notation can't handle the space, so the lesson writes the Gmail **To** field as:

```text
{{ $json["Tech Email"] }}
```

The [Find and Use n8n Templates](https://learn.ynteractive.com/content/find-and-use-n8n-templates) lesson uses the same rule: a form field called Pet name becomes `{{ $json["Pet name"] }}`, while Name stays `{{ $json.Name }}`.

## Why does one n8n step send several emails?

An n8n step runs once for every item it receives, and each run fills in the expressions with that item's data, so one Gmail step can send many emails.

In Daily Job Alerts, six rows come out of the sheet. A **Filter** with `{{ $json.Tech }}` set to **is not empty** drops the one job with no tech, so five items reach the Gmail step. The single Gmail step runs five times, and each time `{{ $json["Tech Email"] }}` is a different row's address. In the lesson, five emails go out: two to Dave, two to Luis and one to Tasha. You never write a loop. A typed address in To would send every job to the same person.

The message body works the same way:

```text
Hi {{ $json.Tech }},

Job: {{ $json.Job }}
Address: {{ $json.Address }}
Time: {{ $json.Time }}
Customer: {{ $json.Customer }}
```

The message is written once and filled in five times. The full build is in [Email Each Tech Their Jobs Every Morning with n8n](https://learn.ynteractive.com/content/blog/n8n-daily-job-emails-google-sheets).

## 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)

## How do I use expressions in an n8n AI prompt?

Put expressions directly in the AI Agent's prompt, so each run of the agent sees the current item's fields, such as an email's From, Subject and message.

In the AI Email Responder lesson for Greenline Pest Control (a made-up company), the AI Agent's **Source for Prompt** is set to **Define below**, because by default the agent expects a chat message. The prompt pulls in the email:

```text
Write a reply to this email, then save it as a draft in the same thread.
<email>
From: {{ $json.From }}
Subject: {{ $json.Subject }}
Message: {{ $json.snippet }}
</email>
```

The instruction stays the same, and the From, Subject and message change with every new email. The same lesson uses expressions in three more places on the Gmail Tool:

- **Subject:** `Re: {{ $json.Subject }}` keeps the original subject with "Re:" in front.
- **Thread ID** option: `{{ $json.threadId }}` puts the draft under the customer's email as a reply.
- **To Email** option: `{{ $json.From }}` sends the reply back to whoever wrote in.

The threadId also becomes the Session ID key for Simple Memory, which is the fix in [Fix "No session ID found" in n8n Simple Memory](https://learn.ynteractive.com/content/blog/n8n-no-session-id-found).

## What are common mistakes with n8n expressions?

The most common n8n expression mistakes are typing a fixed value where an expression belongs, using a dot with a name that has a space, and misspelling a field name.

1. **A typed value instead of an expression.** One typed address in To sends every email to one person.
2. **A dot with a space.** Use `$json["Tech Email"]`, not a dot, when a name has a space.
3. **Wrong spelling or capitals.** Copy the field name exactly from the step's output.
4. **Missing brackets.** Without `{{ }}`, n8n sends the text exactly as typed.
5. **Skipping the preview.** Check what the field shows for the first item before running the whole workflow.

For more practice, see the [n8n tutorials](https://learn.ynteractive.com/content/tool/n8n) or the [n8n Jump Start](https://learn.ynteractive.com/content/path/n8n-jump-start) path. If you're new to n8n, [Learn n8n from Zero](https://learn.ynteractive.com/content/blog/learn-n8n-for-beginners) puts the lessons in order.

## Key takeaways

- An n8n expression is text inside {{ }} that n8n replaces with data from an earlier step when the workflow runs.
- In n8n, $json is the data of the current item, so {{ $json.Tech }} is the Tech value for that item.
- n8n field names with spaces need bracket notation with quotes, like {{ $json["Tech Email"] }}.
- An n8n step runs once per item, so one Gmail step with expressions can send a different email for every row.
- Expressions work inside AI Agent prompts too, pulling each email's From, Subject and message into the prompt.

## Frequently asked questions

**What do the double curly brackets mean in n8n?**

Anything inside {{ }} in n8n is an expression. n8n replaces it with data from an earlier step when the workflow runs, instead of using the text as typed.

**What is $json in n8n?**

$json is the data of the item the current n8n step is working on, as it came from the previous step. $json.Tech is the Tech value for that item.

**How do I use a field name with a space in an n8n expression?**

Use square brackets and quotes instead of a dot, like {{ $json["Tech Email"] }}.

**Why did my one Gmail step in n8n send several emails?**

n8n runs a step once for every item it receives. If five items reach the Gmail step, it sends five emails, each filled in with that item's data.

**Do I need to know JavaScript to use n8n expressions?**

No. The expressions in the Daily Job Alerts and AI Email Responder lessons are field names inside {{ }}, and the lessons show exactly what to paste.

## 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…
- [AI Email Responder: Draft Gmail Replies Automatically with n8n](https://learn.ynteractive.com/content/ai-email-responder-gmail-drafts-n8n): Build an n8n agent that watches your Gmail, reads each new customer email, and writes a reply as a draft in the same thread, ready for you to check and send.

## Related terms

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

[Expression](https://learn.ynteractive.com/content/glossary/expression) · [Workflow](https://learn.ynteractive.com/content/glossary/workflow) · [Gmail Trigger](https://learn.ynteractive.com/content/glossary/gmail-trigger) · [Action](https://learn.ynteractive.com/content/glossary/action) · [Agent memory](https://learn.ynteractive.com/content/glossary/agent-memory) · [AI Agent node](https://learn.ynteractive.com/content/glossary/ai-agent-node) · [Artificial intelligence (AI)](https://learn.ynteractive.com/content/glossary/artificial-intelligence) · [Automation](https://learn.ynteractive.com/content/glossary/automation)

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

## Related prompts

- [AI agent system message prompt](https://learn.ynteractive.com/content/prompts/agent-system-message-draft-prompt): Draft the system message for an n8n AI Agent: who it is, what it knows, its rules and how it writes, including a rule never to…
- [Appointment reminder text prompt](https://learn.ynteractive.com/content/prompts/appointment-reminder-text-prompt): Write day-before reminder texts for each job on tomorrow's schedule: the time window, who's coming, one prep step and an easy…
- [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…
- [Daily priorities plan prompt](https://learn.ynteractive.com/content/prompts/daily-priorities-plan-prompt): Paste your to-do list and fixed times and get a realistic plan for today: top three, time blocks, a buffer, and what to move to…

[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.

- [5 Steps to an AI Email Responder That Only Writes Drafts](https://learn.ynteractive.com/content/visual/5-steps-ai-email-responder-drafts): A visual guide: an n8n agent reads each new Gmail message and saves a reply as a draft in the same thread. You read it and click Send.
- [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 Triggers Explained: Which One Starts Your Workflow?](https://learn.ynteractive.com/content/blog/n8n-triggers-explained): n8n triggers explained: schedule, Gmail, chat, webhook and form triggers, how to test each one, and how the trigger changes your AI Agent's prompt.
- [Learn n8n from Zero: Free Projects in the Right Order](https://learn.ynteractive.com/content/blog/learn-n8n-for-beginners): Learn n8n for beginners with six free, hands-on projects in a sensible order, from templates to AI agents to a web form, plus what you need for real.
- [How to Start Using AI in a Small Business: 5 Projects](https://learn.ynteractive.com/content/blog/start-using-ai-small-business): How to start using AI in a small business: five first projects, from better prompts to an inbox agent, with what each saves and what it costs.

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