8 Useful Things with Google Sheets & Apps Script

Google Apps Script: An Overview
Google Apps Script represents a remarkably versatile scripting language frequently utilized within the context of Google Sheets.
The platform empowers users to create streamlined web applications.
These scripts are executed on Google's servers, leveraging the benefits of cloud computing.
Capabilities and Potential
The functionalities described represent only a preliminary exploration of Google Apps Script's capabilities.
Should you have additional requirements or objectives, a comprehensive search using Google may reveal viable solutions.
It is highly probable that a wide range of tasks can be accomplished through this scripting environment.
Consider exploring online resources to discover the full extent of its potential.
Scheduling Emails with Gmail
For those interested, here's information related to 10 Tips and Tricks for Google Docs.
Currently, Gmail lacks a native feature for scheduling email delivery. While third-party applications or services can be utilized, an alternative solution exists through the use of Google Apps Script.
The Gmail Sheet Scheduler offers a method to schedule emails directly from a dedicated spreadsheet. This spreadsheet imports draft emails from your Gmail account.
Users can then assign specific dates and times for each email's delivery. Activating a menu option initiates the script, which automatically sends the messages according to the pre-defined schedule.
This process is facilitated by a compact script operating within your Google account. Consequently, reliance on external services and the need to keep web pages open are eliminated.
How the Scheduler Works
- Draft emails are imported from your Gmail account into the spreadsheet.
- Dates and times for sending are assigned to each imported draft.
- A script is triggered via a menu option to dispatch the emails at the scheduled times.
- The entire operation occurs within your Google account, enhancing security and convenience.
This approach provides a secure and efficient way to manage email sending times without depending on external platforms. It leverages the power of Google Apps Script for streamlined email scheduling.
Receive Alerts for Website Downtime via SMS or Email
For those responsible for website maintenance, numerous commercial services exist to continuously monitor site availability. These services promptly notify you via SMS should any downtime occur, enabling swift corrective action.
The Website Uptime Monitor script offers a similar functionality, leveraging the capabilities of Google Docs. It performs checks on your specified website at five-minute intervals.
Should the website become inaccessible, the script automatically generates a calendar event within your Google Calendar. This event is configured with a reminder designed to instantly dispatch an SMS message to your phone.
This method utilizes Google Calendar’s built-in SMS reminder feature for sending notifications, which is typically free of charge. However, standard SMS reception rates from your mobile carrier may apply.
Alternative Notification Method
Beyond SMS alerts, the script also provides the option to receive notifications via email. This offers flexibility in how you are informed of website outages.
The system effectively utilizes existing Google services to provide a cost-effective solution for proactive website monitoring and rapid response to availability issues.
Utilizing Google Drive for File Reception
Leveraging your Google Drive as a repository for incoming files can be highly beneficial. This method proves particularly useful for scenarios like freelancers receiving deliverables from clients, or educators collecting submissions from students.
Instead of relying on email attachments, individuals can simply utilize an Upload button integrated into a webpage to select and submit files. While Google Forms is a versatile tool, it currently lacks a native file-uploading capability.
Implementing a File Upload Solution with Google Apps Script
Google Apps Script provides the functionality to develop a dedicated file-uploading webpage. This page will directly store any uploaded files within your designated Google Drive storage location.
The process involves creating a new HTML file containing the necessary code. Subsequently, this file must be made publicly accessible.
Steps for Deployment
- Create a new HTML file and populate it with the appropriate script.
- Ensure the file is set to be publicly viewable.
- Share the generated link with those who need to submit files.
This streamlined approach offers a convenient and efficient alternative to traditional email-based file transfers, enhancing workflow and organization.
Executing a Mail Merge
Despite its antiquated name, the process of a "mail merge" remains a valuable technique. This method facilitates the dispatch of customized emails to a large number of recipients through the creation of a standardized template.
Consider, for instance, a template structured as "Hello $PERSON, we hope you are well." Utilizing a mail merge, a list containing email addresses and corresponding names can be employed to generate personalized emails, each beginning with the recipient's individual name.
This functionality can also be replicated using Google Apps Script. Further details are available in the Mail Merge with Gmail script documentation.
The process allows for efficient communication while maintaining a personal touch.

