API GET using Google Sheets function

As is known, AppSheet still doesn't have its own feature or function to make API calls in order to return content to the fields. Normally, this is done by making a call to a Google Apps Script through a Bot, where this script makes the API call and writes the returned data using the AppSheet API itself.

In the example below, I will use an API that returns address information from a ZipCode used in Brazil.

To make a GET API call while filling out a Form, you can use the Google Sheet IMPORTDATA(url) function, which must be resident in the worksheet. Below is an example that uses the public API to fetch the string with address fields from the zip code entered in another cell:

RBTAndrade_0-1644087701760.png

In the Form, you can use a Detail type form with โ€œQuick editโ€ and create an Action of type โ€œApp: Go to another view within this appโ€ to force data synchronization: LINKTOVIEW("view name")& "&at="&(NOW()+1)

RBTAndrade_1-1644087757540.png

PS: "Busca CEP" is "Search ZipCode" in Portuguese.

Thus, after fill the field that will be used by API GET call, you can just hit the Action to get data updated:

RBTAndrade_2-1644087816658.png

 

 

 

8 4 802
4 REPLIES 4

I am looking for this solve ! Could you please help me explain more detail about how it work ?

Boa tarde @RBTAndrade tudo joia? Vocรช tem o app funcionando para compartilhar conosco?

Se vocรช colocar o campo como address o appsheet faz isso automaticamente 

Certo, muito obrigado.

Top Labels in this Space