Doc Ai Summary

Opens a Google Doc by ID, sends its text to Vertex AI Gemini, and renders the response as a structured summary card with word count and a link to the original doc. Requires VERTEX_PROJECT_ID in Script Properties.

Surfaces
apps-script-web
Fields
FieldType
doc_idstring. Google Doc ID to summarise.required
promptstring. Instruction sent to Gemini before the doc text.optional
titlestring. Override card title. Defaults to the doc name.optional
modelstring. Gemini model override. Defaults to VERTEX_MODEL property.optional
max_charsinteger. Max doc characters sent to Gemini. Default 12000.optional
accentstring. Accent colour.optional
show_metaboolean. Show word count and doc link. Default true.optional
Example payload
{
  "type": "doc_ai_summary",
  "doc_id": "Doc id"
}
ARD catalog entry
{
  "identifier": "urn:air:a2uicatalog.ai:atom:doc_ai_summary",
  "displayName": "Doc Ai Summary",
  "type": "application/vnd.a2ui.atom+json",
  "url": "https://a2uicatalog.ai/atoms/doc_ai_summary",
  "capabilities": [
    "apps-script-web"
  ],
  "description": "Opens a Google Doc by ID, sends its text to Vertex AI Gemini, and renders the response as a structured summary card with word count and a link to the original doc. Requires VERTEX_PROJECT_ID in Script Properties.",
  "representativeQueries": [
    "show a AI-powered Google Doc summary via Vertex AI Gemini",
    "opens a google doc by id, sends its text to vertex ai gemini, and renders the response as a structur",
    "render a doc ai summary"
  ]
}
← Full ARD catalog Try it live →
Deploy your own renderer

The renderer is open source. Deploy your own instance in 4 commands — you own the URL, no dependency on the demo endpoint.

git clone https://github.com/a2uicatalog/a2ui
cd apps-script-surface/gas-schema-renderer
clasp push && clasp deploy
Full deploy guide →