GEMINI LABJP
SIRI — WWDC 2026 confirms the revamped Siri runs on a Google Gemini model, though it won't ship in the EU at iOS 27 due to the DMAFLASH3.5 — Gemini 3.5 Flash is now GA, the top Flash model for sustained frontier performance on agentic and coding tasksIMAGE-GA — Gemini 3.1 Flash Image and 3.1 Pro Image are GA as native visual models; the preview versions shut down Jun 25MANAGED-AGENTS — Managed Agents launch in public preview in the Gemini API, running autonomous agents in Google-hosted isolated Linux sandboxesFILE-SEARCH — File Search now supports multimodal search, with native image embedding and retrieval via gemini-embedding-2DEPRECATION — gemini-3.1-flash-image-preview and gemini-3-pro-image-preview shut down Jun 25 — migrate to the GA models soonSIRI — WWDC 2026 confirms the revamped Siri runs on a Google Gemini model, though it won't ship in the EU at iOS 27 due to the DMAFLASH3.5 — Gemini 3.5 Flash is now GA, the top Flash model for sustained frontier performance on agentic and coding tasksIMAGE-GA — Gemini 3.1 Flash Image and 3.1 Pro Image are GA as native visual models; the preview versions shut down Jun 25MANAGED-AGENTS — Managed Agents launch in public preview in the Gemini API, running autonomous agents in Google-hosted isolated Linux sandboxesFILE-SEARCH — File Search now supports multimodal search, with native image embedding and retrieval via gemini-embedding-2DEPRECATION — gemini-3.1-flash-image-preview and gemini-3-pro-image-preview shut down Jun 25 — migrate to the GA models soon
Articles/Workspace
Workspace/2026-03-29Advanced

Gemini × Google Workspace Add-ons Development Guide — From Building Custom AI Side Panels to Marketplace Launch

A comprehensive guide to building custom AI side panels with Google Workspace Add-ons and Gemini API — from implementation to Marketplace publication and monetization.

gemini114workspace11add-onsapps-script9marketplaceside-panelmonetization28api20

Premium Article

Setup and context — Why Workspace Add-ons × Gemini?

For organizations that rely on Google Workspace daily, having AI assistance available directly from the side panel in Docs, Sheets, or Gmail represents a massive productivity boost. As of 2026, the Google Workspace Add-ons SDK supports rich UI components through Card Service v2, and when combined with the Gemini API, you can build context-aware intelligent assistants right in the side panel.

This article walks you through the complete journey — from the foundational architecture of Google Workspace Add-ons to building a Gemini API-powered AI side panel, designing OAuth scopes, navigating the security review process, and finally publishing and monetizing your add-on on the Google Workspace Marketplace. We provide production-ready code throughout, so by the time you finish reading, you should be ready to publish your own add-on.

This article assumes familiarity with Apps Script basics and a working knowledge of the Gemini API. For building cross-product workflows with Apps Script, check out "[Building Cross-Product AI Workflows with Gemini API and Apps Script]((/articles/gemini-workspace/gemini-apps-script-cross-product-ai-workflow)."

Understanding Workspace Add-ons Architecture

Google Workspace Add-ons use Apps Script or HTTP endpoints as the backend to display custom UI in the side panel of Google Workspace applications (Gmail, Docs, Sheets, Slides, Calendar).

Host Apps and Triggers

Add-ons define trigger functions for each "host app." For example, when a user opens an email in Gmail or a document in Docs, the corresponding trigger function fires and generates the Card UI for the side panel.

  • Homepage Trigger: The home screen displayed when the user clicks the add-on icon
  • Contextual Trigger: Screens that auto-display based on context (opening an email, selecting a document, etc.)
  • Action Callback: Functions invoked on button clicks or form submissions

Card Service v2 UI Components

