API works with Initialize but not properly from WF

I have set up an API in API Connector that creates a product on Shopify. I have encountered a possible Bubble bug. As a test, all the values (except the product title) is hard coded, including options, variants, and images which are json lists. The product with the options, variants and images is created properly when I initialize the API. The same values also work in Postman. But when I call the API from a WF, the product is created but the options, variants, and images are missing on Shopify. I have created a bug report. But has anyone encountered this similar issue?

Remove quotation marks around your "<dynamic variables>" and inside the API call in the workflow use :formatted as JSON-safe as any newlines, quotation marks will break your API call otherwise.

There is no value that needs to be JSON safe. All the values are hard-coded in the API Connector.

It works when I initialize. Images, options, and variants are created properly.

When I call the API form a WF, images, options, and variants are not created.

Okay, but the second you unprivate them, you’ll run into further bugs.

Change the request URL from Shopify to a webhook catcher at webhook.site, and you’ll see the request payload and be able to debug.

Thanks for the suggestion about the the site.

I set the output to nothing. When I initialize, there is an entry on the site. When I run it in WF, API seems to be called according to Bubble log, but nothing happens, ie. no entry on the site.

I think we’re having the same weird problem, I just made a post as well

I encounter 2 issues. :sweat_smile:
When I call an API to webhook.site from WF, the site doesn’t receive anything.
When I call a Shopify API from WF, it seems that some data are not passed to the API.
At least, I am not the only one. :rofl:

Is the API call successfully initialised at the point you’re running it in a workflow?

The API is initialized successfully. I have tried both Empty and Text data type.
I did make a mistake. I didn’t call the right API.
After calling the correct API, webhook.site did get a request from the WF API call. I can see that Bubble is not passing some values (options, variants, images) as suspected when calling from WF.

Uncheck allow blank

Yes, uncheck allow blank and it should work.

When we leave a parameter as Private and Allow blank checked, Bubble only uses the example value at Initialize time; when executing the workflow, it sends null.