AI Agents as Workspace Add-ons Across Gmail, Chat, Calendar
Build and deploy AI agents via Google Workspace add-ons that span Gmail, Chat, Calendar, Drive using Cloud Run endpoints calling Vertex AI for contextual trip planning, support, and automations.
Cross-App Agent Deployment Unifies Workflows
Google Workspace add-ons enable single AI agents to operate across Gmail, Calendar, Drive, Chat, and Docs without losing context. Users access the agent via sidebar in Gmail (e.g., for email-triggered trip planning) or dedicated Chat app, with buttons to switch apps seamlessly. The agent uses Gemini's multimodal capabilities to process text, images, and follow-ups—like extracting Paris trip dates from an email, suggesting Air France flights from New York, checking US citizen visa rules (none needed now, ETIAS required late 2026), and grounding responses with Google Search sources. Administrators install domain-wide, boosting team productivity by pulling email context (subject/body) into prompts automatically.
Impact: One deployment handles investigations, customer email aggregation, or support, reducing app-switching and manual data entry.
Internal and External Use Cases Drive Adoption
Two categories emerge: 2P (second-party, internal) for custom automations like incident investigation agents aggregating in-house data or email responders pulling multi-source info; 3P (third-party) for marketplace apps, such as ServiceNow's virtual agent in Chat for issue resolution or Figma's Chat integration with Meet/Docs for notifications, image previews, and diagram comments without leaving conversations.
Impact: Internal builds cut response times (e.g., faster customer emails); external ones scale to other orgs via marketplaces, like Figma keeping users in Chat flow.
Architecture and Code for Production Agents
Core flow: User interaction in Workspace triggers HTTP endpoint on Cloud Run service, which extracts payload (via Chat API for Chat events), user identity, and context (e.g., selected email via extractEmailContents). Augmented prompt feeds Vertex AI Agent Engine (or similar) for responses. Deployment: Enable Google Chat API in Cloud Console, configure app name/avatar/URL/description, interactive features (join spaces), and Cloud Run endpoint. Test locally, then publish internally or to marketplaces with IT approval.
Code entrypoint inspects event.chat for Chat payloads, handles Gmail context injection—basic web app patterns with docs samples. Full travel agent code/tutorial online.
Impact: Cloud Run + Vertex AI delivers reliable, scalable agents; context injection (email body) ensures accurate outputs like flight/visa handling.
Four Takeaways for Builders
- Extend Workspace for productivity across Chat/Gmail/Calendar/Drive/Docs. 2. Target 2P (own org) or 3P (others). 3. Single add-on spans apps with shared state. 4. Deploy via Cloud Run to Vertex AI (or alternatives) for agentic logic.