Skip to content
Tutorials Center
My learning

Topics

Lesson 10 of 36 ยท Zaps, Triggers and Actions

Actions: Create, Update, Search and Find-or-Create

Master Zap actions: create versus update, search steps, the 'create if not found' option, handling missing results, using returned IDs, and runnable upsert stand-ins.

Actions do the work of a Zap. Choosing the right kind of action is the difference between a reliable automation and one that makes duplicates or fails when data is missing. This lesson covers the four patterns you will use constantly: create, update, search, and find-or-create (also called an upsert).

Zapier cannot run on this site. Event names differ by app, so we describe patterns. The Python blocks are labelled stand-ins that model the logic with a tiny in-memory database.

Create

A create action adds a new record: a row, a contact, a task, a message. It is simple and works well when each event should produce exactly one new thing and the source never repeats. Its risk is duplicates: a retry, a replay or a repeated event creates a second copy.

Update

An update action changes an existing record. It needs to know which one, usually by an ID. Where do you get the ID? From an earlier step (a trigger that already holds it, or a search). Update steps also bring a risk: mapping an empty value can erase a field (data flow lesson). Many update actions only change the fields you fill in; read the help text for yours.

A search action looks for records matching a value (for example a contact with this email) and returns the first match's fields and ID. It is a utility step: it does not change data but unlocks the next step. Search steps have a notable option: "Create ... if it doesn't exist yet". Zapier then runs a create if the search finds nothing, giving you find-or-create without extra steps.

flowchart TD
  S["Search: contact by email"] --> Q{"Found?"}
  Q -->|"yes"| U["Use its ID"]
  Q -->|"no, option on"| C["Create contact, use new ID"]
  Q -->|"no, option off"| N["Step returns nothing"]
  U --> L["Link a task or deal to it"]
  C --> L

A search with create-if-missing always leaves you with an ID for later steps.

What happens when a search finds nothing?

By default, a search that finds nothing may stop the Zap with a "no results" status, or, if allowed to continue, produce empty fields. You have choices:

  1. Turn on create if it does not exist (find-or-create).
  2. Let the Zap continue and handle empty data with a filter or paths.
  3. Let it stop on purpose when "not found" is an error you want to know about.

Decide deliberately; the right answer depends on your process.

Using returned IDs

After a create or search step, the app returns the record's ID and other fields. These appear in the data picker for later steps. For example:

  1. Search or create a company: returns Company ID.
  2. Create a contact: set Company to Company ID.
  3. Create a task: set Contact to the new Contact ID.

Chaining by IDs keeps relations correct. Avoid matching by display name, since two companies can share a name.

Find-or-create: a stand-in

The code below uses a dictionary as a tiny database. It runs the same event twice and compares plain create with search-then-create.

Python Stand-in: search and create-if-missing

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.

The uppercase variant is correctly recognized because the search compares case-insensitively. Real apps differ: some searches are case sensitive. Normalize emails with Formatter first.

Upsert: update if it exists

Some apps offer an update or create (upsert) action in one step: it updates a matching record, or creates one when none matches. Use it when the "key" is clear, such as email or an external ID.

Python Stand-in: upsert on a key

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 that the second call only changes stock and keeps name. Check whether your real app's update behaves that way or overwrites blank fields.

Other action types worth knowing

  • Send actions: email, chat, SMS. Not reversible, so test carefully.
  • Delete actions: rarely worth automating without confirmation.
  • API Request or custom request steps: call an endpoint the app exposes but Zapier has no ready action for.
  • File actions: upload, copy or convert files; large files can hit limits.
  • AI and utility actions: summarize, classify or extract text with built-in AI tools, where available. Treat outputs as untrusted and review them.

Good practices for actions

  1. Prefer find-or-create/upsert over blind create when duplicates matter.
  2. Use IDs, not names, to link records.
  3. Add default values for optional but important fields.
  4. Keep actions small: one purpose per step, with a clear name.
  5. Test with a sandbox or test records.
  6. Consider order: do reversible steps first and irreversible ones (sending an email to a customer) last, after validation.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. What is the risk of a plain create action?

    Retries or replays can create extra copies; search first or use an upsert.
  2. 2. What does 'create if it doesn't exist' on a search step do?

    It turns the search into find-or-create so later steps always have an ID.
  3. 3. Why link records by ID rather than by name?

    Using IDs avoids linking to the wrong record when names collide.
  4. 4. Which should usually be last in a Zap?

    Do reversible and validating steps first so a failure does not send half-finished results.

Summary

  • Four patterns: create, update, search, and find-or-create (upsert).
  • Searches provide IDs for later steps; decide what happens when nothing is found.
  • Link by ID, normalize search keys, and guard against empty values on updates.
  • Put irreversible actions last and test with sandbox data.

Next: Multi-step Zaps and Testing