Build AI-Powered Workflows with Google Apps Script + Gemini

Project source code

https://github.com/lsvekis/Gemini-with-Apps-Script

🚀 6 Mini Projects You Can Copy, Learn From, and Use Today

AI is transforming the way we work inside Google Workspace. Whether you’re building custom tools for Sheets, automating Gmail, or creating smarter Docs workflows, Gemini makes it possible to add real intelligence to your Apps Script projects with just a few lines of code.

To help beginners get started fast, I created six fully working Apps Script mini-projects, each designed to teach essential Gemini patterns through simple, hands-on examples.

These projects are small, practical, and easy to customize—and you can upload them directly to GitHub or copy them straight into Apps Script.


📁 Download All Source Code

All six projects are included here:
👉

Each project is in its own folder with clean, ready-to-run code.


🔧 Project 1 — Core Logger Demo

Your first Gemini API call inside Apps Script

This introductory project includes a clean helper function and a simple testGeminiSimple() function that sends a short prompt and logs the result.

You’ll learn:

  • How to call Gemini from Apps Script using UrlFetchApp
  • How to store your API key using Script Properties
  • How to parse API responses
  • How to log AI-generated output

This is the smallest, most beginner-friendly example to help you understand the core flow.


📊 Project 2 — Google Sheets Custom Function

Add AI directly to your spreadsheets

This project creates your own custom formula:

=GEMINI_COMPLETE("Explain VLOOKUP in simple terms")

Just like built-in functions, this formula:

  • Accepts a prompt
  • Calls Gemini
  • Returns a clean, plain-text response directly in a cell

Great for:

  • Rewriting text
  • Generating ideas
  • Explaining formulas
  • Creating data
  • Summarizing content

If you’re new to Sheets + AI, this is a fantastic starting point.


🧰 Project 3 — Gemini Prompt Pad (Sheets Sidebar App)

Your own AI writing assistant inside Google Sheets

This project builds a full sidebar app using HTML, CSS, and Apps Script.

Features:

  • A clean input box to write prompts
  • A “Ask Gemini” button
  • Real-time results displayed in the sidebar
  • One-click insertion into the selected cell

This shows how to:

  • Build a UI using HTMLService
  • Send data from HTML to Apps Script
  • Update cells programmatically
  • Keep the UX smooth for end users

A perfect example for anyone who wants to build custom interfaces inside Google Sheets.


📝 Project 4 — Google Docs Text Summarizer

Summarize selected text using Gemini with one click

This Docs add-on adds a new menu:

AI Tools → Summarize selection with Gemini

It reads the user’s highlighted text, sends it to Gemini, and inserts a formatted summary at the end of the document.

You’ll learn:

  • How to access a user’s selected text
  • How to modify the document body
  • How to append AI-generated content
  • How to build Google Docs add-ons

This is one of the most useful automation patterns for productivity.


📧 Project 5 — Gmail Draft Reply Generator

Turn any email into a polished AI-generated reply

This script:

  1. Reads your most recent email
  2. Extracts sender, subject, and body
  3. Sends it to Gemini for drafting
  4. Creates a new Gmail draft reply automatically

This is a real-world automation example using GmailApp.

Perfect for beginners who want to:

  • Speed up email responses
  • Create client-ready replies
  • Learn Gmail automation patterns
  • Build AI-powered communication tools

💡 Project 6 — Mini Examples Collection

Small functions that demonstrate common AI workflows

This project contains several tiny examples you can mix and match:

  • Convert a list into clean bullet points
  • Explain a piece of code step-by-step
  • Generate multiple-choice questions
  • Use try/catch for safer AI calls

This folder is perfect for experimenting and learning patterns you can reuse in bigger projects.


🎯 Why These Projects Matter

These examples are intentionally simple—but powerful:

  • No external dependencies
  • No complicated setup
  • No additional services
  • Just Apps Script + Gemini

Each project teaches a different skill:

SkillProject
First Gemini API callCore Logger
Custom Sheets functionSheets Custom Function
Sidebar UI + HTMLServiceGemini Prompt Pad
Docs automationDocs Summarizer
Gmail automationDraft Reply Generator
Reusable AI promptsMini Examples

Together they form a complete foundation for building AI-powered tools inside Google Workspace.