Forum Documentation Showcase Pricing Learn more

Saving Address into the Database

Hello fellow Bubblers,

I am using an API to POST data into Bubble and am unable to save a Bubble geographic address.

Here is what I am doing:
Using a workflow, I am concatenating street, city, state code zip code, USA into a text field
image

Then using the result above in another workflow with a 5 second delay and inserting into a Bubble geographic address field.
image

However the result of this leaves my geo field null.

I’ve validated that my address value is correctly formatted by hard coding the same address into the geo field and it works.

Does anyone know how to insert geographic values into the database via an API?

If your second workflow is in the API Workflow tab you need to do a search for boats:first item and constraint to boats address shown above.

Also, make sure access to API from your app settings is enabled.

Hi @Codeables,

Thanks for replying to my question.

I tried as you suggested by doing a search for the object. No luck.

The issue doesn’t seem to be in finding the object but rather in the address format.

When I hard code the same address that’s generated in step 1 it works fine. However, when I make this into a dynamic reference to the same field it doesn’t work.

I don’t mind checking with you to help. Send me a PM if you would want that.

Did you find an answer for this? I’ve got the same problem.

Yes. So there are two things happening here.

First is the actual address format. It needs to be concatenated to the format Bubble (or Google?) wants:
Street, City, State Code Zip Code, USA

Second, and in my case since I’m using the API, I took a look at the error logs and found an error from Google. The Google API won’t accept an http referrer as a restriction and tells you to use IP address restriction.

However, Bubble does not provide a static IP or range for us (unless you’re on a dedicated plan). Basically, you have to have no restrictions on your Google API credentials to allow for this to happen. Which is not ideal.

This post contains instructions from Bubble without API restrictions:

I just confirmed it works by swapping out API keys to one without restrictions and the address correctly appears in the DB.

Thanks. This worked for me. I was looking for answers about “geographic address” so I missed the post about “Google MAP error”. Hopefully others don’t need to get stuck in the same place.