Retrieve nearest hospital address from a city name

Hello all,

From a Tally form I obtain a city name.
From that city name, i wish to use Make to calculate which hospital would be the nearest and display its address.

I have an issue using the Google APIs, could someone walk me through the steps to exploit this city name and obtain the nearest hospital address ?

Thank you !

Hi @Anne_Colin-seguin ,

Could you, please, add:

  • the screenshot and the blueprint of your scenario
  • the screenshots of:
    → the output bundle of the module before the module having trouble
    → the input data mapping of the module having trouble
    → the detailed information of the trouble.

Best regards,

Philippe

2 Likes

Welcome to the Make community!

Have you set up a connection following this help center article to “Get Google Maps API Key” and then “Establish a connection between Google Maps and Make”?

Using this page for your Google Cloud project (https://console.cloud.google.com/google/maps-apis/api-list), you need to enable the following

  1. You need to enable the following APIs to make all of the Google Maps modules work:

    • Geocoding API
    • Maps Elevation API
    • Time Zone API
    • Directions API
    • Distance Matrix API
    • Map Static API
    • Places API

    Note: To enable these APIs, your account must have billing enabled. You can enable billing at console.cloud.google.com/project/_/billing/enable.

3 Likes

How do you define “nearest”? If a city has 3 hospitals within its boundaries, which one would you define as “the nearest”? Nearest to your home, which has a specific coordinate, or nearest to the center of the city?

2 Likes

You’ll likely just need three Google Maps modules for this:

  • Get a Locationto get city center coordinates
  • Search For Placesto search for “Hospitals” closest to the city center
  • Search For Placesto get the full hospital address using the hospital name

1. Get city center coordinates

Output:

2. Search for “Hospitals”

Output:

3. Get the full hospital address

Output:

1 Like