Best answer

Repeated process: WooCommerce & SKU Varients

  • 9 February 2021
  • 2 replies
  • 108 views

Userlevel 1

Hi Expert, 

i work on a Zap which when woocommerce create a product → search a folder in google drive (i use the sku number as foldername, create it if cant not find) → save the product image into that folder.

 

i think it is not a difficult zap, however, due to the product nature, one SKU may has 5-10 variants, they will be arrange as, for example

SKU: 10131

Variant: 10131-1, 10131-2, 10131-3, 10131-4, 10131-5, 10131-6, 10131-7, 10131-8, 10131-9, 10131-10

 

my original wish is to create a folder which can store up all the image under a folder name in SKU.

The outcome is, Zapier will create 1 folder first, name 10131, it has a zip file with all the image inside (which is what i need), but on the otherhand, they zap will repeat on every variant, create its own folder and save its own image in the google drive like below….. Also it will consume my no of task for 10 times…...headache...

 

i just want to keep the first folder which has all the image inside and then stop the loop on every variant??

thanks!!

icon

Best answer by GetUWired 9 February 2021, 14:37

View original

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

2 replies

Userlevel 7
Badge +12

Hi @louis kwok 

My first instinct would be to split the sku numbers coming through by the - and return the first field. Then you will only be looking for the main folder when uploading. You can split the field using Zapier’s Formatter action.



Alternatively, it may be possible to just use the SKU and not the variants field and then upload the images. But I would need to see screenshots of how your Zap is configured and how the data is being returned from WooCommerce to determine more. 

Userlevel 1

Hi GetuWired, 

 

Sorry for my late reply, i try to follow up with your suggestion, it seems that it works on the surface, it will create one folder and the rest of the photo will store up into the folder, i have created another example for testing and the result will look like this

 

SKU: 10134

Variant: 10131-1, 10131-2, 10131-3, 10131-4, 

 

 

there will be one zip file with all the image i want plus individual image of all variants. Also it will count it as 5 times of my zap run but not 1 time.

 

i think that the mechanic is when i run the product creation in woo commerce, it has already count me the number of variant and so Zap will run the number of time same as variant.

 

Here below are my setting, so may i seek your advice to on how to set 1 folder with all variant image and only run for 1 time of zap?? thanks

 

For split text

 

Next step, search the google folder and if not found, create it 

 

upload the image to specific folder (the file is the image src from woocommerce , it is the image of all variants)

 

thanks!!