How to get Shopify Product Variant Image URL

I’ve created a scenario to download primary image of Shopify Product variant and Upload it to OneDrive. I’ve used following modules.

Shopify (Watch Products) >> HTTP (get a file) >> OneDrive (upload a file)

The problem I’m facing is that I’m only getting the product variant image of primary variant. For example, if a product has three color variants, I can export image of only the primary variant, and not getting images of rest of the two product variants.

Can someone please let me know How can I get primary image of all the variants of the Shopify product? Thanks in advance for anyone sparing time to answer this question.

1 Like

Hey Prashant, welcome to the Community!

You’re going to need the advice of a Shopify expert here I think …

@Automate_with_Rezwan or @Amadio_Gabriel have answered some advanced Shopify questions before - can you guys help Prashant?

4 Likes

@Prashant can you send a screenshot of the results from the watch module and also an example results showing the variants?

2 Likes

Sure, @Automate_with_Rezwan. Please see the images attached.

with my limited understanding about this topic, I observed that if a product has two variants, then out of all the image collection, there will be two images which will have variant ID tagged to them. Not sure if there is some way we can use this information to get only those images along with their variant SKU.



@Prashant Can you please also provide a screenshot of the settings of the module which is saving/processing the images?

2 Likes

Hello @Automate_with_Rezwan

I figured out a way to get primary images of all variants by adding an API call to Shopify. I’ve attached the scenario’s screenshot (image-2.1 & image-2.2) for others to whom it may help.

Although it serves partial purpose, but I’ve another requirement where I want to map Variant SKU with variant image URL. Below is the scenario (image-1.1) where I’m adding Shopify product variant details in a spreadsheet and there I want to map Variant SKU with Variant’s primary image URL. Current scenario only gives the image URL of primary variant for all the variants. For example, if there are three variants of a product, scenario is giving image URL of variant-1 for all the three variants. I’m also attaching output bundle of watch products and List Product Variants module.

I need Help here!

image1.1: Scenario to get Shopify product variant primary image URL mapped to SKU in a spreadsheet.

list variant output bundle.pdf (77.7 KB)
watch products output bundle.pdf (277.5 KB)


.
.
.
image-2.1: Scenario to export shopify variant image to onedrive


image-2.2: API call used to get variant images

2 Likes

Hi Prashant,

Firstable i think your iterator should be placed before the product variant API call. On which array (returning by the Watch products module) do you iterate on ? The watch products datas contain an array (named images), it should provide what you want by filtering on the position 1. And then you could get the corresponding SKU with the Product variants API call.

Hope it will help.
Regards.

2 Likes

Thanks @Baptiste_Petrilli, for your suggestion. The scenario worked after I iterated variants and used API call to get the image URL.

1 Like

:clap: @Prashant
I am happy to help :wink:

Regards.

3 Likes