AppsScriptPulse

Bring Your Data to Life: Smart Chip Read/Write Support Comes to the Sheets API

Last month, we introduced the ability to take basic actions to create and modify tables via the Google Sheets API. This week, we’re expanding the API functionality to include the ability to write and read file and people smart chips.

Following last month’s update for tables, it was recently announced that the Google Sheets API now allows developers interact with the file and people smart chips. This update provides developers with direct access to manage these types of smart chips, which were previously only available through the user interface. For detailed documentation and code snippets on implementation, refer to the official Google Developers support page.

Here is a quick overview of what you can do:

  • Reading Smart Chips: You can retrieve data for all smart chips within a cell. The API response will detail the properties for chipped sections of text and will also identify the plain text sections of the cell. As noted in the documentation to get the chip’s display text, you must request the formattedValue.
  • Adding Smart Chips: You can now insert smart chips for people and files into cells.
    • People Chips: These can be created to link to an individual using their email address. You can also specify the display format for the person’s name.
    • Rich Link Chips: These can be used to create a chip that links to a Google Drive file. Note that writing these chips requires your application to have at least one Drive OAuth scope.

In the feature image above you can hopefully see how a recruitment tracker could be created and read. In the example people chips are used for the ‘Applicant’ and ‘Interviewer’ columns, providing immediate access to contact information. A file chip is used in the ‘Resume’ column to link directly to the candidate’s document in Google Drive. A developer could automate this entire process. For instance, a script could be triggered when a new application is submitted, automatically adding a new row to the tracker complete with the relevant person and file chips, streamlining the entire recruitment workflow.

For those using Google Apps Script, these new functionalities are accessible via the Google Sheets Advanced Service. This update provides better methods for managing smart chips in Google Sheets.

Source: Support for file and people smart chips now available with Google Sheets API

Leave a Reply

Your email address will not be published. Required fields are marked *