Docs Service vs Apps Script Why it works

Why Google Apps Script Couldn’t Convert My H2 Headings (and the Fix That Actually Works) If you’ve ever tried to programmatically convert Heading 2 → Heading 3 in Google Docs using Apps Script, you probably expected something simple like: And yet… nothing happened.Or worse: Exception: Unexpected error while getting the method or property setHeading on … Read more

How to Chunk Google Apps Script Code to Avoid Exceeded Maximum Execution Time

https://github.com/lsvekis/Apps-Script-Code-Snippets/tree/main/google-apps-script-chunking-pattern If you’ve ever run a Google Apps Script and hit this dreaded error: Exceeded maximum execution time —you’re not alone. This happens a lot when working with Google Docs, Sheets, Drive, or Gmail, especially when looping through large documents, spreadsheets, or folders. The good news?You don’t need to rewrite everything or give up on … Read more

Auto-Timestamp Rows in Google Sheets with Apps Script (When Status Changes)

https://github.com/lsvekis/Apps-Script-Code-Snippets If you use Google Sheets for workflows—submissions, approvals, task tracking, content pipelines—one thing always comes up: “When did this actually happen?” You can add timestamps manually, but: In this tutorial, you’ll create an Apps Script that automatically: ✅ Adds a timestamp when a row becomes Submitted / Complete / Approved✅ Only sets the timestamp … Read more

Automatically Protect Finalized Rows in Google Sheets with Apps Script

https://github.com/lsvekis/Apps-Script-Code-Snippets Accidentally overwriting data is one of the most common problems in shared Google Sheets. Someone edits a completed row.A formula gets replaced.A “final” value quietly changes. Google Sheets has Protected Ranges, but managing them manually doesn’t scale. In this tutorial, you’ll build a Google Apps Script that: ✅ Watches for edits✅ Detects when a … Read more

Highlight Duplicates Above in Google Sheets with Apps Script

https://github.com/lsvekis/Apps-Script-Code-Snippets Duplicates in a spreadsheet aren’t always “bad”—but sometimes they’re a sign of a problem. A common pattern is: you want values to be unique as you enter them, and if someone repeats a value that already appeared earlier in the same column, you want an instant visual warning. In this tutorial, you’ll build an … Read more

Built a Google Docs AddOn from Scratch

How to Build a Google Docs Add-On with Apps Script (Step-by-Step) https://github.com/lsvekis/Google-Docs-Addon Google Docs is incredibly powerful—but when documents are copied from Word, PDFs, LMS systems, or email, formatting quickly turns into chaos. Instead of fixing formatting manually every time, you can build a Google Docs Add-on using Google Apps Script that runs directly inside … Read more

Google Docs Smart Clean Up app One Click fix with Apps Script

Google Docs “Smart Cleanup” — One Click to Fix Spacing, Quotes, Dashes, and Hidden Characters https://github.com/lsvekis/Google-Docs-Smart-Clean-Up-app-One-Click-fix-with-Apps-Script If you work in Google Docs all day (course outlines, policies, SOPs, lesson plans, client docs), you’ve seen it: This post gives you a commonly needed Docs solution: a one-click “Smart Cleanup” menu built with Google Apps Script that … Read more

Build a Gemini Powered AI Dashboard Web App Google Apps Script

📘 Lesson 8 — Build a Gemini-Powered AI Dashboard Web App (Capstone Project) Blog Post #8 in the Apps Script + APIs + Gemini Series https://github.com/lsvekis/Google-Apps-Script-APIs-Gemini-8-Lessons- You’ve learned how to: Now it’s time to put everything together. In this final lesson, you’ll build a Gemini-powered AI dashboard — a real web app where users can: … Read more

Google Docs Style Resizer AddOn Menu with Apps Script

https://github.com/lsvekis/Google-Docs-Style-Resizer-AddOn-Menu-with-Apps-Script When a Doc has been edited by many people (or copy/pasted from other sources), font sizes can drift all over the place. This quick Google Apps Script adds a custom UI menu to your Google Doc that opens a sidebar where you can set font sizes for: …and then apply those sizes across the … Read more

Gemini-Powered Google Docs Summaries Rewrites and AI Writing Tools

📘 Lesson 7 — Gemini-Powered Google Docs (Summaries, Rewrites & AI Writing Tools) Blog Post #7 in the Apps Script + APIs + Gemini Series Google Sheets is about data.Google Docs is about thinking, writing, and meaning. In this lesson, you’ll bring Gemini directly into Google Docs, allowing users to summarize documents, rewrite sections, and … Read more