Card Service v2 provides these key components:

  • CardBuilder: Root container for cards
  • CardSection: Section dividers with headers
  • TextParagraph / DecoratedText: Text display
  • TextInput / SelectionInput: User input forms
  • ButtonSet / TextButton / ImageButton: Action buttons
  • Grid / GridItem: Grid layouts
  • Divider: Section separators

By combining these components, you can build chat-like interfaces, form input screens, analytics dashboards, and more — all within the side panel.

Manifest File (appsscript.json) Structure

{
  "timeZone": "America/New_York",
  "dependencies": {},
  "exceptionLogging": "STACKDRIVER",
  "runtimeVersion": "V8",
  "oauthScopes": [
    "https://www.googleapis.com/auth/gmail.readonly",
    "https://www.googleapis.com/auth/documents.currentonly",
    "https://www.googleapis.com/auth/spreadsheets.currentonly",
    "https://www.googleapis.com/auth/script.external_request",
    "https://www.googleapis.com/auth/userinfo.email"
  ],
  "addOns": {
    "common": {
      "name": "Gemini AI Assistant",
      "logoUrl": "https://example.com/logo.png",
      "layoutProperties": {
        "primaryColor": "#4285F4"
      },
      "homepageTrigger": {
        "runFunction": "onHomepage"
      }
    },
    "gmail": {
      "contextualTriggers": [{
        "unconditional": {},
        "onTriggerFunction": "onGmailMessage"
      }]
    },
    "docs": {
      "homepageTrigger": {
        "runFunction": "onDocsHomepage"
      }
    },
    "sheets": {
      "homepageTrigger": {
        "runFunction": "onSheetsHomepage"
      }
    }
  }
}

The oauthScopes design directly affects whether your add-on passes the security review. Always follow the principle of least privilege — when a currentonly scope is available, prefer it over the full-access equivalent (e.g., documents.currentonly instead of documents).

Thank you for reading this far.

Continue Reading

What follows includes implementation code, benchmarks, and practical content we hope you'll find useful. This site runs without ads — server and development costs are supported entirely by members like you. If it's been helpful, we'd be truly grateful for your support.

WHAT YOU'LL LEARN
Master implementation patterns for integrating the Workspace Add-ons SDK with Gemini API
Understand the full process from OAuth scope design to security review and Marketplace submission
Gain practical know-how for building subscription billing models and optimizing revenue
Secure payment via Stripe · Cancel anytime
Share

Thank You for Reading

Gemini Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • Copy-paste ready implementation code
  • New advanced guides published daily
  • $5/mo or $10 for lifetime access
View Membership →

Related Articles

Workspace2026-05-27
Replying to 11 Languages of Google Play Reviews With Gemini Without Sounding Like a Bot
After two major Android updates, I had to clear a backlog of unanswered Google Play reviews on Beautiful 4K/HDR Wallpapers (50M+ downloads) in Japanese, English, Traditional Chinese, Korean, Thai, Italian, Russian, Persian, Ukrainian, and Polish. This is the operations design I settled on for using Gemini as a translation and vocabulary partner without losing the human temperature.
Workspace2026-05-25
Why I Stopped Organizing Gmail and Let Gemini Recover My Memory Instead
Running six domains as an indie developer means my Gmail accounts are buried under tens of thousands of unfiled messages. Here is how I switched from asking Gemini to find emails to asking it to answer questions, with the traps I hit along the way.
Workspace2026-05-04
Gemini Side Panel Missing in Gmail, Docs, and Sheets: A Fix Checklist
When the Gemini side panel disappears from Gmail, Docs, or Sheets, the cause usually falls into one of four buckets. Here is a seven-step checklist that will surface the real culprit on most accounts.
📚RECOMMENDED BOOKS
Build a Large Language Model (From Scratch)
Sebastian Raschka
LLM Dev
Prompt Engineering for LLMs
Berryman & Ziegler
Prompting
AI Engineering
Chip Huyen
AI Eng
* Contains affiliate links
See all →