Boolean API Endpoint Issues

OK, I’ve been playing with this for some time now.

I have an external application (CRM) that is trying to sync it’s data with my bubble app. Two of these fields are Boolean and in the payload the data is sent as a 1 or 0.

However, with everything else I can simply select “field = request data field” but with a Boolean this is not possible. It wants more and I have gone through every single option and tested and I am unable to set the field based on the data.

The only option that I can conceive of is creating multiple conditional actions based on the payload for that field.

That just doesn’t seem right to me.

Am I missing something obvious or are the Bubble endpoints unable to accept Boolean values.

Thanks in advance :slight_smile:

Sadly, you will need to set conditions. A normal boolean should be true or false, not 1 / 0.
Do you use api connector or API Workflow?
If yes, you can always try to set the type of field to Boolean but not sure that Bubble will convert this correctly.

Is Bubble identifying the payload as a number or a text?

If “field” is Bubble boolean type, then “field = request data field’s (number or text) is 1” should convert it to a usable Bubble boolean (yes or no)

3 Likes

I did try this and just wouldn’t work.

I will jump on it again when I get chance in the next few days :slight_smile:

Did that work?

I have a boolean in an API that is true/false, but Bubble deals with Booleans as yes/no, how can I adjust for that?

The only way I thought of is creating several actions with different hardcoded true/false and then adding only ifs based on states on the choices in the UI. But if we have 4 buttons, then that’s 16 actions with different combinations, there must be a better way no?