Google Workspace Official Website
Table of Contents
Introduction
Do you find yourself spending precious time on repetitive tasks like "sending the same reminder email every week" or "regularly compiling spreadsheet data into a report"? If you use Google Workspace, these routine tasks can be dramatically automated and streamlined using "Google Apps Script (commonly known as GAS)."
This article is designed for complete beginners with no programming experience. We'll walk you through the fundamentals of GAS and guide you step by step through your very first automation — something you can get up and running today.
By mastering GAS, you can eliminate routine tasks that were taking minutes or even tens of minutes every day. Even without programming experience, by following the steps in this article one by one, you can experience your first automation today.
What is GAS (Google Apps Script)?
Google Apps Script (GAS) is a programming language and development environment provided by Google. It is built on "JavaScript," a widely used language for web development, and is specifically designed to connect and control Google's various apps, including Gmail, Google Sheets, and Google Calendar.
Its biggest advantage is that no environment setup is required at all. While starting programming typically involves the hassle of installing specialized software, GAS can be used right now, for free, with just a browser and a Google account.
| What GAS Can Do | Example |
|---|---|
| Automated email sending | Send weekly reports every Monday morning |
| Spreadsheet operations | Automatically compile form responses and create charts |
| Calendar integration | Automatically create reminders the day before a deadline |
| External API integration | Automatic notifications to weather services or Slack |
You can also access GAS directly from the Google Apps Script official page, but for beginners, the easiest way to get started is through the Google Sheets menu.
[Hands-On] Send Your First Automated Email with GAS
Now let's actually create and run a very simple program using GAS that "sends a test email to a specified address." Follow the steps below and try it hands-on.
First, open Google Drive and create a new Google Spreadsheet. Click "Extensions" in the top menu bar, then select "Apps Script."
A new tab will open with the GAS "Editor" screen where you write your program. Delete all of the pre-filled text function myFunction() { } and paste in the following code instead.
function sendTestEmail() {
// Recipient email address (* Please replace with your own email address)
const userEmail = "[email protected]";
// Email subject
const subject = "This is an automated email from GAS";
// Email body (\n means a line break)
const body = "This email was automatically sent by Google Apps Script.\nYou have taken the first step toward business automation!";
// Command to send the email
GmailApp.sendEmail(userEmail, subject, body);
}
Be sure to replace [email protected] with your actual email address where you can receive messages. Running the script as-is will not deliver any email.
Understanding the Code: A Beginner's Guide
Seeing a string of letters and symbols might feel overwhelming, but what the code is doing is actually very simple.
function: This declares "I'm about to create a set of instructions calledsendTestEmail."const: This command prepares a "box" to store data. For example,const subject = "~";means "put the text on the right side into a box named subject (the email subject)."" "(double quotes): In programming, text is enclosed in" "to tell the computer "this is just a string of characters."GmailApp.sendEmail(...): This is the dedicated command that actually operates Gmail. By placing the "recipient," "subject," and "body" boxes inside the parentheses, the email is sent.
For a weekly meeting reminder, just change subject to "Reminder: Weekly meeting is tomorrow" and body to the meeting URL and agenda — and you have a script ready to use in your work right away.
Overcoming the Big Hurdle: The "Unsafe Page" Warning
Once you've pasted the code, click the "Save" icon at the top of the editor, then click the "Run" button. This is where many beginners stop in surprise.
When you try to run a program for the first time, a popup saying "Authorization required" appears. After clicking "Review permissions" and selecting your account, you'll see a warning screen saying "Google hasn't verified this app" or "Unsafe page."
This screen is not dangerous. It is simply Google's standard security feature checking "Is this a dangerous program made by a stranger?" Since this is the safe program you just wrote yourself, follow the steps below to grant permission.
- Click the small text "Advanced" at the bottom left of the warning screen.
- Click "Go to (Untitled project) (unsafe)" at the bottom of the expanded text.
- On the access request screen, click "Allow" at the bottom.
After granting permission, the screen will automatically return, and you'll see "Execution completed" in the execution log at the bottom of the editor. Open your inbox and check whether the email from GAS has arrived.
If the email arrived, you've completed your first automation program! This authorization is only required the first time — from the second run onward, the email will be sent instantly just by pressing the "Run" button.
Full Automation with the "Triggers" Feature
Now that you can run the program manually, let's explore GAS's truly powerful feature: "Triggers," which automatically run your program based on conditions you specify.
Click the clock icon "Triggers" on the left side of the GAS editor screen, then press the "Add Trigger" button in the bottom right. Here you can configure in detail "which program" runs "under what conditions."
| Setting | Value for This Example |
|---|---|
| Choose which function to run | sendTestEmail |
| Select event source | Time-driven |
| Select type of time based trigger | Day timer |
| Select time of day | 8am to 9am |
Once saved, the email-sending program you created will run fully automatically every morning between 8 and 9 AM.
Once a trigger is set, automatic execution continues even after you close the spreadsheet tab. To make sure you haven't accidentally created duplicates, we recommend periodically checking your list of triggers on the GAS Triggers management page.
By applying this technique, you can build all kinds of automation systems — such as automatically compiling data in Google Sheets at the end of each month, or automatically sending reminders when events in Google Calendar are approaching.
Summary: Using AI to Make GAS Even More Accessible in 2026
In this article, we introduced the basic structure of GAS and the steps for creating a simple email-sending program.
Some of you might still feel that writing code is just too difficult. However, as of 2026, by leveraging generative AI like "Gemini" integrated into Google Workspace, you can simply ask in plain English: "Write GAS code to send an email to the addresses in column A of the spreadsheet, inserting the company name from column B" — and it will produce a perfect program in seconds.
You don't need to memorize everything. Start by identifying "what tasks could be automated," and use the basics you learned in this article — how to open the editor, how to run and authorize, and how to set up triggers — as your toolkit for the first step toward business efficiency. For more information on GAS, check out the Google Workspace Learning Center.
If you'd like to get even more out of Google Workspace, check out our guides on Admin Console basics and the Google Workspace feature overview. You can also stay up to date with the latest changes on the Workspace Updates Blog.
▶ Check Details & Start Your Free Trial on the Google Workspace Official Website