Skip to content
Tutorials Center
My learning

Topics

Lesson 6 of 36 ยท Automation Concepts

Data Flow, Fields and Mapping in Automations

Learn how data moves between steps: fields, data types, line items, nested JSON, dropdown values and mapping. Includes runnable stand-ins to flatten JSON and map fields safely.

An automation is mostly moving and reshaping data. Each step receives fields, produces fields, and later steps pick from them. Most bugs in real Zaps are data bugs: a field is empty, text is used where a number is needed, a date is in the wrong format. This lesson gives you the vocabulary to spot those problems.

Zapier cannot run on this site. The Python blocks are stand-ins that model how field data behaves, using plain dictionaries and JSON.

Fields and records

A record is one thing (a lead, an order, an email). It is made of fields, each with a name and a value:

JSON
{
  "name": "Ada Lovelace",
  "email": "[email protected]",
  "amount": "120.50",
  "created": "2026-03-04T09:30:00Z"
}

When you test a trigger, Zapier shows these fields as sample data. Later steps list every field of every earlier step in the data picker.

Data types

Most values in Zaps are text, even numbers and dates. A field with the value 120.50 may be the text "120.50", not a number you can add up. The basic types you meet:

Type Examples Notes
Text Ada, [email protected] The default.
Number 42, 3.14 Some actions expect true numbers.
Boolean true, false, yes Often text like "true".
Date/time 2026-03-04, 2026-03-04T09:30:00Z Many formats; time zones matter.
File A URL or hydrated file Passed as a link or file object.
List Several values in one field See line items below.

Converting between these is the job of Formatter and date handling.

Nested data and line items

Real apps return nested structures: an order has a customer, and a list of items, each with its own fields. Zapier flattens nested data into names with prefixes, such as "Customer Email" or "Items Name". Lists appear as line items: several values for the same field in one step. For example, an order with three products has three values for "Item Name". Many actions cannot take line items directly, and a plain mapping of a list field may combine the values into one comma-separated text. You then either join or split the values, or use looping to handle one item at a time.

Flattening: a stand-in

The code below flattens a nested record the way a no-code tool presents it, so you see how names and lists end up as simple fields.

Python Stand-in: flatten nested JSON

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

You can see items__sku and items__qty become lists, which is how line items behave.

Mapping

Mapping means connecting an output field of an earlier step to an input field of a later step. You can map a whole field, part of a field, or build text around fields. A few rules of thumb:

  • Map the most specific field available (a numeric ID instead of a name when an action expects an ID).
  • Use dropdown values carefully: some fields offer choices fetched from the app, and mapping text into them works only if the text matches an allowed value.
  • Provide defaults for optional fields that might be empty.
  • Watch for empty values: a missing field yields an empty string, which may overwrite good data in an update.

Safe mapping: a stand-in

This block maps fields with defaults and warns when a required value is empty, a pattern worth copying mentally.

Python Stand-in: mapping with defaults and checks

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Notice the explicit float(...) conversion: without it you would be multiplying text. In Zapier you would use a Formatter step for that.

Where the data comes from

Data enters a Zap from the trigger, and from search and lookup steps. Data can also come from webhook payloads you define yourself. After a step runs, it may add new fields (for example the ID of a created record), which later steps can use. This is how you chain work: create a contact, then use its new ID to create a task linked to it.

Common data problems

  1. Empty field: the source app never filled it. Add a filter or default.
  2. Wrong type: text instead of a number or date. Format it.
  3. Different date or time zone: convert before comparing.
  4. Hidden whitespace or casing: " Ada " is not "ada". Trim and normalize.
  5. Stale sample data: the trigger test shows an old record; fields may differ in new events.
  6. Renamed field: if the source app changes a field name, the mapping can silently point to nothing. Retest after app changes.

Sample data is only a sample

The data you see in the editor comes from one example. Some events have extra or fewer fields. Always check Zap History for real runs rather than trusting one sample, and test with unusual inputs: empty fields, very long text, special characters, names with accents.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. A field shows 120.50 in the data picker. What is the safest assumption?

    Many values arrive as text, so convert them before calculations.
  2. 2. What are line items?

    Lists inside a record appear as line items; you can join, split or loop over them.
  3. 3. A mapped field is empty in an update step. A risk is:

    Updates can replace existing values with empty strings, so guard or default them.
  4. 4. Why test with unusual data?

    One sample record rarely covers the variety of real events.

Summary

  • Data moves as named fields; most values are text until you convert them.
  • Nested data is flattened; lists become line items you can join, split or loop over.
  • Mapping connects earlier outputs to later inputs; use defaults and guard empty values.
  • Search steps and created-record IDs add data mid-Zap.
  • Test with real runs and awkward inputs, not just the editor sample.

Next: Polling vs Instant Triggers