Google Maps Platform
Google Maps Platform (billed per call, cheap default field masks, never retried after an unknown outcome), Places (New) text and nearby search, details, autocomplete, photos, Geocoding v4, Routes routes and matrices (agent matrices capped)
Beta v0.1.0 Node.js 9 actions
About
A Graphrt plugin for three Google Maps Platform APIs with one API key: Places API (New), Geocoding API v4 and Routes API. Every operation is a workflow node and an agent tool.
What it can do
- Places: search_text (text query with type, open-now, rating, price and location filters, paginated with limit/cursor), search_nearby (types within a radius), get_place (details by id), autocomplete_places (predictions with session tokens), get_place_photo (a short-lived photoUri for a photo name)
- Geocoding v4: geocode_address, reverse_geocode
- Routes: compute_routes (distance, duration, optional alternatives, intermediates, avoid tolls/highways/ferries), compute_route_matrix (every origin-destination pair, billed per element)
Actions
Each action is a step you can add to a workflow. Agents can also use most of them as tools.
- Search places by text
google-maps-platform.search_text - Search places nearby
google-maps-platform.search_nearby - Place details
google-maps-platform.get_place - Autocomplete places
google-maps-platform.autocomplete_places - Place photo URL
google-maps-platform.get_place_photo - Geocode an address
google-maps-platform.geocode_address - Reverse geocode
google-maps-platform.reverse_geocode - Compute a route
google-maps-platform.compute_routes - Compute a route matrix
google-maps-platform.compute_route_matrix
Settings
Graphrt starts plugins with a clean environment. Only these values reach the plugin, and secrets stay out of logs.
-
GOOGLE_MAPS_API_KEYRequiredAPI key, sent as the X-Goog-Api-Key header (never in the URL) -
GOOGLE_MAPS_TOOL_MAX_MATRIX_ELEMENTSOptionalMost elements (origins x destinations) an agent may request in one compute_route_matrix call (default 100) -
GOOGLE_MAPS_TOOL_ALLOW_EXPENSIVE_FIELDSOptional1 lets agents request any field (*, rating, phone, website, opening hours, reviews, photos, ...) in search_text, search_nearby and get_place, without it agents get Essentials/Pro fields only
How to use it
In Graphrt Desktop
- Open Plugins and search for Google Maps Platform.
- Click Install and approve it.
- Follow the setup steps on the plugin's page, then paste the settings it needs.
- Describe a job that needs it, and the builder adds the steps.
With the CLI
terminal
$ graphrt plugin install google-maps-platform workflow.yaml
- id: places
type: google-maps-platform.search_text
text_query: "nasi goreng near Blok M"
open_now: true
field_mask: "places.id,places.displayName,places.formattedAddress,places.rating,nextPageToken"
limit: 10
- id: route
type: google-maps-platform.compute_routes
origin: { address: "Blok M, Jakarta" }
destination: { placeId: "{{#places.data.0.id#}}" }
travel_mode: TWO_WHEELER