Utilizing the Snooze Function in Gmail
The ability to "snooze" emails represents a contemporary functionality integrated within both Gmail's interface and Dropbox's Mailbox application. This feature fundamentally enables users to temporarily dismiss an email message from their inbox.
Upon activation, the message will reappear at a user-defined future time. This process facilitates inbox organization while simultaneously guaranteeing that important communications are not overlooked.
How Snoozing Benefits Users
By employing the snooze function, individuals can effectively declutter their inbox, focusing on immediate priorities. The delayed re-appearance of the email serves as a reminder for tasks or information requiring future attention.
This is particularly useful for emails that don't necessitate an immediate response but are important to address at a later date.
The official Google Apps Developer blog highlighted this functionality as a practical demonstration of the capabilities offered by Google Apps Script.
Specifically, the blog showcased the creation of a Gmail Snooze script, illustrating how developers can leverage the platform to extend and customize email management.
Monitoring Amazon Product Prices
The Amazon Price Tracker utilizes a script designed to monitor the prices of products listed on Amazon.com, as well as localized Amazon sites such as Amazon.ca and Amazon.co.uk. This script functions by accepting a compilation of product URLs.
How the Tracker Operates
Daily, the script accesses each provided webpage. A consolidated email digest is then generated, detailing any observed price fluctuations. This allows users to stay informed about price changes without constant manual checking.
For consumers seeking to make purchases at the most advantageous price point, this tool provides a valuable service. It facilitates informed buying decisions by alerting users when prices decrease.
Essentially, the Amazon Price Tracker automates the process of price observation, saving time and potentially money.
The script’s functionality centers around consistent monitoring and timely notifications regarding price adjustments.
This is particularly useful for items where price volatility is common, or for products you are willing to wait for a discount on.
By providing a daily summary of price movements, the tracker empowers shoppers to capitalize on favorable pricing opportunities.
The system is designed to be straightforward and efficient, delivering relevant information directly to your inbox.
It’s a practical solution for anyone who regularly shops on Amazon and wants to ensure they are getting the best possible deal.
Automated Deletion of Older Emails
Outlook.com, provided by Microsoft, incorporates a beneficial function known as "auto-sweep." This allows for the automatic removal of emails originating from designated senders following a specified timeframe.
As an illustration, daily promotional offers from Groupon can be received, and Outlook.com can be configured to delete these newsletters automatically after one month.
This prevents the accumulation of years' worth of outdated newsletters, thereby conserving inbox space and maintaining organization.
Leveraging Gmail for Automatic Purging
The Gmail Auto-Purge script offers the capability to oversee a selected label within your Gmail account.
It then proceeds to automatically delete emails contained within that label after a predetermined duration.
When combined with Gmail’s filtering system, which facilitates the automatic labeling of messages, this script can be highly effective.
This combination provides a valuable tool for managing and streamlining your email inbox.
Tracking Email Opens in Gmail
While Microsoft Outlook provides a built-in function for requesting and receiving read receipts, Gmail lacks this native capability. Read receipts, when available, offer confirmation when an email has been viewed by the intended recipient, though their accuracy isn't guaranteed.
However, users can replicate this functionality in Gmail by utilizing the Email Tracker script. This script integrates with Google Analytics to monitor email open rates.
How Email Tracker Works
The script functions by embedding a minuscule, 1x1 pixel image within each email sent through the script.
Google Analytics then registers an event each time this image is loaded by the recipient’s email client. This provides data on email opens.
With Gmail’s automatic image loading now enabled by default, the tracking provided by Email Tracker is expected to be increasingly precise.
- The Email Tracker script leverages Google Analytics for open tracking.
- A tiny, invisible image is inserted into each email.
- Image access is reported by Google Analytics, indicating an email open.
The increased reliability of tracking is due to Gmail’s default image loading behavior.
Credit for developing this and many other helpful scripts is due to Amit Agarwal of Digital Inspiration.





