AppsScriptPulse

Google Workspace Developer News: Google Chat features, Workspace Admin Policy API, and More!

Chanel Greco is back with more exciting news for Google Workspace developers in the latest Google Workspace Developer News video. As always Chanel is able to pack in lots of detail in under 4 minutes, and if you prefer text over video here are the highlights!

Spreadsheet Class Gets a Boost:

The Apps Script Spreadsheet class has received a handy new method: getSheetById(). This allows developers to directly fetch a sheet within a spreadsheet using its unique ID, simplifying sheet management within scripts.

Transparency for Calendar Events:

Developers can now control the transparency of Google Calendar events programmatically. The new functionality allows setting an event as TRANSPARENT (showing the calendar as Available during that time) or OPAQUE (showing the calendar as Busy). This granular control enhances calendar integration and automation possibilities.

Deprecation Notice:

While new features are welcomed, it’s also important to note deprecations. The getUrl() method for CellImageCellImageBuilder, and OverGridImage classes within the Apps Script Spreadsheet service is now deprecated. This change reflects the fact that an image’s source URL isn’t consistently accessible regardless of the image insertion method.

Workspace Policy API Goes GA:

A significant announcement for Workspace administrators is the general availability of the Workspace Policy API. This API enables programmatic access to over 60 Google Workspace Admin settings, making auditing and monitoring the Workspace environment more efficient.

Open-Source Drive Picker on NPM:

The Google Drive Picker web component has been published to NPM, making it easier for developers to integrate the Google Picker API into their web applications. This open-source component, designed as a reusable custom HTML element, simplifies the process of adding Google Drive file selection capabilities to web projects.

Chat App Enhancements:

For developers working with Google Chat, there are several exciting updates, primarily available through the Developer Preview Program. These include:

  • Quick Commands: Users can interact with Chat apps more quickly and efficiently using quick commands, which invoke the app directly without requiring slash commands or additional input.
  • AppCommandPayload for Slash Commands: Chat apps built as Google Workspace Add-ons now utilize AppCommandPayload instead of MessagePayload for handling slash and quick commands.
  • Carousel Support: Chat apps can incorporate carousels to display scrollable collections of items, further enhancing the user experience.
  • Announcement Space Management: Developers can programmatically create announcement spaces and manage space permission settings using the Chat API with App Authentication.
  • Expanded UI Widget Library: More Google Workspace Add-on UI widgets are now available for Chat apps, providing developers with a richer set of tools for creating interactive experiences.

Stay Up-to-Date:

To learn more and explore these features in detail, visit the Google Workspace Developers YouTube channel and check the video description for links to relevant documentation.

Source: Update to Apps Script’s Spreadsheet class, new Workspace Policy API, and more!

Granular OAuth consent in the Apps Script IDE: Workspace Add-on Devs should take note

Starting today, the OAuth consent screen will now let users specify which individual OAuth scopes they would like to authorize. For example, if a script requests access to a user’s Sheets and Forms files, and the users only intends to use the script with Sheets files, they can decide to only allow access to their spreadsheets and not their forms. This affords users the benefit of more granular control over what data their 3P applications are allowed to access.

Exciting news for Apps Script developers and users! Google has taken the first step towards more granular control over OAuth consent in Apps Script. This means users can now choose exactly which services their scripts can access, leading to a more secure and transparent experience.

What’s New?

Previously, when running a script that required access to multiple services (like Google Sheets and Forms), users had to grant permission to all or nothing. This all-or-nothing approach could make some users hesitant to use scripts, especially if they were only comfortable granting access to a subset of the requested services.

With the latest update, the OAuth consent screen now allows users to authorize individual services. For instance, if a script needs access to both Google Sheets and Forms, but the user only intends to use it with Sheets, they can simply grant access to Sheets and deny access to Forms.

This change is currently being gradually rolled out to the Apps Script IDE, with expected completion by January 24, 2025.

Enhanced Security and Transparency

This granular control over OAuth consent is a significant step towards improving the security and transparency of Apps Script. Users now have more control over their data and can make informed decisions about which services they want to allow their scripts to access.

This change also benefits developers, as it can help build trust with users and encourage wider adoption of their scripts.

A Glimpse into the Future: Chat Apps and Workspace Add-ons

