Lemon Squeezy icon

Lemon Squeezy

Interact with Lemon Squeezy API

Customer → Upsert

AI-generated

Summary

Looks up a Lemon Squeezy customer by email and updates them if found, or creates a new customer in the chosen store if not. Use it to keep customer records in sync without separate lookup and branching logic.

Inputs

  • Store (required) — Store in which the customer is created if no match is found. Pick from the list or set an ID by expression.
  • Email (required) — Email address used to look up the customer, and used for creation if not found.
  • Name (required) — Name used when creating a new customer.
  • Update If Exists — Collection of fields (Name, City, Country as ISO 3166-1 alpha-2 code, Region) to update if the customer already exists.
  • Simplify — Default true. Flattens JSON:API attributes to the top level; disable for the raw JSON:API structure with type, attributes and relationships.
  • Retry Options — Max Retries (default 3, 0 disables) and Initial Delay in ms (default 1000, doubles on each retry) for failed API requests.

Output shape

A single customer record, either the existing customer (updated if update fields were supplied) or the newly created one.

With Simplify on, the output is a flat object with id, type and attributes at the top level. With it off, the raw JSON:API object is returned. The source pack shows the lookup/update/create branch but not its exact details, so the exact response shape in each branch is not confirmed.

Examples

Example 1: Sync new signups from a form into Lemon Squeezy without creating duplicates.

Store: your store; Email: {{$json.email}}; Name: {{$json.name}}; Simplify on.

Example 2: Ensure a customer exists and refresh their location data.

Set Store, Email and Name; under Update If Exists add Country and City from the incoming data.

Links

Discussion