The update brings AI assistance directly to the online Apps Script Editor. Rather than switching between browser tabs to copy code snippets, you can now generate, edit, and debug scripts with the help of Gemini. There is a dedicated Use the Gemini side panel in the Apps Script editor documentation page that includes a number of troubleshooting and best practices tips.
Testing the side panel with container bound scripts it was very useful to see that Gemini had the context of their parent document. For situations like building data processes in Google Sheets, this built-in context saves significant time as it is aware of the headings and existing data. In addition you can also use @drive_url to reference other files.
Less obvious is the option to run a custom Gem directly from the side panel menu. I’ve been experimenting using a Gem as a way of holding some Apps Script development skills. My current iteration is in this shared GASDev Gem.
[Update 06 Aug 2027: At this time it looks like Gems can be used in the Gemini side panel for the Apps Script IDE, but you can reference this skill doc e.g. Using @https://docs.google.com/document/d/1bng3y3ndTfRju0Ud9ANvdzXwdrhBvyvopQ0uniyUg_4/edit ...]
Overall, the side panel is a fantastic addition for both new and existing users looking to rapidly build custom solutions across Google Workspace. Personally it does cause some concern around users executing generated code without fully understanding its underlying logic or security permissions, particularly when you use services like Gmail and Drive.
If, like me, you’ve often struggled with the pain of coding user interfaces with the CardService in Google Workspace, things are about to change. Using the new, open Agent2UI (A2UI) specification, agents can autonomously decide how to structure and render their own native interfaces in real time.
In a recent Pulse post, The Evolution of Google Chat: Exploring the New Wave of Developer Quickstarts, we highlighted a new Google tutorial that implements Agent2UI (A2UI) inside Google Chat. This guide shows you how to build a hybrid solution using Apps Script as a secure, lightweight gateway to Python-based agents running on the Vertex AI Agent Engine.
The Architecture: Apps Script as the Orchestrator
A common challenge when working with modern AI toolkits like the Agent Development Kit (ADK) is that they are not designed to run natively inside Apps Script. The quickstart bridges this divide by turning Apps Script into a lightweight, secure orchestration layer.
Instead of running heavy processing directly inside the script, Apps Script handles the Google Chat event, manages secure server-to-server authentication, and sends the payload out to an agent running on the Vertex AI Agent Engine.
Under the Hood
A look at the script provided in the quickstart shows how the Python backend passes UI layout instructions back to the Workspace front-end. When a user asks a question, the Python script processes the request, calls any backend tools and returns a single text stream structured like this:
When this response is returned to Google Apps Script, it triggers the extractA2UIParts() function which splits this raw payload on the ---a2ui_JSON--- separator. The text before the delimiter (e.g., “Hello! I found the profile…”) is taken and posted straight to the user and the raw JSON array after the delimiter is to make the card.
Something to keep in mind is that this framework is not yet a wholesale replacement for the entire CardService library, as you will see in the script it uses a basic render to convert the A2UI JSON into CardService elements:
switch (Object.keys(component)[0]) {
case 'Text':
const textParagraph = CardService.newTextParagraph();
textParagraph.setText(extractTextValue(component["Text"].text, dataModel));
widgetWithIds.push({ id: c.id, widget: textParagraph });
break;
case 'Image':
const image = CardService.newImage();
image.setImageUrl(extractTextValue(component["Image"].url, dataModel));
widgetWithIds.push({ id: c.id, widget: image});
break;
case 'Button':
// Maps inline labels or child text components to TextButtons
// and packages them into a trailing ButtonSet...
break;
default:
console.warn(`Could not render component: ${JSON.stringify(c)}`);
}
This means that for the time being, the script example is only able to handle basic UI elements rather than handling heavy, structured data-entry flows.
Future Directions
While the quickstart provides a foundational v0.8 entry point for developers, community members are already looking at how A2UI responses can be used in Google Workspace interfaces.
An excellent example of this is Curtis Krygier’s open-source a2ui-catalogue project. Curtis has started a component library designed to build agent-driven interfaces for Google Workspace starting with Google Meet and Google Chat.
Instead of trying to bundle complex, pre-composed UI elements on the backend, Curtis advocates for a substrate model:
Atomic Philosophy: Developers define a fixed visual vocabulary of atomic “primitives” once on the client side (such as TypeScript Lit web components).
Token Efficiency: The AI agent reasons entirely within this stable vocabulary. It passes raw state updates rather than inventing presentation layouts on every conversational turn. This reduces token overhead and eliminates slow backend container redeployment loops.
Interchangeability: By completely decoupling primitives from the transport layer, the exact same v0.9 component tree can reflow dynamically across completely different containers. A layout originally designed for a fullscreen stage in a Google Meet iframe can seamlessly stack and reflow to fit inside a compact Google Chat card or side panel.
Summary
For Google Workspace developers, the base A2UI Agent quickstart serves as an excellent hands-on starting point to experiment with agent integrations in Google Workspace. The underlying frameworks are evolving rapidly, as are the solution wrappers like a2ui-catalogue. Given a speed of change don’t expect a completely frictionless, single-click deployment out of the box, and you’ll likely need to lean into a little “Gemini-powered” fault finding should sort things out.
If you have been following the Google Workspace developer release notes over the last few months, you will have noticed a recurring theme: the velocity of Chat API updates. One of the most recent updates in March 2026 for Dialogflow and Pub/Sub integrations led me to the official documentation and the growing list of quickstarts. I thought it would be useful to spotlight what’s available.
The Foundations
For many of us in the community, lightweight automations are the bread and butter of our daily workflows. For programmatic interaction with Google Chat, there are three foundations you can choose from.
Apps Script: The classic, low-barrier-to-entry approach. Apps Script remains the fastest way to prototype and deploy custom Chat apps, especially with the new AddOnsResponseService (introduced in Developer Preview in January 2026 and made Generally Available in March 2026) which makes managing interactive responses easier than ever.
HTTP Service:Â Perfect for developers looking to use Cloud Run, Cloud Functions, or external on-premises servers to handle their application logic.
Pub/Sub: The essential architecture for enterprise environments. If your Chat app needs to sit securely behind a corporate firewall while still reacting to real-time events from the Workspace Events API, Pub/Sub is the way to go. (This integration entered Developer Preview in February 2026 and reached General Availability in March 2026).
Conversational AI with Dialogflow
GenAI has revolutionised what we expect from a chatbot, but structured, intent-based routing still plays a vital role in customer service and deterministic workflows.
Dialogflow ES & Dialogflow CX: These quickstarts demonstrate how to seamlessly integrate Chat with Dialogflow. While ES handles standard intent-based natural language understanding, CX is incredibly powerful for complex, multi-turn conversational flows and advanced state management. (These integrations were launched in Developer Preview in December 2025 and became Generally Available in March 2026).
The Next Frontier: Autonomous AI Agents
This is where the recent release notes truly come to life. Google is leaning heavily into autonomous problem-solving, moving beyond simple call-and-response bots to agents that can reason, critique, and act on your behalf.
ADK AI Agent: Utilises the Agent Development Kit (ADK) to host AI agents on the Vertex AI Agent Engine. This is your starting point for building agents that can autonomously perceive their environment and execute complex, multi-step actions. (Sample introduced in January 2026).
Agent2Agent (A2A): A fascinating paradigm shift. This quickstart showcases a multi-agent system (like the LLM Auditor sample) where sub-agents interact with each other. For example, a “Reviser” agent writes a response, and a “Critic” agent reviews it for factual accuracy against Google Search grounding before it is ever sent to the user. (Sample introduced in January 2026).
Agent2UI (A2UI): Focuses on bridging the gap between autonomous reasoning and user interface interactions, allowing agents to dynamically render cards and UI elements based on conversational context. (Currently in Early Stage Public Preview).
Gemini Enterprise Agent:Â Tailored for the enterprise, this quickstart shows how to integrate deeply with Gemini Enterprise AI agents to drive innovation and problem-solving securely within your organisation’s data perimeter.
Get Building!
With the recent general availability of Chat apps as Google Workspace Add-ons, you can now manage these advanced Gemini and Dialogflow agents via a single Apps Script deployment. Furthermore, new UI capabilities like dynamically populated drop-down menus with autocomplete and the ability to programmatically manage custom Chat sections mean the user experiences we can build are richer than ever.
And let us not forget the Chat Model Context Protocol (MCP) currently in Developer Preview. By setting up an MCP server, we can now enable these AI agents to securely read messages and take actions directly within our Chat spaces.
The barrier to entry for building deeply integrated, AI-powered Chat apps has never been lower.
This tutorial shows you how to publish AI agents to Google Workspace as Google Workspace add-ons, using Apps Script or HTTP endpoints. After your publish your add-on, your users can interact with the AI agents within their workflows.
Google has released a comprehensive new tutorial that demonstrates how to bridge the gap between complex AI agents and the daily workflows of Google Workspace users. The Travel Concierge sample uses the Agent Development Kit (ADK) to deploy a conversational, multi-agent AI directly into the Google Workspace platform.
While many AI demos focus on standalone chat interfaces, this solution stands out by implementing the agent as a Google Workspace Add-on. This means the AI isn’t just a browser tab; it is a helpful sidebar accessible directly within Gmail, Calendar, Drive, Docs, Sheets, and Slides, as well as a fully functioning Google Chat app.
Key Features for Developers
The sample provides a robust blueprint for developers looking to build “agentic” workflows. Key capabilities include:
Multi-Agent Architecture:Â The solution uses Vertex AI to manage a “Travel Concierge” that orchestrates sub-agents for specific tasks, utilising tools like the Google Maps Platform Places API and Google Search Grounding.
Context Awareness:Â In applications like Gmail, the agent can read the context of the currently selected email to help plan trips based on actual correspondence.
Rich User Interfaces:Â The add-on moves beyond simple text, utilising the Card framework to display rich widgets and interactive elements.
Cross-Platform Persistence:Â User sessions are managed by Vertex AI, ensuring that a conversation started in Google Chat can be seamlessly continued in a Google Doc sidebar.
Flexible Implementation
The Apps Script implementation demonstrates how to connect a standard Workspace Add-on to the powerful Vertex AI backend using UrlFetchApp. It serves as an excellent reference for handling synchronous execution limits and rendering complex agent responses within the constraints of the Add-on sidebar.
Whether you are looking to build a travel planner or a complex enterprise assistant, this sample provides the architectural patterns needed to bring your AI agents to where your users actually work.
How to build a server-less crawler using Google Apps Script to create a unified knowledge base for AI-assisted development.
The Goal: A Unified Context for Gemini
When building Google Workspace add-ons, particularly those using newer features like Workspace Flows, the documentation is often spread across dozens of nested pages. While excellent for browsing, this structure presents a challenge when working with Large Language Models (LLMs) like Gemini.
The primary motivation for this project was to create a single, consolidated “Knowledge Doc” containing the complete technical specification for Workspace Flows. By feeding this unified document into Gemini, I can:
Control the Context:Â Ensure the model answers based on the specific, official documentation rather than outdated training data or hallucinated APIs.
Accelerate Development:Â Ask complex architectural questions (“How do I build a flow that integrates X and Y?”) and get answers grounded in the full API reference without the latency of multiple web searches.
Bridge the Knowledge Gap:Â Work effectively with brand-new products and services that haven’t yet been absorbed into the LLM’s core training set.
This article details how I built the tool to create this document—a server-less crawler that runs entirely within Google Apps Script. If you are less concerned about the how and more about the end result here is the [Shared] Google Workspace Flows Guide
The Technical Challenge: Apps Script vs. The DOM
My initial plan was straightforward:
Fetch the HTML of each documentation page.
Parse it into Markdown (using a library like Turndown or Showdown).
Convert that Markdown into a Google Doc.
However, I hit a major roadblock immediately. Most JavaScript parsing libraries rely on the DOM (window, document, DOMParser). Google Apps Script runs in a server-side environment (similar to a Node.js runtime but without standard packages) where no DOM exists. Libraries like Turndown crashed instantly with ReferenceError: document is not defined.
The Solution: A Hybrid HTML Pipeline
Instead of fighting to make a browser library work on the server, I pivoted to a hybrid approach:
Cheerio for Parsing: I used the Cheerio library (which parses HTML using pure JavaScript strings, no DOM required) to “clean” the content.
Direct HTML Injection: Instead of converting to Markdown (which lost formatting for tables and images), I switched to the Google Drive API which can natively convert HTML files into Google Docs.
This pipeline proved superior because it preserved:
Code Blocks:Â <pre>Â tags with specific formatting.
Tables:Â Complex data tables rendered perfectly.
Images:Â <img>Â tags with absolute URLs were automatically fetched and embedded by Google Drive.
Important Note: This script was developed and tested specifically for Google Workspace Flows documentation. Web scraping inherently carries the risk that the target website’s HTML structure may change over time. Other documentation sites will use different CSS classes and HTML structures. While the core logic (crawling + HTML cleaning + Docs conversion) remains valid, you will need to inspect the source of your target site and update the Cheerio selectors (like .devsite-article-body or .devsite-book-nav) to match its specific layout.
Step 1: The Crawler
First, we needed to find all the relevant pages. Traversing the DOM tree proved fragile—class names change, and nesting levels vary.
The robust solution was Path Filtering. We fetch the main navigation bar and simply filter for any link that starts with our target root URL.
functionextractLinksByPath(html, rootUrl) {
const $ = Cheerio.load(html);
const links = newSet();
$('.devsite-book-nav a').each(function() {
let href = $(this).attr('href');
if (href) {
if (href.startsWith('/')) href = CONFIG.BASE_URL + href;
if (href.startsWith(rootUrl) && !href.includes('#')) links.add(href);
}
});
returnArray.from(links);
}
Step 2: The HTML Cleaner
We couldn’t just dump the raw page HTML into a Doc; it would include navigation bars, “Feedback” buttons, and footer links. We used Cheerio to strip these out.
We also encountered a specific challenge with Definition Lists (<dl>, <dt>, <dd>). Google Docs doesn’t have a native “Definition List” element, so they often flattened into messy text.
The fix was to transform them into semantic HTML paragraphs with inline styling to force the visual layout we wanted:
Even with clean HTML, the Google Docs converter can be stubborn. It sometimes ignores semantic headings (<h1>) or allows images to overflow the page width.
To fix this, we added a post-processing step. After the HTML file is converted to a Google Doc, we open it with DocumentApp to programmatically enforce styles and constraints.
Fixing Headings:Â We scan for our specific “Title” styling (24pt Bold) and force the Heading 1 style.
functionapplyHeadingsToDoc(docId) {
const doc = DocumentApp.openById(docId);
const body = doc.getBody();
const paragraphs = body.getParagraphs();
paragraphs.forEach(p => {
const text = p.getText();
if (text.length === 0) return;
const fontSize = p.getAttributes().FONT_SIZE;
const isBold = p.getAttributes().BOLD;
// If it looks like a H1 (24pt + Bold), make it a H1!if (fontSize >= 24 && isBold) {
p.setHeading(DocumentApp.ParagraphHeading.HEADING1);
}
});
doc.saveAndClose();
}
Resizing Images:Â We also scan for images wider than the standard page width (e.g., 600px) and scale them down to fit, ensuring the document layout remains printable and clean.
Once generated, this document becomes the cornerstone of my development workflow:
Consolidate:Â I run the script to pull the latest documentation into a fresh Google Doc.
Enrich: I use tools like Gemini Deep Research to find community patterns, or architectural best practices and paste them directly into the same doc.
Contextualise:Â This single document is then uploaded to Gemini (or another LLM workspace), providing a focused, hallucination-resistant context for answering questions and generating code.
By combining the UrlFetchApp for crawling, Cheerio for parsing, and the Drive API for document generation, we built a custom scraping pipeline in under 200 lines of code without spinning up a single server. If you’d like to make your own feel free to copy this script project which comes with a compiled Apps Script friendly version of Cheerio
Google Workspace Flows is currently available as part of the Gemini Alpha program for Google Workspace customers. If you don’t have access to Workspace Flows you will need to request access via your Google Workspace Administrator.
As developers, we often find ourselves building complex automations to glue different services together. But with the introduction of Google Workspace Flows, Google is handing some of that power directly to business users, allowing them to string together tasks—like summarising emails or posting to Chat—without writing a single line of code.
But where does that leave us? Right in the driver’s seat.
While Flows provides a “no-code” interface for users, it offers a robust “code” backend for us. Developers can extend the platform by building custom steps, in Google Apps Script. These steps act as reusable building blocks that users can drop into their flows to perform specific, business-critical tasks that aren’t available out of the box.
If you have an existing Google Workspace Add-on, you can even extend its functionality to include these Flows steps. Since Google Workspace Flows is currently part of the Gemini Alpha program, custom steps are intended for internal use and testing within your own Google Workspace organization rather than public distribution. You can deploy them as test deployments or private add-ons for your domain, but a public listing is not yet supported.
Here is a high-level overview of how it works and where to find the documentation to get started.
The Anatomy of a Step
Building a custom step in Apps Script isn’t too dissimilar from building an Editor Add-on, but there are specific architectural differences to be aware of. A step essentially consists of three parts:
The Definition (Manifest): You define the step’s identity, required inputs, and expected outputs in the appsscript.json file.
The Configuration (UI):Â You build a card interface (using CardService) that allows the user to configure the step when they add it to their flow.
The Execution (Logic):Â You write the actual function that processes the inputs and returns the outputs.
Key Capabilities
The documentation provided by Google is comprehensive. Here are the key areas you should explore to understand what is possible:
1. Configuration Cards & Variables
Unlike a static settings page, configuration cards in Flows are dynamic. You can build cards that accept input variables from previous steps. For example, if a user has a “New Email” trigger, your step can ingest the email body as a variable.
2. Passing Data
Your step doesn’t just run in isolation; it talks to the rest of the flow. By defining output variables, your script can return data (like a calculated value or a file ID) that subsequent steps can use.
3. Robust Validation
To ensure users don’t break your script with bad data, Flows supports two types of validation. You can use Client-side validation (using Common Expression Language, or CEL) for instant feedback on the UI, or Server-side validation for complex checks against external databases.
4. Handling Complexity
For more advanced use cases, simple strings and integers might not be enough. The platform supports Custom Resources for grouping complex data structures (like a CRM lead object) and Dynamic Variables for inputs that change based on context (like selecting a specific question from a Google Form).
Getting Started
If you are part of the Gemini Alpha program and want to get your hands dirty, the best place to start is the Quickstart guide. It walks you through building a simple calculator step that takes two numbers and an operator to output a result.
A fact-check custom function for Google Sheets to be used as a bound Apps Script project powered by a Vertex AI agent and Gemini model.
This sample demonstrates how you can use two powerful types of AI resources directly into your Google Sheets spreadsheets
A new tutorial published by Google’s Pierrick Voulet, while ostensibly about creating a fact-checking tool in Google Sheets, offers something more valuable to developers: a clear framework for integrating powerful, multi-step Vertex AI Agents into Google Workspace solutions.
While the example is a FACT_CHECK custom function, the underlying architecture caught my eye as it provides a blueprint for connecting Google Workspace applications with the sophisticated reasoning capabilities of custom AI agents.
The Core Architectural Pattern
The solution uses Google Apps Script as a bridge between the user-facing application (Google Sheets) and the backend AI services on Google Cloud.
When a user calls the custom function, the script authenticates with a service account and makes a call to a deployed Vertex AI Agent. This agent then performs its multi-step reasoning. The result is then optionally passed to a Gemini model for final formatting before being returned to the Sheet.
This pattern is highly adaptable for various use cases, allowing developers to bring advanced Agentic AI into your own solutions.
Key Components for Developers
For developers looking to adapt this framework, the tutorial outlines the essential components:
A configured Google Cloud Project with the Vertex AI API enabled.
A deployed ADK Agent on the Vertex AI Agent Engine.
An Apps Script project using a service account for secure, server-to-server authentication with Google Cloud.
The provided Apps Script code (Code.gs and AiVertex.js) serves as a robust starting point, handling the API calls to both the reasoning agent and a Gemini model for final output formatting.
Ultimately, the fact-checking tool serves as an excellent proof of concept. The true value for the developer community, however, lies in the architectural blueprint it provides. This tutorial offers a clear model for integrating multi-step AI reasoning into Google Workspace add-ons, opening the door to a new class of intelligent applications.
As of February 20, 2025, the Rhino runtime is deprecated. Scripts running on Rhino will continue to function until January 31, 2026, after which they will no longer execute. Please migrate your scripts to the V8 runtime before this date. Refer to Migrate scripts to the V8 runtime.
Attention Google Workspace Developers!
A recent email to Google Workspace administrators announced the upcoming retirement of the Rhino runtime for Apps Script. As also highlighted in the Apps Script release notes, all Apps Script projects still using the Rhino runtime must be migrated to the V8 runtime by January 31, 2026, to avoid execution issues.
What this means for Workspace Developers:
If you are a Workspace developer, even if you don’t have an administrator role, it’s crucial to check your Apps Script projects for Rhino runtime usage. The email to administrators included a CSV file listing affected projects, with details such as:
Script URL, Script ID, Last Updated: Identifies the specific script.
Creator Email, Owner Email: Identifies the script’s originators.
Incompatibility Reason: Explains why the script needs migration.
Execution Count: Shows how often the script is used.
Additional Information: Includes opt-out status, library dependencies, etc.
Suggested Actions for Developers:
Non-Admins: You might want to contact your Workspace administrator to find out if any of your or your colleague Apps Script projects are on the list of affected scripts and ask for guidance on the migration process.
Third-Party Developers: You may want to proactively reach out to your customers to inform them of the upcoming changes, offer assistance with the migration, and ensure their scripts are updated before the deadline to prevent any disruption in their services.
Workspace Admins: Review the CSV file to identify your affected scripts, prioritize migrating scripts with high usage first to minimize user disruption, and understand the specific issues that need to be addressed in each script.
Important Considerations:
Google provides a migration guide and support resources to assist with the transition. In particular, it is worth noting that:
For Apps Script web apps and Google Workspace Add-ons “[You] must create a new version of the script with the V8 adjustments. To make the V8 version available to users, you must re-publish the script with this version.”
When updating standalone scripts to run on the V8 runtime, “you need to provide users at least view access to the script in order for the script’s triggers to work properly.”
It’s also important to note that while the V8 runtime generally offers performance advantages, there have been some reports of specific instances where performance with JDBC connectors might not be as efficient as in the Rhino runtime.
So don’t delay, start migrating your Apps Script projects today!
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.
To subscribe to events using Apps Script, you can now use the Advanced Google Workspace Events service.
In the May 02, 2024 Google Apps Script release notes it was announced that a new Advanced Google Workspace Events service is available to let developers use the Google Workspace Events API directly in Google Apps Script. The Google Workspace Events API is a relatively new API, which was released to developer preview in January, 2024. The Google Workspace Events API uses a subscription model to handle resource changes. When you create a subscription, you specify the target resource (such as a Google Chat space or Google Meet meeting space) and the event types that you want to subscribe to. The API then sends notifications to your specified endpoint whenever an event occurs for that resource and event type.
In the case of the new Advanced Google Workspace Events service the linked documentation includes samples for using the new service with Google Chat. It’s worth noting that the Advanced Google Workspace Events service is designed specifically on managing subscriptions to events. While it lets you to control the flow of information and manage event subscriptions in your Apps Script projects, the actual processing and handling of event data occurs separately.
The linked documentation page provides sample code as well as outlines all the prerequisites.