You Can Copy Paste, So You Can Code

If you can copy and paste you can code

Coding Requirements: Copy and Paste

I code with Google Apps Script which is based on JavaScript. How do I code… I copy and paste. There is a TON of sample code out on the Internet that you can steal. At first, I would copy and paste code. Then I would need to read through it and figure out what I needed to adjust. I copy and paste a lot less code now, by using “analyze over memorize” I got this!

script.google.com

You can create a new script at script.google.com. Choose “New script” in the upper left hand corner.
new script

Try This

create a Google Doc

Copy and paste the code below into the script editor.

function createDoc() {

DocumentApp.create(‘Alice Keeler Document’);

}

Now, modify it! After copying and pasting the code, try to make sense of it and modify it slightly!

Breaking Down the Code

1. function

You can have more than one function. A function is a chunk of code. It starts with lowercase function and then a space and then what you want to name the function. Note that your function name can not have a space. To use more than one word, smash the words together and capitalize the 2nd word.

Remember function notation from algebra? f(x) = x + 2.
The function f has a parameter (x). If you had f(5) you would replace all the x’s with 5’s. f(5) = (5) + 2.
It’s like that!!! Except usually, I do not have parameters when I code so it’s more like f().
So you need the empty parenthesis to say that your function does not have parameters!

2. Curly Braces

Curly braces trap the code for that function.

3. What App Are You Using?

Typically my first line of code is “What Google App are you using?” In this case I am coding a Google Doc so it is DocumentApp. Notice the capital D and A. It’s important.

4. Period

When you type a period in Google Apps Script it will give you a multiple choice menu for what methods (code) you can use. The awesome thing about Google Apps Script is that it is super readable!

5. Create

Reading the list of multiple choice options one of them says “Create().” I KNOW WHAT THAT DOES! It will create a Google Doc. In the parenthesis you can name the Google Doc you are creating! I named mine ‘Alice Keeler Document.’ Notice the single quotations! All text strings (stuff you want to type) must be in quotations.

6. Semicolon

At the end of each line of code you want to have a semicolon!

Save and Run

Modify something small! (Hoping you changed what I named the document) then press the save button (or Control S) and press the Run button (triangle icon.) You will be prompted to name the script and authorize the script. You may get a screen that has a button that says “Return to safety.” Ignore that button and click on “Advanced” and then click on the link that says “unsafe” (it is safe, you coded it so you know it is not malicious code.)

Check Google Drive

You just created a Google text document. Check recent to see if it worked!

Now Modify

We used DocumentApp to create a new Google Doc. Do you think you can create another type of Google App?

SlidesApp
FormApp
SpreadsheetApp
CalendarApp
MapsApp
ContactsApp
DriveApp
GmailApp

DocumentApp

On the Google Apps developer site is sample code you can copy and paste!! Check out this page for DocumentApp. Scroll through and find code that you can copy and paste!
copy Google Docs

Modify My Code

alicekeeler.com/scripts

Copy and paste MY scripts! Go to my scripts page make a copy of one of my templates. Use the Tools menu and choose “Script editor.”

alice keeler codes




About Your Data PII

App’s use and transfer to any other app of information received from Google APIs will adhere to Google API Services User Data Policy, including the Limited Use requirements.

Compliance with Google’s Limited Use Policy

AliceKeeler LLC is committed to complying with the Google API Services User Data Policy, including the Limited Use requirements. Our use and transfer of information received from Google APIs adhere strictly to these policies, ensuring data is used only for the purposes necessary to provide and improve the Service.

  • Limited Use of Google User Data: The Service only accesses and uses Google user data in ways that are essential for the functioning and improvement of the Service, and not for independent purposes.
  • Transparency and Consent: We provide clear notice and obtain explicit consent from users before accessing or using their Google user data.
  • Data Minimization: We access only the minimum amount of data necessary from Google APIs to provide our Service.
  • Security Measures: We implement robust security measures to protect the confidentiality, integrity, and availability of Google user data.
  • Third-Party Sharing Restrictions: We do not share Google user data with third parties unless it is strictly necessary for the functioning of the Service and compliant with the Google API Services User Data Policy.
  • Google API Services User Data Policy: For more information about how we comply with the Google API Services User Data Policy, including the Limited Use requirements, please visit Google API Services User Data Policy.

For any questions or concerns regarding our use of Google user data, please contact us at info@alicekeeler.com.

© 2025 All Rights Reserved.

💥 FREE OTIS WORKSHOP

Join Alice Keeler, Thursday Oct24th or register to gain access to the recording.
Create a free OTIS account.

Join Alice Keeler for this session for using FigJam to start every lesson.

Exit this pop up by pressing escape or clicking anywhere off the pop up.