I’m trying to build a script that processes data from a Google Spreadsheet. My sheet has a column with Place smart chips where users can add Google Maps locations by searching.
The problem is when I use standard methods like getValues() in my Apps Script code, I only get back the location name as text. But I really need both the place name and its Maps URL for my project.
Has anyone figured out how to get the Maps URL from these Place chips using Apps Script? I’ve already tried getValues() and getDisplayValues() but they just give me the place name. I also tested getRichTextValues() thinking there might be hidden link data, but no luck there either.
Any ideas on accessing the full chip data including the URL?
Unfortunately this is a known limitation with Google Sheets smart chips. The underlying data structure doesn’t expose the Maps URL through the standard Apps Script methods you’ve tried. I dealt with this same frustration last year when building a location tracker for our company events. One approach that saved me time was using the place name to construct a simple Google Maps search URL instead of trying to get exact coordinates. The format Google Maps works surprisingly well and handles most location queries effectively. You just need to URL encode the place name properly. This method bypasses the need for additional API calls and quotas while still providing functional Maps links. It won’t give you the exact same result as the original smart chip would link to, but for most practical purposes the search-based URLs work just fine and users end up at the right location.
I ran into this exact issue a few months ago and unfortunately there’s no direct way to extract the Maps URL from Place smart chips through Apps Script. The chips are essentially just display elements that reference Google’s internal place database without storing the actual URL data.
What worked for me was implementing a workaround using the Geocoding service in Apps Script combined with manual URL construction. I extracted the place names using getValues(), then used Maps.newGeocoder().geocode() to get the coordinates. From there you can build the Maps URL manually using the format: Google Maps
It’s not perfect since you lose some of the specific place ID information, but it gets you functional Maps links. The geocoding approach worked reliably for about 95% of the locations in my dataset.
hmm i think the place chips dont actually store the full google maps url internally - they’re more like references to google’s place database. maybe try using the Places API instead? you could extract the place name from your sheet then query the API to get coordinates and build the maps url yourself. bit of extra work but might be your only option here