WooCommerce Update Product with several dynamic images

Hello,

if I update a product ‘manually’ with the Product node and set 2 or 3 images, it works.


Now how would I load images from the database and update products?
Some products have 1 image, some others might have 5 or more to update.

Hey @Chris7935,

Did you try passing the values for the Image fields via the Expression? Does that replace the previous image?

The node will replace the current images - which is the correct behaviour in my case.

I haven’t tried expressions (since I’m not certain how).

You can get the image data from your database and get the expression from the Variable Selector. If you have not used expressions before, I would suggest you go through the documentation and try building one of these workflows: Create Your First Workflow | Docs

You will get an idea on how to use expressions :slight_smile:

Thanks.
I know that I can do this (have done it).
I just don’t know how it works with multiple image files to WooCommerce.
Probably I need a function node first to transform data?
Does the Update Product node then allow to use expressions for an array inside one image record?

I am certain if passing an array to the field would work. Since the fields are expecting a string value and not an error, you might get an error. In this case, it is better to use the HTTP Request node.

@RicardoE105 can you please confirm this? :slight_smile: