Google Street View auto populate iframe in rich text

We have a standard address field in a custom object and can manually geocode an iframe into a rich text field to display the Google Street View of said address.

The challenge is that the Street View API requires lat/long geocode instead of address, so in order to automate this, we need 3 steps:

  1. Send the address to the Google Geocode API and wait for it to return the lat/long geocode
  2. Use the geocode that Google returns to request the street view from the Google JavaScript API
  3. Post the results as an iframe in a rich text field

The first step can be done as an HTTP request or as an API call.

The part that I am stuck on is setting it up in Knack to catch and parse the geocode response and then post the results as a variable in the rich text field.

Another option would be to trigger a request on form submit or field update and then store the geocodes in a hidden text field for use as variables below. 


Here is the code that goes into the rich text field, variables in bold. This is all that would be necessary if not for the need to change the address to geocode:

<iframe width="600" height="450" frameborder="0" style="border:0;" 
src="[Google API Key]&location=[Latitude],[Longitude]" allowfullscreen="">

Hey James
did you ever get anywhere with this? I am trying to embed a Gantt chart into a client’s Knack platform but have the same stumbling block - a RT field can’t accommodate variables / field values.