Follow these steps to use Builder Fusion with the Google Places API. The pattern is the same if you want to connect other external APIs to update values in your project.
- Open your project in Builder Fusion.
- Identify the field you want to update; for example, a rating value.
- In the Design tab, select that field.
- Prompt Fusion to update the field with data from the Google Places API.
- Ensure your Google Places API key is stored in the project’s environment settings.
- Run the update. Fusion makes the API call and retrieve the value.
- Confirm the field updates to match the data returned from Google Places.
This video shows an example of using Builder Fusion to connect to an external API. The demo uses the Google Places API to update a hotel rating, but the same approach works for any field you want to populate dynamically.
0:00 So here I am in my Sundrift, my luxury hotel booking demo app. I built it with Fusion. In here you'll see we have these luxury stays of the month.
0:10 I've hardcoded all these in. And what I want to specifically go to is just show you that this rating we see for the surf rider, it's at a 4.9.
0:19 So what I'm going to do is I'm going to make a call to the Google Places API. And update that.
0:24 So I'm going to ask Fusion. I'm first going to go into this design tab. I'm going to grab that 4.9 and I'll say update this rating with the Google Places API rating for this hotel.
0:46 Use my API key, Google Places API key in the environment settings for the call. Okay. And so what I'm referring to is if we go into the project settings here, I have, if we scroll down a little bit, I have the Google Places API here stored.
1:12 So it's going to use that, and we'll see what, how it goes about it. let's see what Fusion did. So, retrieved it, got the variable, and if If you look in here, it's updated it to the 14th.
1:31 4.5, and if we go over to the Surfrider Hotel Malibu, we'll see it has a 4.5 here in Google. So it's showing you just how, you can call to external APIs using Fusion,