Articles on: React Flow

Fetch: process orders, products and customers in bulk

Fetch: process orders, products and customers in bulk


In this article:


Fetch takes a list of items from your store, such as all orders from last week or all products with a certain tag, and runs your actions for each of them. There is no fixed limit on how many records it processes: you decide with a filter and an optional maximum.


What Fetch does


A Fetch step gets items from your store and passes them to the next steps one by one. React Flow has a Fetch for each main resource:


  • Fetch collections
  • Fetch customers
  • Fetch draft orders
  • Fetch metaobjects
  • Fetch orders
  • Fetch products


Each fetched item goes through the steps under for each separately, as its own run.


Where you can use Fetch


  • In a One-Shot workflow, as the starting point. You run it manually, for example to tag all old products once.
  • In an Automated workflow, as an action. For example, a Scheduled time trigger runs every day and fetches the customers who haven't ordered in 90 days.


In an Automated workflow, the Fetch step has two outputs:


  • for each: the steps here run once for every fetched item.
  • then: the steps here run once, after the loop, to continue the main workflow.




Set up a Fetch step


  1. In an Automated workflow, click + after the trigger, select Action and choose a Fetch action under Fetch resources. In a One-Shot workflow, choose the resource under Fetch resources.
  2. Set Sort data by, for example Last order date and Newest to oldest for customers.
  3. Set Maximum number of ... if you want to limit how many items are processed. Leave it empty to process all matching items.
  4. Under Select a query option to filter data, choose a filter (see below).
  5. Click + next to for each, and add the actions for each item.
  6. Click Save.




Processing a large store can take a while, even if you set a low maximum. React Flow processes the items in the background, so the results appear gradually.


Filter the items with a query


Click Select a query option and choose a ready-made filter. Examples:


  • Products: Created in the last week, Active products, Products by tag, Out of stock somewhere.
  • Customers: Customers with a specified tag, Customers who have spent more than specified amount, Customers with more than ten orders, Customers with a specific metafield value.


After you choose a filter, the query appears under Edit query. Change the values to your own, for example replace tag:test with tag:summer. The query uses the Shopify search syntax. Choose Advanced to write a query from scratch.


You can find more details on building an advanced query from scratch in the article Fetch query: choose exactly which items your workflow processes.


For customers, you can switch between two query types:


  • GraphQL: the Shopify customer search syntax, for example tag:VIP.
  • Segments: the Shopify customer segmentation syntax. You can also pick one of your saved segments. Example: number_of_orders >= 1 AND last_order_date < -90d.


Click Test next to Edit query to see the list of items that match. The Runs counter updates as you change the filter.


Use the fetched item in actions


Inside for each, the current item is available as a "Loop" variable. Click Add variables in any field and open the group, for example Loop customer. The variables look like this:


  • {{ loop.customer.firstName }}
  • {{ loop.customer.defaultEmailAddress.emailAddress }}
  • {{ loop.customer.lastOrder.createdAt }}


Shopify actions inside the loop, such as Add customer tags, work on the fetched item.


A Fetch step can't be placed inside another for each step. Nested fetches are not supported.


Runs and limits


Each fetched item counts as a separate workflow run. If a workflow fetches 500 customers, it uses 500 runs, plus one for the trigger.


  • Check the Runs counter before you save or run the workflow. It shows how many items the current query will fetch.
  • Use a precise query and Maximum number to process only the items you really need.
  • Before a One-Shot Fetch starts, the Runs limit window shows the number of runs and asks you to confirm.


Runs above your monthly plan limit are charged at your plan's rate. If you often process large lists, the Unlimited plan avoids overage charges.


Check the result


Open the run on the Activity page. The For each section shows the Fetch step, how many items were processed (for example "4 successes / 4 resources"), and the sort, limit and query that were used.




✔️ Next step


Check our articles to learn more about the app's functionality:


Updated on: 20/10/2026

Was this article helpful?

Share your feedback

Cancel

Thank you!