Apps Script Code Examples

Google Apps Script is a powerful tool for automating workflows, integrating APIs, and enhancing productivity within Google Workspace applications. In this blog post, we’ll explore five beginner-friendly projects demonstrating how to work with APIs using Apps Script. These projects will teach you how to send GET and POST requests, handle JSON and XML data, authenticate … Read more

Building an Advanced To-Do List with Drag & Drop, Task Deletion, Completion Toggle, and Dark Mode

Building an Advanced To-Do List with Drag & Drop, Task Deletion, Completion Toggle, and Dark Mode We’ve built a solid to-do list application, but let’s take it up a notch! 🚀In this updated version, we are adding: ✅ Task Deletion (Remove tasks with a delete button)✅ Task Completion Toggle (Mark tasks as completed with a … Read more

Building an Advanced To-Do List with Drag & Drop and Local Storage

A to-do list is one of the most common beginner projects in web development, but in this blog post, we’ll take it to the next level! 🚀 We’ll build an advanced to-do list using HTML, CSS, and JavaScript, featuring: ✅ Drag & Drop functionality✅ Local Storage support (Tasks persist even after refreshing)✅ Dynamic Task Management … Read more

Building a Free Multi-Language Translator Using Google Translate API and JavaScript

Are you looking for a simple and effective way to translate text in your web applications? In this blog post, we’ll walk through building a multi-language translator using Google’s free Translate API and JavaScript. This lightweight solution lets users enter text, select a target language, and get instant translations—all without an API key or complex … Read more

Automate Document Splitting in Google Docs Using Google Apps Script

Managing large documents in Google Docs can be challenging, especially when dealing with multiple sections under Heading 1. Manually splitting these sections into separate documents is time-consuming and prone to errors. With Google Apps Script, we can automate this process by identifying each Heading 1 section and creating a new document for each. This script … Read more

Restoring Default Heading Styles in Google Docs

🚀 The Problem: Restoring Default Heading Styles in Google Docs Google Docs allows users to modify heading styles to fit their needs. However, after making several changes, resetting all headings back to default styles (as defined in the document’s theme) is not straightforward. Currently, Google Docs does not provide a built-in way to reset all … Read more

The Problem: Formatting Exercises in Google Docs

Imagine you have content in a Google Doc that looks like this: Exercise 1: Introduction to Functions Learning Objective: Understand how functions work in JavaScript.Exercise 2: Variables and Scope Learning Objective: Learn about variable declaration and scope in JavaScript. You want to:✅ Set each “Exercise” heading to Heading 3.✅ Move “Learning Objective:” and the following … Read more

Working with APIs Google Apps Script

Setting up Twitter API First, create a Twitter developer account and an app to acquire the Bearer token. Then, utilize UrlFetchApp in Google Apps Script to access Twitter API, incorporating “Authorization: Bearer …” in the request header. Below is a step‐by‐step guide on how to use Google Apps Script (GAS) to connect to the Twitter … Read more

Limited-Time Udemy Course Sale – Best Price Possible

🎯 Use the promo code JANB25 to unlock HUGE savings on my top-rated courses for the next 4 days only! Don’t miss out on this chance to boost your skills and level up your career at the best price available! 🔥 Did you miss a deal before? Now’s your chance! Grab these incredible courses today … Read more

Display sheets in popup Modal

Apps Script Code (Code.gs) function showModal() { var html = HtmlService.createHtmlOutputFromFile(‘Index’) .setWidth(400) .setHeight(300); SpreadsheetApp.getUi().showModalDialog(html, ‘Select a Sheet’);}function getSheetNames() { var sheets = SpreadsheetApp.getActiveSpreadsheet().getSheets(); var sheetNames = sheets.map(sheet => sheet.getName()); return sheetNames;}function findSheetData(sheetName) { var sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName(sheetName); if (!sheet) return { success: false, data: [] }; var data = sheet.getDataRange().getValues(); return { success: true, data: … Read more