Reading Google Chat Spaces and Messages in Google Apps Script just got significantly easier!

In Episode 31 of the Google Workspace Developer News, an interesting announcement removes a major administrative hurdle for Google Apps Script developers interacting with Google Chat.

“You no longer need to manually configure a Google Chat app in the Google Cloud console for integrations that only use the Chat API to read data on behalf of a user using OAuth. For read-only actions, such as getting a space or listing messages, you now only need to enable the Chat API and create an OAuth client.”

The simplified Chat API setup means developers no longer need to configure a full Google Chat App in a standard Google Cloud project just to perform read-only actions. Previously, reading space messages via the Chat Advanced Service required detaching your script from the default GCP project, linking a standard GCP project, configuring an OAuth consent screen and formally enabling the Google Chat API.

Now, retrieving data is immediate. To list your Chat Spaces and read messages, you can add the Chat Advanced Service in your script editor and declare the read-only scopes in your appsscript.json manifest:

{
  "timeZone": "Europe/London",
  "dependencies": {
    "enabledAdvancedServices": [
      {
        "userSymbol": "Chat",
        "serviceId": "chat",
        "version": "v1"
      }
    ]
  },
  "exceptionLogging": "STACKDRIVER",
  "runtimeVersion": "V8",
  "oauthScopes": [
    "https://www.googleapis.com/auth/chat.messages.readonly",
    "https://www.googleapis.com/auth/chat.spaces.readonly"
  ]
}


Once your manifest is configured, you can use the Chat service to list the spaces you are a member of and the most recent messages in a specified space. Here are two example functions you can use:

/**
 * Lists the Google Chat spaces the authenticated user is a member of.
 * * Prerequisites:
 * 1. Enable the Google Chat API in Apps Script Advanced Services.
 * 2. Add the following OAuth scope to your appsscript.json manifest:
 * "https://www.googleapis.com/auth/chat.spaces.readonly"
 */
function listMySpaces() {
  try {
    let pageToken = null;
    do {
      // Call the Chat Advanced Service to list spaces
      const response = Chat.Spaces.list({
        pageSize: 50, // Adjust to retrieve more or fewer spaces per page
        pageToken: pageToken
      });

      if (!response.spaces || response.spaces.length === 0) {
        console.log("No spaces found.");
        break;
      }

      // Iterate through and log the retrieved spaces
      for (const space of response.spaces) {
        console.log(`Space Name: ${space.displayName || 'Unnamed Space'}`);
        console.log(`Resource ID: ${space.name}`);
        console.log(`Type: ${space.spaceType}`);
        console.log("-----------------------------------------");
      }
      
      // Update the page token to retrieve the next page of results
      pageToken = response.nextPageToken;
    } while (pageToken);
    
  } catch (err) {
    // Log any errors that occur during the API call
    console.error("Failed to fetch spaces with error: %s", err.message);
  }
}

/**
 * Lists the most recent messages in a Google Chat space.
 * * Prerequisites:
 * 1. Enable the Google Chat API in Apps Script Advanced Services.
 * 2. Add the following OAuth scope to your appsscript.json manifest:
 * "https://www.googleapis.com/auth/chat.messages.readonly"
 * * @param {string} spaceName The resource name of the space (e.g., "spaces/AAAAAAAAAAA").
 */
function listSpaceMessages(spaceName = "spaces/YOUR_SPACE_ID") {
  try {
    // Call the Chat Advanced Service to list messages
    const response = Chat.Spaces.Messages.list(spaceName, {
      pageSize: 10 // Adjust to retrieve more or fewer messages
    });

    // Check if the space has any messages
    if (!response.messages || response.messages.length === 0) {
      console.log("No messages found in this space.");
      return;
    }

    // Iterate through and log the retrieved messages
    for (const message of response.messages) {
      // Note: When authenticating as a user rather than a Chat app, 
      // the API only returns the sender's 'name' (resource ID) and 'type'.
      // Cross-reference this ID using the Admin SDK Directory or People API to retrieve display names.
      console.log(`Sender ID: ${message.sender ? message.sender.name : 'Unknown'}`);
      console.log(`Text: ${message.text}`);
      console.log(`Created At: ${message.createTime}`);
      console.log("-----------------------------------------");
    }
    
  } catch (err) {
    // Log any errors that occur during the API call
    console.error("Failed to fetch space messages with error: %s", err.message);
  }
}


