GET API Call with Dynamic URL Executing Regardless of Conditions

Hey guys, running into a strange issue… not totally sure if it’s a bug or not.

I have a Twilio API call pulling usage for a SIM card from a given date, where the parameters are passed in the URL. I’m populating the URL with dynamic values using the method below:

I have a workflow action assigning the results of this API call to a Bubble variable, only under the conditions seen below:

Twilio%20Get%20Usage%20Workflow

However, the action seems to be executing this GET call even when the condition is not true. So if the SIM card is not Twilio, the parameters for the API call are not populated, which makes the URL incomplete, throwing the following error:

Workflow error - Raw error from Twilio - Get Usage: {“code”: 20404, “message”: “The requested resource /Sims//UsageRecords was not found”, “more_info”: “Not Found | Twilio”, “status”: 404}

Any ideas? Should Bubble be attempting the call even when the condition is not true? Thanks.

This is currently by design, all properties, including condition are evaluated at once.

Ok, have any ideas for a workaround? First thought is to break it out into an API workflow and only schedule it if the conditions are true, but I’m not sure how the ordering/timing works when scheduling multiple workflows in a row, maybe you could clarify? Thanks @emmanuel

Sorry, let me clarify with an example…

I want to pull the Twilio usage before I calculate a total charge for a user.

If I schedule these both for the scheduled date “current date/time”, will the total_charge workflow wait to start until the total_twilio workflow is finished?

Twilio%20Flow

@emmanuel , is this only true for API workflows? I used a similar conditional statement on a page workflow using an API call involving URL parameters (still Twilio) as data, and it seems to be moving past that step just fine when the condition is not true.

Twilio%20API%20Workflow

Untested idea … put the API call into a custom event, which gets called conditionally, Its a bit of a hassle passing parameters though.

Yep, that’s what I’m doing now. Thanks for the tip

Can I assume this worked?