While currently limited to the Apps Script IDE, this granular OAuth consent model will eventually be implemented in other Apps Script surfaces, notably Chat apps and Workspace Add-ons. This has implications for developers working in these areas.

For Chat app and Workspace Add-on developers, this means it’s time to start thinking about how this granular consent model will impact your development process and user experience. You can start experimenting with the new methods added to the ScriptApp and AuthorizationInfo classes to programmatically handle different consent scenarios.

Digging Deeper: AuthorizationInfo

To help developers manage these granular permissions, Google has introduced the AuthorizationInfo class. This class provides methods to check authorization status, retrieve authorized scopes, and even generate authorization URLs. Here’s a quick look at some of its key functionalities:

  • getAuthorizationStatus() : This method allows you to determine if a user needs to authorize the script to use one or more services.
  • getAuthorizationUrl() : This method returns an authorization URL that can be used to grant access to the script.
  • getAuthorizedScopes() : This method returns a list of authorized scopes for the script.

These methods give developers fine-grained control over the authorization process, enabling them to build more robust and user-friendly applications. Google have already published a great developer guide on how to Handle granular OAuth permissions.

Learn More

To learn more about this update, be sure to check out the official announcement provided in the source link.

Source: Granular OAuth consent in Google Apps Script IDE executions

Google Workspace Developer News: Google Chat enhancements and more!

The latest Google Workspace Developer News brings exciting updates, particularly for Google Chat. If you are in the Developer Preview Program there are a number of updates including the ability to build Google Workspace Add-ons that include Google Chat apps, simplifying app creation and reducing the need for separate Chat apps. This will hopefully simplify the installation process for admins and end-users, providing a more seamless experience.

Another helpful update allows the creation of group chats in import mode when migrating to Google Chat from other platforms, facilitating a smoother transition. Additionally, developers can now get or update users’ Google Chat space notification settings and list custom emojis through the Chat API, offering greater control and customisation.

The Calendar API has been enhanced, now providing access to birthday and other special events and enabling the differentiation of regular events from other types using the Apps Script Calendar service.

For detailed information and links to relevant documentation, be sure to check the video description on YouTube.

Source: Update to Calendar API, Google Workspace Add ons that extend Google Chat, and more!

Google Workspace Developer News: Google Sheets supports smart chips for link previews, Update to Chat API, and more

Chanel Greco is back with Episode 12 of the Google Workspace Developer News. An exciting update is that Google Sheets now supports smart chips for link previews to third-party resources. This now allows developers to create Google Workspace Add-ons that can pull information from their app directly into Sheets.

Other updates include:

  • The Chat API can now create announcement spaces and read/update space permissions.
  • New widgets for card-based Chat app interfaces are generally available.
  • Chat API Space & Membership management with App Authentication is available for Developer Preview Program members.
  • The Chat API can manage custom emoji when enabled for a Workspace organization.
  • The Meet Add-ons SDK can now retrieve the meetingCode property of an ongoing meeting.

More details including links to the documentation are included in the YouTube description.

Source: Google Sheets supports smart chips for link previews, Update to Chat API, and more!

Attention Google Workspace Admins and Developers: New Google Workspace Admin Console API (Policy API) and GAM access

Google recently announced an open beta of the new Policy API. This new API now means developers can read a number of Google Workspace Admin settings programmatically, including those applied at an OU and group level.

This API provides access to the settings that are part of the recommendations published in CISA’s Google Workspace secure configuration baseline, with plans to increase the coverage and functionality of the API.

Additionally, GAM7, the recent merge of GAM and GAM-ADV, has been updated with the ability to read policy data, further streamlining policy management tasks.

You can read more about Audit security settings using the Policy API, now available in open beta and Announcing new policy commands in GAM 7.00.27

Calling all Google Workspace Developers! Your feedback is needed

Steven Bazyl, Head of Google Workspace Developer Relations, recently distributed a survey aimed at getting feedback on the Google Workspace platform. This is your chance to influence the future of the platform.

The survey is short and focuses on key areas like:

  • Overall satisfaction with Workspace Platform as a development environment
  • Your experiences with specific Workspace components (Meet, Chat, Gmail, Drive, Editors)
  • The biggest challenges you face in Workspace development
  • Your suggestions for improvements