This change drastically reduces the setup time for getting personal access to your Space data and messages. Happy scripting!!!

Beyond the Card Layout: A Deeper Dive into the Agent2UI (A2UI) and Google Workspace Development

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:

Hello! I found the profile information you requested.
---a2ui_JSON---
[
  {
    "id": "profile_avatar",
    "component": {
      "Image": {
        "url": "[https://io.google/2024/speakers/3ea87822-3160-4d54-89dd-57e185085f79_240.webp](https://io.google/2024/speakers/3ea87822-3160-4d54-89dd-57e185085f79_240.webp)"
      }
    }
  },
  {
    "id": "profile_name",
    "component": {
      "Text": {
        "text": "Pierrick Voulet"
      }
    }
  },
  {
    "id": "linkedin_button",
    "component": {
      "Button": {
        "label": "LinkedIn Profile",
        "onClick": {
          "openLink": "[https://www.linkedin.com/in/pierrick-voulet/](https://www.linkedin.com/in/pierrick-voulet/)"
        }
      }
    }
  }
]

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.

Source: Build a Google Chat app with an Agent2UI agent  |  Google Workspace add-ons  |  Google for Developers

The Evolution of Google Chat: Exploring the New Wave of Developer Quickstarts

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.

Resolve Google Chat Space User IDs to Emails: Least Privilege Approach with Service Accounts and Custom Admin Roles

If you’ve built a Google Chat bot, you’ve likely hit this wall: the API sends you a membership event with a User ID… but omits the email field entirely.

For Google Workspace developers, this limitation in the Chat API is a frequent stumbling block. As detailed in the User resource documentation, while you can use an email address as an alias in requests (e.g., referencing users/[email protected]), the API insists on returning only the canonical resource name (e.g., users/123456789). This ID corresponds to the user’s profile in the People API or Admin SDK, but the email itself is stripped from the response, forcing developers to perform a secondary lookup.

Handling User ID Conversions

I’ve explored this lookup logic before in Beyond the Limits: Automating Google Chat Space Archives. In that solution, I used a helper function to convert the users/{id} format to people/{id} for use with the Advanced People Service.

/**
 * Fetches user details from the People API.
 * @private
 * @param {string} userResourceName The "users/{user}" string from the Chat API.
 * @return {{name: string, displayName: string, email: string|null}} An object with user details.
 */
