Skip to content

Integrations

Google Maps Platform connector

Address autocomplete, place details and geocoding with the Google Places API (New): powers the Address autocomplete control on forms and apps, and geocodes addresses in workflows.

Last updated 2 min read Edit this page on GitHub
On this page

The Google Maps Platform connector (google_maps) uses the Places API (New). It powers the Address autocomplete control on forms, task forms and apps, and gives workflows three read-only actions. The API key stays on the UserTasks server: it is encrypted at rest, masked on screen, and never sent to browsers.

Set up in Google Cloud#

  1. In the Google Cloud console, pick or create a project with billing enabled.
  2. Open APIs & Services → Library, search for Places API (New) and click Enable. The legacy "Places API" is not used.
  3. Open APIs & Services → Credentials → Create credentials → API key.
  4. Click the new key and restrict it:
    • API restrictions → Restrict key → Places API (New) only.
    • Application restrictions: IP addresses with your UserTasks server's outbound IP addresses (self-hosted), or None on UserTasks Cloud. Don't use HTTP referrers (websites): the key is used by the server, not by browsers, so referrer checks would block it.
  5. Set quotas (APIs & Services → Places API (New) → Quotas) and a budget alert, so a busy public form can't run up a bill.

Add the connector#

  1. Go to Integrations → Connectors and choose Google Maps Platform.
  2. Paste the key into API key.
  3. Optionally set the options below, then click Test connection. The test runs one address autocomplete call. A 403 means the key is wrong, Places API (New) isn't enabled, or the key's API restrictions don't include it.
SettingWhat it does
CountriesISO 3166 two-letter codes, comma separated (US, CA). Only addresses in these countries are suggested. A field can narrow it further.
LanguageBCP 47 code (en, en-US, fr) for suggestions and addresses.
Location biaslatitude,longitude[,radius in metres]: results near this point come first. Results elsewhere still appear.
SuggestStreet addresses (default), addresses and places, or businesses (Google).

Billing and sessions#

Each pick in the control is one session: the browser makes a session token, the server sends it on every autocomplete call and on the Place Details call that ends the session, and Google bills them together. Place Details asks only for address fields (id, formattedAddress, addressComponents, postalAddress, location), so it uses the Essentials price. Suggestions are only asked for after 3 characters and a short pause in typing.

Attribution#

Google's terms require Google attribution when predictions are shown without a Google map. The control shows powered by Google under the suggestions whenever this connector answers.

Workflow actions#

ActionWhat it doesInputs (* required)
Address AutocompleteSuggestions for partly typed text (Places Autocomplete). Pass the same session_token to the Place Details call that follows so both bill as one session.input*, session_token, region_codes, language, included_types
Place DetailsThe address of a place id (formatted address, components, postal address, location). Ends an autocomplete session when given its session_token.place_id*, session_token, language
Geocode AddressAn address or place name to coordinates and a normalized address (Places Text Search; the first match). places[0].location has latitude / longitude.address*, max_results, region_code, language

Geocode an address in a workflow: add a Call API reference step with Google Maps Platform: Geocode Address, address = {{task_data.location}}. The coordinates are {{<step>.places.0.location.latitude}} and .longitude. An Address autocomplete field already stores them: {{task_data.location_address.lat}}.

Was this page helpful?