tr Skip to content
Black Friday FlowMattic for life, 12 payments of $33.25 Or $399 once. Nothing added for splitting Ends in --Days --Hrs --Min --Sec See the deal

When data is received from Webhook, loop through the JSON array in response using Iterator, and create a new product in WooCommerce

Send a JSON array of products to a FlowMattic webhook, and this workflow loops through it with Iterator and creates one WooCommerce product for each item in the array.

Webhook Iterator WooCommerce

3 steps Setup ~5 min Used on 1.1k sites Free to import

The When data is received from Webhook, loop through the JSON array in response using Iterator, and create a new product in WooCommerce workflow on the FlowMattic canvas, with 3 steps across Webhook, Iterator, WooCommerce
The workflow as it appears in the builder after import. Each step opens for editing.

What this workflow does

Adding products to WooCommerce one by one is slow when they already exist somewhere else, such as a supplier feed, a product database or another store. If that source can send JSON, this workflow turns a single request into a batch of new products.

The run starts at a Webhook URL that FlowMattic creates for you. The sender posts a payload that holds an array of products, each with fields like name, price and description. The Iterator loops through that array, and for each item the WooCommerce step runs Create New Product with the fields you map from the current item.

An array of twenty items means twenty products. The template doesn't check whether a product already exists, so sending the same array twice creates duplicates. Task History shows each run and the result for every item.

Supplier catalogue drops

Your supplier's system posts its new lines as JSON. Each product in the list is added to your WooCommerce store in one run.

Moving products from another platform

A script exports products from your old shop as an array and sends them to the webhook, so WooCommerce gets them without a CSV import.

Products built in another tool

A no-code tool or spreadsheet script assembles product data and posts it, and FlowMattic creates the WooCommerce listings from it.

How this workflow runs

What happens at each step once the workflow is on, and what you need before you import it.

  1. Step 1Trigger
    Webhook Capture Webhook Response

    Gives you a webhook URL for the sender to post to. The payload, including the array of products, is captured so the Iterator can read it.

  2. Step 2Logic
    Iterator Loop Through Array

    Loops through the product array from the webhook payload and runs the next step once per item. Map the array field into the Iterator after a test request.

  3. Step 3Action
    WooCommerce Create New Product

    Creates a new product in WooCommerce for the current array item. Map the item's name, price and other fields from the Iterator to the product.

What you need

  • FlowMatticCore
  • WooCommerce PluginPlugin

After importing, map your own data. To keep the template universal, not every step is pre-filled. Open each step in the builder and connect your accounts and fields (channels, lists, sheets, recipients) before you switch the workflow on.

Make it yours

Changes worth making after you import it.

  • Send one test request with a small array of two or three products before you map anything, so FlowMattic captures the structure and you can map the Iterator and WooCommerce fields.
  • Turn on the webhook's Require authentication on incoming requests setting so only your sender, using its key, can create products.
  • To avoid duplicates, add WooCommerce's Get Product by SKU inside the loop before Create New Product, then a Filter that continues only when no product was found. Items that fail the Filter are skipped and the loop moves on.

Questions about this workflow

What format should the product array use?

Any JSON array where each item holds one product's fields. The Iterator reads the array you map, and the WooCommerce step uses the fields of each item.

What happens if one product in the array fails to create?

The Iterator still moves on to the next item, and Task History shows the error for the one that failed. Fix its data and send that product again.

Can this update WooCommerce products that already exist?

Not as imported. Create New Product always adds a new product. Swap in WooCommerce's Update Product action, with the product ID in each array item, if you need updates.

Can anyone with the webhook URL create WooCommerce products?

It can, as long as authentication is off. Turn on the trigger's authentication setting and have your sender include the key with each request.

Import this workflow into your WordPress site

Download the JSON, import it from the Workflows screen and connect your accounts. Every run stays on your server, with no per-task fees.

30-day money-back guarantee Unlimited workflows and runs Self-hosted

Customers who run it every day

Rated 4.8 out of 5 by customers
Read more reviews

Crafting bridges between my favorite apps, FlowMattic has truly impressed me with its ability to seamlessly automate workflows. This has noticeably accelerated the efficiency of my business processes, making everything run more smoothly and productively.

Janke

It's very straightforward, has a lot integrations and they work well. It is one thing to 'integrate' new external software, but integrating it well, with lots of options is where FlowMattic shines.