Forum Academy Marketplace Showcase Pricing Features

Add new products from Shopify API & update existing

I have a backend workflow setup to create products from Shopify’s API if they are new (i.e. Product ID is not already in my DB). This step work fine.

But I then want a 2nd step in the workflow which says if the product already exists in Bubble DB (using the Product ID as the identifier) and it has been updated in Shopify (using the Updated At field returned in the API), then update it. I can’t get this second part to work properly.

Where am I going wrong?

Hi there, @wrightj2… if I am seeing things correctly, you are trying to make changes to the result of step 1, but step 1 doesn’t happen if the product already exists. Shouldn’t the thing to change in step 2 be a search for an existing product?


Like this you mean?

And then add and AND statement to that Only when condition that says if updated date is > than the one in the DB?

You are still making changes to the result of step 1.

Think I’ve almost got it. This seems to work.

Assume I now change that Only when condition to deal with the only when updated date is > the updated date in DB?

Sounds right to me.

1 Like

OK thanks Mike.

1 Like