google-sheetsgoogle-apps-scriptgoogle-sheets-apigoogle-apps-script-api

How to Extract Both Name and Link from Google Sheets Smart Chip (Place) Using Apps Script?


I am working on a Google Apps Script to extract and transform data from a Google Sheet. One of the columns in my sheet uses a smart chip of type Place, which allows users to search for and insert a Google Maps location into the cell.

When I try to extract the data using getValues() or similar functions in my script, I only get the name of the place as a string. However, I need to extract both the name and the associated Google Maps link for each cell.

Is there a way to retrieve the Google Maps link along with the name from these cells using Google Apps Script?

Using getValues() and getDisplayValues() only returns the name of the place.

Attempted getRichTextValues() to see if there is any associated metadata, but it also seems to return just the name without a link.


Solution

  • The Feature is Not Yet Available

    As of the writing of this answer (January 7, 2025), there is a pending Issue Tracker Post which is a feature request related to this post. I suggest hitting the +1 button to signify that you also have the same issue/request.

    Also, according to the latest comment (#106):

    From the product team:

    Would be really useful to understand at least a few specific use cases businesses might have for building automation on top of Smart Chips. Any examples?

    Please share here or at https://forms.gle/XQYP6NxTVp9pPkqm6.

    I advise that you submit an entry to the form as well as I believe the team handling the Issue Tracker Post is gathering more information.