By sharing your insights you have an opportunity to help shape the platform to better meet your needs and make your development workflows more efficient. I would encourage you to complete the survey (it only takes a few minutes) and share with other Google Workspace developers.

Don’t miss this opportunity to make your voice heard as this is the final week that the survey is open!

Survey link: Complete the Workspace Platform Developer Survey
LinkedIn post: Google Workspace user group post

Google Workspace Developer News: Create and organize Docs with the new ‘tabs’ API methods and more

A slightly shorter Google Workspace Developer News episode this month from Chanel Greco (Google Workspace, DevRel). New features for developers include using the Google Docs API or Apps Script to create and organize documents with tabs. Google Meet Add-ons now have the ability to end collaborations programmatically. Google Chat apps have expanded card interface features, such as Material Design buttons and ChipList widgets.

Lastly, developers are encouraged to use Cloud Client Libraries when calling Chat API for improved efficiency. You can find out more about all these updates by following the source link.

Source: Create and organize Docs with tabs, more card interface features for Google Chat, and more!

Google Workspace Developer Preview Program: New Card UI in Chat

You can apply to join the Google Workspace Developer Preview Program to get early access to certain features. Features in developer preview have already completed early development phases, so they’re ready for implementation. This program gives you the chance to shape the final stages of feature development with feedback, get pre-release support, and have your integration ready for public use on launch day.

The Google Workspace Developer Preview Program (DPP) gives you early access to new features. If you are developing Google Workspace products and solutions, it’s a great way to stay ahead of the curve and provide feedback before feature release. Anyone can apply to join the DPP, just follow the source link, but note that you can’t enroll with a gmail.com account.

New Google Chart Card UI has just been added for buttons, chips, collapsible sections, and overflow menus. These additions extend the capability of Google Chat, allowing the possibility for users to interact with external tools and services without leaving the chat and continually having to context switch.

The public documentation page includes a list of all active developer previews. While these pages don’t offer visuals of the features, existing DPP members received a nice set of visuals in the email update. This example includes chips and a customizable control button for a collapsible section:

I’d highly recommend registering for the DPP so you can see what is coming in Google Workspace.

Source: Developer Preview Program  |  Google Workspace  |  Google for Developers

Google Workspace Developer News: Updates to Tasks API, Chat API, new allowlist feature for Apps Scripts, and more


I’m continually blown away by how much information Google Developer Advocate Chanel Greco squeezes into the Google Workspace Developer News video updates. It’s also great to see the continued development of features and services Workspace developers can use. This video covers a number of updates including:

  • Using the Tasks API to manage tasks assigned from Google Docs or Chat spaces.
  • The general availability of multiselect menus and columns for Google Workspace Add-ons.
  • Using the Chat API to make a Google Chat space discoverable to specific users within an organization by creating target audiences.
  • Authenticating Chat app requests using Cloud Functions, Cloud Run, or an App URL ID Token.
  • Importing spaces from other messaging platforms and allowing external users to join them.
  • The Google Drive API now supports the drive.meet.readonly scope.
  • Google Workspace admins can restrict which URLs Apps Scripts and Sheets can source external content from.

The video description includes all the related documentation links to find out more.

Source: Updates to Tasks API, Chat API, new allowlist feature for Apps Scripts, and more

Join the Google Developer Program: Accessing free credits and services as part of your developer journey

The Google Developer Program gives developers access to a range of new tools and benefits, to allow them to discover and explore all the Google sponsored communities we already offer.

Google recently announced an expansion of the Google Developers Program:

“The program will give developers access to a range of new tools and benefits such as technical assistance from Gemini and allow them to discover and explore all the Google sponsored communities we already offer. Joining is free and open to any developer worldwide.”

One of the headline benefits is when you also join the Google Cloud Innovators program through your Developer Profile, you will get free credits for the Google Cloud Skills Boost learning platform. Your credits will automatically replenish every month, so if you run out you just need to wait a little to continue your learning.

A note for Google Workspace account holders is you may find that your Workspace Admin has disabled the ‘Developer Profile’ service for your domain. If so a friendly email to your support desk might be required, however, given you can collect badges for your Developer Profile you may prefer to create an account with a personal consumer Gmail account.

Follow the source link to find out more…

Source: Introducing the Google Developer Program: Unlock New Opportunities