Zero-Output-Token AI in Google Apps Script with Gemini Decisions API
Introduction
Over the past three years, I published a three-part series on automating semantic Gmail labeling with Google Apps Script (GAS) and the Gemini API:
- Part 1 (Dec 19, 2023): Flexible Labeling for Gmail using Gemini Pro API with Google Apps Script introduced prompt-based free-text classification mapped through a label dictionary (
labelObj). - Part 2 (Jan 30, 2024): Flexible Labeling for Gmail using Gemini Pro API with Google Apps Script Part 2 replaced free-text prompts with Semantic Search (Gemini Corpora) and Function Calling.
- Part 3 (Sep 19, 2024): Flexible Labeling for Gmail using Gemini API with Google Apps Script Part 3 adopted strict JSON Schema structured outputs (
responseMimeType: "application/json") with Flash-tier batching.
Each generation improved structural reliability, yet all three shared one underlying constraint: they relied on autoregressive text generation (generateContent) to emit classification tokens one by one. In November 2026, Google DeepMind introduced the Gemini Decisions API (POST https://generativelanguage.googleapis.com/v1beta/decisions, powered by gemini-decision-1). It evaluates structured questions in a single forward pass with zero output tokens and returns calibrated probabilities (0.01 to 0.99) alongside confidence scores.
Figure 1. Overview of the
Hero Infographic: Interactive Bidirectional Lakehouse Writeback via Google Sheets & Apache Iceberg. Enables business operators to query filtered records from an open Apache Iceberg table on Google Cloud Storage, visually edit values, add new rows, or purge obsolete records directly within a Google Sheets grid with an embedded dark-themed console, and commit atomic, microsecond-tolerant ACID mutations back to Parquet storage via BigQuery without Reverse ETL SaaS or persistent servers.
Hero Infographic: Unified Multimodal Lakehouse Vector Search via Apache Iceberg & Google Apps Script. Consolidates Google Docs, Sheets, Slides, Forms, binary diagrams, and web-fetched assets into an open Parquet table, driven by Gemini embeddings and BigQuery serverless pushdown for sub-second semantic retrieval and live Google Drive discovery.