This article is for the following scenario:
- You use iOS and a Gmail (Google Apps) account, and sync your notes between Gmail and iOS / Apple Mac OS X.
- You accidentally deleted the label “Notes” in Gmail, because you didn’t think it was important
- Now, your Notes are missing, or you don’t know how to get them in Gmail anymore.
Basically, Apple creates a system label called “Notes” within Gmail. It tags all Notes you create with this label. Interestingly, it tags all versions of each note with this label. So, any note you update may have dozens or hundreds of versions contained within it. Gmail essentially saves all of these notes as unsent emails, if you will.
The problem comes if you delete this label called “Notes”. I did this because I didn’t remember creating it (oops!).
I noticed that each Note has a unique entry in the header of the email, which looks like this:
So, in order to locate all the emails in Gmail that are notes, we have to find all emails that have that identifier. Unfortunately, Gmail does not allow searching the headers in this way for this particular field.
The way I was able to locate all the correct headers was to load my Gmail via IMAP in another email program that allows searching headers. I happened to use Microsoft Outlook 2016, but perhaps other apps will allow you to do the same thing. You just need an email app that supports IMAP, and supports searching headers.
Here are the instructions on how to do this in Outlook:
- First, Go ahead and create a new “Notes” label in Gmail (either through Outlook or through the Gmail interface). Or, allow iOS to re-create the label. We’re going to move the notes back to the right place in a later step.
- IMPORTANT: If you want iOS to recognize it, then you should make sure iOS creates the label automatically, you should NOT create the label manually.
- Make sure your Gmail account is added to Outlook, and that the “All Mail” folder is available as an IMAP folder. (If you don’t know how to do this, Google it).
- Go into the “All Mail” folder and make sure it is fully populated in Outlook.
- What you want to do next is create a Rule which will search the headers. Click “Rules” in the ribbon, and then “Create Rule…”
- Choose “Advanced”
- Choose the option, “with specific words in the message header”
- Now, populate the search with this text: com.apple.mail-note
- On the next step, we want to move the matching items to the “Notes” label that you created in step 1. To do this, check the option “move it to a folder”, and then choose the folder called “Notes”:
- Click “Next” through the options. On the last page, choose the option, “Run this rule now on messages already in “All Mail” and UNCHECK the option, “Turn on this rule”.
- Click “Finish” and it should run. It may take a while if you have a lot of emails.
When you’re done, you should now have that Notes folder populated in Gmail.
As always, if you have any issues, please post in the comments!