Migrating Apple Notes to Google Keep

By mandclu, Sat, 05/18/2024 - 13:47

In the last few months I've become increasingly interested in Google Keep as a way to manage my notes. For a while I was a big fan of Evernote, but as they moved the emphasis away from the "free" part of their freemium model, I began to get frustrated by the limitations I encountered. I also briefly flirted with Note Station / DS Note, as a long time Synology fan, but I found the UX more than a little lacking overall. I also see some indication it may not be supported anymore.

For a long time I've used Apple Notes as a similar way to create and access notes across devices. This works really well, provided you're fully bought into the Apple ecosystem. As it happens, I work at a company that maintains Fedramp compliance, so my work computer is pretty locked down. That means no syncing via Apple ID, which means notes I take on my computer aren't available on my mobiles devices, and vice versa.

I do sometimes find the formatting options in Keep a little bare, but overall it meets my needs, and since my employer is bought into Google Workspace, Keep is a native way I can sync notes across devices effortlessly. I've also come to realize that Keep has some lesser-known features that are really useful. For example, if I have an email open in the GMail interface and start a Keep note in the sidebar, it will store a reference to the email in the Keep note.

It works the same way for Calendar meetings, which is awesome because for some time I have wanted a way to have my own (private) set of notes for upcoming events, for example to capture questions I want to ask. That said, you can also share Keep notes, though the last time I tried the meeting association doesn't come through to the other person, even if the same meeting is in their calendar. Also, when you're looking at the Keep note it shows the association (as a link) back to the event so it's easy to see when it was, who was present, the agenda, and so on. I wish it was easier to work the other way, in other words when looking at the event in the calendar to see a reference to any associated notes. Google Workspace does have a built-in capability to take meeting notes in a Google Doc that works really nicely, including a visible link to notes doc when you view the event in your calendar. I'm not sure if everyone in the meeting can see the notes created this way, but I'll have to test that.

What brought all of this to a head was that my work laptop had a meltdown, so I had to migrate all of my files and configuration to a new machine, and quickly. I decided that rather than just migrate all of my Apple Notes into the same structure on the new machine, this was a perfect time to bite the bullet and get all of my existing notes moved into Google Keep, and make that my solution moving forward. It took some scouring of the internet to figure out how to make it work, so I thought I would share what worked for me.

Note that some of the steps detailed below involve opening up permissions on downloaded scripts significantly more than I would have liked. I decided to bite the bullet since the machine I was working on would be decommissioned soon anyway, but if you're planning to follow the same steps on a machine you plan to keep using, make sure you either restrict the permissions again when you're done, or delete the permissioned scripts from your machine entirely.

Let's Do This!

  1. If you don't want to migrate all of your notes, it will be easiest to purge now, and can save you a lot of time at the end.
  2. Download Apple Notes Liberator - I already had a java runtime installed locally, so I just downloaded the jar file into a new ~/utilities directory. The first time you run this you will get an error, so you will need to give it "Full Disk Access" in the "Privacy & Security" tab of System Settings. Case in point about the permissions I mentioned earlier.
  3. In your terminal run `java -jar apple-notes-liberator.jar` - this will create a new directory called "liberated-notes" and inside that is a notes.sqlite database and a "markdown" directory that contains Markdown files of all your notes.
  4. Install python (if you haven't already). I ran brew install python but if you're not using homebrew there are alternate strategies available. Note that for me, all the python commands needed to specify python3 instead of python. Anything that called for pip install needed to be pip3 install and add the --break-system-packages flag (not for the faint of heart).
  5. Follow the installation instructions at https://github.com/djsudduth/keep-it-markdown?tab=readme-ov-file. Note that the cookie OAuth token expires after 5 minutes, so be ready to follow the remaining steps before going to the Google page.
  6. Inside your keep-it-markdown directory, you will see a settings.cfg file. Open this in your code editor and update the google_userid to the email of your Google account. Here you can also change the path of where it should look for the markdown files. I ended up copying the markdown directory from the step 2 into the expected path, but feel free to customize the configured path instead. Finally, I specified a tag of "migrated" so it would be easy to find all the notes that were part of the migration. Note that the label needs to already exist in Google Keep, it won't get automatically created as part of the migration process.
  7. If you have more than 150 files to import, break them up into separate directories of about 150, otherwise the next step will error out with a quota limit, and then you'll have to manually remove the ones that imported before you try again. It doesn't seem to use any predictable logic in the order it uses (definitely not alphabetical) so manually purging the files from the directory to import is a time consuming process.
  8. Within your keep-it-markdown folder run python3 kim.py -i. This should kick off the import. If you had to break up your files in the previous steps, you can edit the config between successive calls to the script (or you can rename the different directories to match the config files, deleting the successfully import directory at the end of each script run).
  9. Profit! Or, um, enjoy all the features of Keep with all of your migrated notes available.

One thing I didn't love is that there's no logical order to the migrated notes. I ended up using the "pin" feature of Keep to have all the notes I need quick access to at the top for the first few days. After that, my more recent notes were at the top anyway. One thing to note is that Keep seems to order the notes based on when they were created instead of when they were last edited, so making edits to your migrated notes won't change the order in which they appear.

Comments

Restricted HTML

  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.