Create a Woocommerce Variable Product With Google Spreadsheet

I want to use my spreadsheet to add new products to WooCommerce. I have already read quite a few topics on the Make forum, but unfortunately, it has not yet led to the success I am looking for.

What needs to be done:

  1. Spreadsheets detect if a new row is added and push it to WooCommerce. However, there is a problem:

In the spreadsheet, both the parent and the variable are listed. When creating a product, only the parent should be created first, and the variables should be added later.

These variables each have their own size, price, and SKU, and that is precisely the part where I need help. How do I ensure that all variants are added to the parent with the correct information?

I had thought of creating a datastore after the spreadsheet and using it later after the parent is placed to add all the sizes with the correct information one by one, something like this:

Is this the best option? Or does anyone had a better idea?

To address your main issue, you should focus more on the Google Sheets database.

If parents are mixed with the variants, the database should contain at least:

  1. Parent SKU/ID: This will help you identify assigned variants.
  2. WooCommerce ID of the Parent: This should be filled out after the successful export of the product.
  3. Variables linked to the Parent: Use the ID described in step 1.
  4. Variables ID’s from Woo: to ensure all of them were uploaded.

To ensure that everything was correctly exported to WooCommerce, log it back to your database (Google Sheets).

Here’s how your scenario can work:

  1. Watch new rows
  2. Router
  3. Route 1:
    3.1. FILTER: Is Variant=False
    3.2. Create new product
    3.3. Update a cell (WooCommerce Parent ID) with WooCommerce product ID
  4. Route 2:
    4.1. FILTER: WooCommerce Parent ID is not empty
    4.2. Create new variant
    4.3. Update a cell: WooCommerce Variant ID with WooCommerce Variant ID

Here’s an example structure of Google Sheets database:

Then, you just need to put everything in the process. Keep in mind that if the scenario is scheduled to watch for new rows, the product should be ready to upload when the scenario is triggered.

Hi @mszymkowiak, thanks for the feedback.

I’m struggeling with 1 more problem: how to update the parent id (at all the variations) in the spreadsheet, the row is always different.

I find this topic on make: Google Sheets: Lookup Row, Lookup Column then Update Cell. But here, the row is always the same.

I got 1 parent id, and 10+ sizes.

*You always need the parent-id for the variantions to link them to the parent.

So i think route 2 need some modifications, but i don’t know how to.

  1. Route 2:
    4.1. FILTER: Is Variant: TRUE
    4.2. Variant need the Assigned Parent ID by update a row
    4.3. Create product variation

Today I looked further and came up with the following. Unfortunately, my Make knowledge does not extend further and I hope someone can supplement it.

I have a Woocommerce module that searches for the parent ID.

Then an advanced search row with the formula:
select * where CW = '{{}}'

that searches for the parent ID.

After this, I want to do a bulk update row to give all children the parent ID (this is needed to link later within Woo). However, I don’t have enough knowledge to set up FUNCTIONS correctly.

Am I on the right track this way? @mszymkowiak