Skip to main content
← Data, API & Backend
Data, API & Backend February 24, 2022 · 4 replies

Get a record from 1 API, and look for a match into Airtable?

Archived from the Bravo community forum (2021–2026). Some answers may refer to older versions of Bravo.

Good morning, evening, ladies and gents!! Many thanks to the ones who could help. 

My goal is to show informations concerning the city the user lives in.

To do so, I require location on a page by using a French public service with this request:

https://geo.api.gouv.fr/communes?lat=${device.latitude}&lon=${device.longitude}&fields=nom%2Ccode

I obtain -> {nom} and {code}. I can show the result on a page, everything is good.

Then what is the proper request to find info related to this city in my Airtable base?

I look into the table [cities]. There is a column {nom}. But I don’t have the appropriate request. 

Here is what I tried:

  1. https://api.airtable.com/v0/[myTable]/cities/${nom} -> of course 404

  2. https://api.airtable.com/v0/\[myTable\]/cities?filterByFormula=FIND("${nom}",nom) -> works with test value and returns a record in debug section, but returns a list in the app.

  3. https://api.airtable.com/v0/\[myTable\]/cities?filterByFormula=search("${nom}"%2Carrayjoin(nom)) -> works with test value and returns a record in debug section, but returns a list in the app.

    Please, let me know what's the request i should have.

    All the best.
    Brice

4 replies

Brice February 24, 2022

Thank you but it doesn't work.
The container binding this data disappeared in the app. 
I get it. I agree on the logic. But it doesn't work.
I checked typos and everything but i can't find out what's wrong.

Javier Felipe Bravo team February 25, 2022

Hi , the issue here seems to be binding the ${nom} variable of your Airtable request to the information returned by the API where you send the user location. Having a better understanding of how your app is structured would help us find a solution. Feel free to email us at support@bravostudio.app with your Bravo project URL and design file, and we'll try to help :)

Brice February 25, 2022

Hi Javier,
Muchissimas gracias for the offer! 
I'm going forward as much as possible on my own and will send you a more precise description and links.
Thank you very much

Wrote something in this thread and want it removed? Request removal

Still stuck?

Ask the community on Discord

This archive is read-only. New questions, office hours and product updates now happen in the Bravo Discord.

Join the Discord