function getUserDetails_(userResourceName) {
  const defaultUserDetails = {
    name: userResourceName,
    displayName: userResourceName.replace('users/', 'Unknown User '),
    email: null,
  };

  // Fail fast for app users or invalid formats
  if (!userResourceName.startsWith('users/') || userResourceName === 'users/app') {
    return defaultUserDetails;
  }
  
  try {
    const peopleApiResourceName = userResourceName.replace(/^users\//, 'people/');
    
    const person = People.People.get(peopleApiResourceName, {
      personFields: 'names,emailAddresses',
    });
    
    const displayName = person.names?.[0]?.displayName ?? defaultUserDetails.displayName;
    const email = person.emailAddresses?.[0]?.value ?? null;

    return {
      name: userResourceName,
      displayName: displayName,
      email: email,
    };
    
  } catch (e) {
    console.warn(`Could not fetch details for ${userResourceName} from People API: ${e.message}`);
    return defaultUserDetails;
  }
}

However, bridging this gap for a Service Account leads to a security dilemma. The People API often returns empty fields because the Service Account lacks a contact list. You might find yourself reaching for Domain-Wide Delegation to impersonate an admin—effectively using a sledgehammer to crack a nut.

In a recent guide, Justin Poehnelt outlines a more secure strategy that avoids granting blanket domain access. By assigning a custom “Users > Read” Admin Role directly to a Service Account, developers can resolve emails securely without the risks associated with full impersonation.

The Strategy at a Glance

  • Custom Roles: Create a strictly read-only role in the Admin Console.
  • Direct Assignment: Assign this role specifically to the Service Account’s email.
  • No Long-Lived Keys: Use Application Default Credentials (ADC) in production and Service Account Impersonation for local development.

This approach ensures your bot has just enough permission to identify users, keeping your security team happy and your audit logs clean. For more information into the implementation, including the specific configuration steps, I encourage you to read Justin’s full post linked below.

Source: Resolve Chat User IDs to Emails: Least Privilege

Extending Chat Apps Across Workspace with Universal Actions

In this video we build a Chat app as a Google Workspace add-on with Apps Script and extend it to other Workspace applications (Calendar, Gmail, Drive, Docs, Sheets, and Slides).

With the recent general availability of being able to build Google Chat apps as Google Workspace add-ons, the developer community now has a unified model for creating integrated experiences across Google Workspace.

To see this new framework in action, Pierrick Voulet from the Google Developer Relations team has released a fantastic video tutorial, ‘Build a Chat app as a Google Workspace add-on with Apps Script’.

The ‘OOO Assistant’: A Practical Demonstration

The video centres on building an ‘Out-of-Office Assistant’ that can block out the user’s Calendar for the day and set a Gmail out-of-office auto-reply. The real magic is how this Chat-based logic extends into a full Workspace Add-on, available in the sidebars of Gmail, Calendar, Drive, Docs, Sheets and Slides. This is achieved with minimal code changes, primarily by configuring the appsscript.json manifest to include:

  • A homepageTrigger to display a UI card in the add-on sidebar.
  • universalActions that reuse the exact same functions (blockDayOut(), setAutoReply()) originally built for the Chat quick commands.

The video provides a complete overview of the process, and you can get hands-on with the shared code yourself. For more technical details, check out the official Extend Google Chat documentation.

Source: Build a Chat app as a Google Workspace add-on with Apps Script (YouTube)
Code: Build a Google Workspace add-on extending all UIs (GitHub)
Docs: Extend Google Chat (Documentation)

Beyond the Limits: Automating Google Chat Space Archives in JSON and Docs for Gemini Analysis

As powerful as Google’s new AI tools are, those of us who live in Google Workspace have likely encountered some of their current limitations. One of the most significant for me is in Google Chat. While Gemini can analyse recent conversations, it seems to be limited to roughly the last 20 messages or 7 days of history. Crucially, it also can’t see or process messages sent by apps or webhooks, which are often the lifeblood of a technical team’s space.

This creates a knowledge gap. How can you analyse project history, debug an automated alert, or get a complete overview of a conversation if your tools only see a fraction of the data?

To solve this I’ve created an automated solution using Google Apps Script. This tool can archive an entire Google Chat space history into two powerful, synchronised formats:

  1. A structured JSON file that serves as the definitive, machine-readable “source of truth”.
  2. A clean, human-readable Google Doc, which is automatically generated from the JSON data.

This dual-output approach provides the best of both worlds: a portable data file perfect for backups or analysis, and a browsable document ideal for quick searches or for use as a direct data source in a Gemini Gem or other tools like NotebookLM.

Best of all, once configured, you can set up a time-driven trigger to run the script automatically, ensuring your archives are always kept up-to-date without any manual intervention.

Prerequisites

Before you begin, please ensure you have the following:

  • A Google Workspace Account: For setup this can only be a Google Workspace account, once it is configured it is possible to test with a personal consumer Gmail account.
  • Access to Google Cloud Platform (GCP): You will need the ability to create a new GCP project and enable APIs. The guide below will walk you through creating a fresh project, but if you are using a Google Workspace account, you may need to request a project depending on your organisation’s policies.
  • User-Based Access: This script runs as you, the user who authorises it. Therefore, it will only be able to see and archive Google Chat spaces that you are a member of.

The Setup Guide

Getting started is straightforward. The core logic is pre-packaged in a Google Sheet template. You just need to make a copy and connect it to your own Google Cloud project.

Step 1: Copy the Google Sheet Template

First, make your own personal copy of the Chat Archiver template.

➡️ Make a Copy of the Chat Archiver Template ⬅️

Step 2: Configure Your Google Cloud Project (GCP)

This is the most involved step, but it’s essential for giving your new sheet the permission it needs to access your Chat spaces.

  1. Create a Standard GCP Project:
    • Go to the Google Cloud Console.
    • Create a new project. Give it a memorable name (e.g., “My Chat Archiver”).
  2. Enable the Google Chat API:
    • In your new project, navigate to the “APIs & Services” > “Enabled APIs & services” and enable the Google Chat API and Google Drive API , or Enable the APIs
  3. Configure the Chat App (Crucial Step):
    • After enabling the API, you’ll be on the Google Chat API page. Click on the Configuration tab. Go to Chat API Configuration page
    • Fill in the required details to give your script an identity:
    • Under Interactive features, click the Enable interactive features toggle to the off position to disable interactive features for the Chat app.
    • Click Save.
  4. Configure the OAuth Consent Screen:
    • Google Auth platform > Branding. Go to Branding
    • If you see a message that says Google Auth platform not configured yet, click Get Started
    • Add an App name and support email
    • Choose a user type. Internal is best if you’re on a Workspace account. External will work for anyone but require you to add yourself as a test user (you can add up to 100 testers without the need of going through verification).
    • Click Next.
    • Under Contact Information, enter an Email address where you can be notified about any changes to your project, then click Next.
    • Under Finish, review the Google API Services User Data Policy and if you agree, select I agree to the Google API Services: User Data Policy, then click Continue.
    • Click Create.
  5. Link Your Copied Script to Your GCP Project:
    • In the Google Cloud console, go to Menu > IAM & Admin > Settings. Go to IAM & Admin Settings
    • In the Project number field, copy the value.
    • Open your copy of the Google Sheet.
    • Go to Extensions > Apps Script.
    • In the Apps Script editor, go to Project Settings (the cog icon ⚙️).
    • Under “Google Cloud Platform (GCP) Project”, paste the Project Number and click Set Project.

Your copy of the sheet is now correctly configured and authorised to make requests to the Chat API on your behalf.

Step 3: Run Your First Archive

  1. Refresh your copied Google Sheet. A new menu named Chat Archiver will appear.
  2. In the Config tab, paste a Google Chat space ID or full room URL and add your email address (you can share your copy of the Google Sheet with other users who will be able to jump to this step).
  3. Click Chat Archiver > Archive All Spaces.
  4. The first time, a dialogue will appear asking for authorisation. Grant the permissions to allow the script to run.
  5. The script will now run, creating both a JSON file and a Google Doc, and will place their links in the corresponding columns in the sheet.
  6. (Optional) Click Chat Archiver > Setup 15-Minute Trigger so setup a trigger to update the archive documents every 15 minutes.

Understanding the Outputs

The script produces two distinct files, each with a specific purpose:

  • The JSON File: The primary output is a structured JSON file. It takes the chat messages and uses a nested format, which groups replies under their parent message, makes it easier for data analysis with LLMs.
  • The Google Doc: Alongside the JSON, the script generates a clean Google Doc. This format is perfect as knowledge for a Gem or as a data source in NotebookLM. Crucially, this document is completely regenerated from the JSON data on every run. This means it is a “read-only” artefact; any manual changes will be overwritten.

Important Considerations and Limitations

While this solution is powerful and robust for many use cases, it’s important to understand its design limitations and potential areas for future improvement.

  • Access is User-Based (By Design) – The script runs with the permissions of the user who authorises it. This means it can only access and archive Google Chat spaces that the user is currently a member of.
    • Future Improvement: For a true, organisation-wide backup solution, this script could be adapted to use a Service Account. With domain-wide delegation granted by a Workspace administrator, a service account could access any chat space in the domain, regardless of membership. This is a more complex setup but is the standard for enterprise-level automation.
  • Archives are Text-Only – This solution is focused on archiving the textual content of conversations. It does not save file attachments like images, PDFs, or videos. The JSON data will note that a message contained an attachment, but it won’t contain the file itself.
  • Data is Append-Only – The script is designed to add new messages to the archive. It does not synchronise edits or deletions. If a message is edited in Google Chat after it has been archived, the JSON file will still contain the original text. If a message is deleted, it will remain in the archive.
  • Apps Script Execution Limits – Google Apps Script has built-in limits to prevent abuse.
    • Execution Time: A single script run is limited to 6 minutes for standard Gmail accounts or 30 minutes for Google Workspace accounts. For an exceptionally large space (many hundreds of thousands of messages), the very first archive could potentially time out. Using the “Archive Start Date” field is the best way to manage very large initial backfills.
    • File Size: There is a 50 MB limit on the size of a data blob that Apps Script can create. As the JSON archive grows, a single file may eventually hit this limit. For extremely large spaces, the script could be modified to create new files on a yearly or quarterly basis.
  • Not a Compliance Substitute for Google Vault – For organisations that require eDiscovery, legal holds, and retention policies for compliance reasons, Google Vault is the official, authoritative tool. This script should be seen as a powerful data extraction and analysis tool, not a substitute for an official compliance solution.

Ideas for Your Archive

Now that you have your complete chat history in a structured format, what can you do with it? Here are a few ideas to get you started:

  • Create a Project FAQ with Gemini: Provide the generated Google Doc or JSON file to Gemini and ask it to synthesise a “Frequently Asked Questions” document about a specific project. It can pull out key decisions, find links to important resources, and identify common questions your team has answered.
  • Generate an Infographic Summary: Use a prompt like, “Based on this JSON data, identify the top 5 most active members, the busiest day of the week, and the main topics discussed. Present this as data for an infographic.” You can use the Gemini App ‘canvas’ to create a webpage or feed the structured output into a design tool.
  • Onboard New Team Members: Give a new team member the Google Doc archive and ask Gemini to act as a project expert. They can ask questions like, “What was the final decision on the ‘Phoenix’ feature?” or “Summarise the key discussions from last March,” and get instant, context-aware answers.
  • Perform Topic and Sentiment Analysis: The structured JSON file is perfect for programmatic analysis. You could ask Gemini to write a simple script (or use a Colab notebook) to parse the messages, perform sentiment analysis over time to track team morale, or use natural language processing to identify recurring topics and pain points.
  • Build a Project Timeline: Ask Gemini to scan the archive for key dates, deadlines, and project milestones mentioned in the chat, then format the results as a timeline or a table that you can use for project retrospectives and reports.

Summary

Ultimately, this tool is about providing an easy way for you to unlock the value hidden in your team’s conversations. By moving beyond the current limitations and including every message, you create a better true source of truth for analysis and reporting. While we hope future updates to Gemini for Workspace will make this kind of deep integration seamless, for now, this solution gives you more control over your data and a process you can experiment with. I hope this guide helps you get started quickly and if you would like to explore enterprise level solutions get in touch.

Google Chat Apps: Publication experiences on the Google Workspace Marketplace

Image credit: Anton Shevchuk

It has finally happened! Bot Bender 2.0 is now available for installation from the Google Workspace Marketplace. In this post, I will walk you through the steps needed to get to the marketplace.

We’ve shared a couple of journeys to Google Workspace Marketplace publication but this is the first I’ve seen for publishing a Google Chat App. For people who have gone through the process it’s probably a familiar story of back and forth with the Marketplace review team.

In this post Anton Shevchuk shares how his Chat App received multiple rejects due to issues with the location of the support/privacy pages. The moral of the story is to be persistent, and don’t hesitate to push back if you believe the reviewers are mistaken. The post from Anton also outlines the other steps involved, including connecting the Google Workspace Marketplace SDK and configuring app visibility settings.

Source: Google Chat Bot. Publication on Google Workspace Marketplace

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

New Advanced Google Workspace Events service for Google Apps Script


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.

Source: Advanced Google Workspace Events Service

Answer questions based on Google Chat conversations with a Gemini API powered Chat app

This tutorial shows how to make a Google Chat app that answers questions based on conversations in Chat spaces with generative AI powered by Vertex AI with Gemini. The Chat app uses the Google Workspace Events API plus Pub/Sub to recognize and answer questions posted in Chat spaces in real time, even when it isn’t mentioned.

Here is another great tutorial from the Google Chat DevRel team, this time showcasing how the Google Workspace Events API and some new Google Chat UI elements can be used to turn a Chat space into a Gemini Pro powered knowledge base.

The sample solution will let you consume your Chat space message history into a Firestore database. The Chat app is an intelligent agent that can then monitor for new questions and make suggestions using Gemini to generate content based on the previous messages.

There is quite a bit of setup required as part of this tutorial, but it provides a solid foundation for quickly scaling this to your needs.  A demonstration and explanation of the sample app was given as part of the Google Chat apps and APIs: Build connected workflows for the hybrid workplace session at Google Cloud Next and a recording might be available soon!

Source: Answer questions based on Chat conversations with a Gemini AI Chat app  |  Google Chat  |  Google for Developers