Email notes to yourself from your phone using Google Sheets
In this tutorial, I will teach you how to build a simple app to email yourself notes and ideas from your phone using Google Sheets, Google Forms and Google Apps Script.
People have all sorts of personal preferences for jotting down quick notes or ideas. Some people carry dedicated notebooks for this purpose. Others use apps on their phone or on their computer to save their notes and ideas.
Over time, I've personally developed a habit of emailing notes, ideas and tasks to myself. I've found that this is a particularly effective way for me to keep track of these things since I'm able to use the same organization system and workflow that I use for email. Not needing to check yet another app regularly is a huge benefit of this approach.
My workflow for emailing notes to myself was a bit cumbersome and looked like this:
Open the Gmail app on my phone.
Select my own email address as the recipient of the email (easy to make an inadvertent error and select someone else's email address instead!)
If it is a short note, enter it as the subject and leave the body of the email to be blank. If it is a longer note, add a summary in the subject line and enter the note in the body of the email.
Send the email.
Wait for a few seconds to receive it and add a label to organize the email as a note (I have a label called "Note" that I use to organize notes that I email myself).
A few weekends ago, I ended up sending myself several notes and this experience finally made me research apps that I could use to make my workflow simpler and more efficient. I found a few free apps and some paid ones but most of these seemed overkill for my simple use case and a few also gave me pause from a privacy standpoint (wait, why exactly does an app need access to my phone's camera and location for a simple note taking use case?).
After trying out a few apps, and not liking any of them, I decided to give building a custom one using Apps Script a try. I was surprised by how simple and easy it was to build this "app" and I'm guessing that you will be surprised too! I've been using this app to email myself notes for the past few weeks and it has been working great for me! This tutorial will teach you how to build the exact same app that I built and I hope you find it to be useful too.
PrerequisitesFamiliarity with Google Sheets, Google Forms and Apps Script
If you're new to coding, I've written a series of tutorials to help you learn to code using Google Sheets and Apps Script.
6 easy steps to build an app to email notes to yourself from your phone using Google Sheets and Apps ScriptStep 3 — Use Apps Script to send you an email whenever the form is submitted
Step 6 — Set up a filter and a label to organize your notes in Gmail
Step 1 — Create a new Google Sheets spreadsheet
Familiarity with Google Sheets, Google Forms and Apps Script
If you're new to coding, I've written a series of tutorials to help you learn to code using Google Sheets and Apps Script.
Step 3 — Use Apps Script to send you an email whenever the form is submitted
Step 6 — Set up a filter and a label to organize your notes in Gmail
Step 1 — Create a new Google Sheets spreadsheet
Create a new Google Sheets spreadsheet. This is the spreadsheet where your notes will be stored in addition to being emailed to you.
★ Tip
You can create a new Google Sheets spreadsheet using one of the following links: https://sheets.new or https://spreadsheets.new.
Step 2 — Create a form from the spreadsheet to take notes
Select Create a form from the Tools menu.
Configure your form so it has a single question of type Paragraph. Feel free to customize the form to suit your needs, but in this tutorial, I'll be assuming that the form has a single question and that the title of that question is "Note" (like in the screenshot below). If you structure your form differently, you'll also have to edit the script that we'll be writing in step 3 to align with those changes.
Ensure that the form does not require signing in to access it. The UI may look a bit different based on whether you are using a Gmail or a G Suite account.
If you're using a regular Gmail account, ensure that the "Limit to 1 response" checkbox is unchecked.
If you're using a G Suite account, ensure that both checkboxes under "Requires sign in" are unchecked.
⚠ Warning
The reason we don't want to require sign in is because we want to be able to quickly access the form and add a note. Being presented with a "sign in" prompt each time will defeat the purpose of making it super easy to add a note.
Even if someone else somehow found out the public link to your form, they will only be able to add a new note. Importantly, they won't be able to view your previously entered notes. I personally find this tradeoff between convenience and security to be OK.
However, to prevent others from seeing your notes, please ensure that:
The checkbox "See summary charts and text responses" under "Respondents can" is unchecked.
The spreadsheet is private and is not shared with anyone else.
The form does not have any collaborators.
The final step to finish configuring your form is to get its public link and test entering a note.
Click the Send button on the top right of the form.
Select the link option, and copy the link address and paste it somewhere where you can access it again — We'll be using this link in step 5. Note: I've blacked out the link in the screenshot below because that's the link to the actual form I use to enter my personal notes :).
Step 3 — Use Apps Script script to send you an email whenever the form is submitted
Select Extensions —> Apps Script to open the Apps Script editor and replace the code in the editor with the code below.
⚠ Please replace the email address youremail@example.com in the code snippet below with your email address.
//@OnlyCurrentDoc
function formSubmit(e) {
sendEmail(e['namedValues']['Note'][0]);
}
function sendEmail(note) {
var recipient = "youremail@example.com"; //replace with your email
var subject = "#NoteToSelf - " + getDateStr();
MailApp.sendEmail(recipient, subject, note);
}
function getDateStr() {
var date = new Date();
return date.getFullYear() + "/" + date.getMonth() + "/" + date.getDate();
}
Note
If you used a different title than "Note" for the question in the form, please also use that title in the code below. Replace 'Note' with the title of your question (don't forget to enclose your question within single quotes!).
sendEmail(e['namedValues']['Note'][0]);
Also, don't forget to replace the email address in the code with your email address.
Step 4 — Create an installable trigger to run the formSubmit() function whenever your form is submitted
Open the script's triggers page by clicking on the clock icon.
If you're not familiar with the concept of triggers, please consider reading a tutorial that I've written on Triggers in Google Sheets.
Click + Add Trigger on the page and configure the trigger with the following settings:
Function to run: formSubmit (this is the function in your script that will be run)
Deployment to run: Head
Event source: From spreadsheet
Event type: On form submit
Click Save to finish setting up your trigger.
When you click save, you will be asked to authorize your script. If you're not familiar with this process please refer to the tutorial on Authorizing Apps Scripts. Once you authorize, the trigger will be set up and will be displayed on the triggers page.
Try submitting your form now. If the trigger was set up correctly you should receive an email with your note.
Step 5 — Create a shortcut to the form on your phone and place it on your phone's home screenNote
These instructions are for the Chrome browser on android but most browsers on android support this feature. On iOS, you must use the Safari browser and select "Add to Home Screen" from the share menu.
Note
These instructions are for the Chrome browser on android but most browsers on android support this feature. On iOS, you must use the Safari browser and select "Add to Home Screen" from the share menu.
Open the form on your phone's browser (this is the link you copied previously where you submit a response).
Click the three dots menu (⠇) and select Add to Home screen.
Choose a name for your shortcut.
Place your shortcut manually or choose to add it automatically.
That's it! You now have a shortcut on your phone to quickly add a note or log an idea.
When you add a note by submitting your form, you will receive an email with your note.
Below is an example of a note that I just submitted.
I promptly received an email with the note.
Step 6 — (optional) Set up a filter and a label to organize your notes in Gmail
In order to make these emails easier to notice and find, I set up a filter in Gmail to automatically label any email with a subject containing #NoteToSelf as a note.
This makes these emails super easy to notice and they're all neatly categorized under a label called Note.
I used the configuration below to set up the filter in Gmail. In addition to labelling these emails, I also ensure they will never get sent to Spam and will always be marked as important and categorized as Primary.
Conclusion
In this tutorial, I showed you how easy it is to build a simple note taking app using Google Sheets and Apps Script. I'm constantly amazed by the number of simple yet useful applications that you can build using spreadsheets!
The actual code was only around 10 lines long but we have a fully functional note taking app that is easily accessible from a phone and also emails the note to you. Such is the power of Google Sheets and Apps Script.
I hoped you enjoyed building this app and I hope you found this tutorial to be useful.
Thanks for reading!