[SOLVED] Importing from Google Keep

I had better success following This thread and using the script from this repo to convert the Keep exported html to an enex file. Evernote is not required, the resulting converted enex can be imported directly into Joplin. It does seem like some notes were lost, so I will at some point try to figure out what those notes were :confused:

2 Likes

If you have a folders with plain text files, you can import them into Joplin directly using the “Import > Markdown (directory)”.

However if they are in HTML, you indeed need to convert them to ENEX first. Perhaps importing from HTML should be added to Joplin to avoid these additional conversion steps.

7 Likes

Using the script I linked above I was able to convert the GK export from TakeOut which produces an enex file from the raw GK html. Joplin imported this directly and all’s well, including timestamps!

1 Like

If the process in the python script could be integrated properly, that would be a great way to import GK data without having to search around for a script that works.

3 Likes

Can I ask how you got the script to work? I have been trying for 2 days not to import my data from google keep to Joplin without success. I have the same issue as the user reported here:

I can successfully convert one file however it does not take the argument /*html to process the while folder. I get the same error as the user reported. Were you able to get this to work?

1 Like

Were you able to get this to work?

Hey!
I've just created this account to share a working version of the python script.

This one solves the html bulk operation problem and also avoids possible charset problems on windows computers.

I changed it so it doesn't take any arguments.Just put the script in the same folder with your html files from Google Keep(from Takeout). Run it with python3. It will create an enex file within the same folder.

Just like with the other one shared in this thread, you might need to install parsedatetime with most probably a command like pip3 install parsedatetime

keep20191210-to-enex6.1.py (5.0 KB)

I exported over 800 notes using this script (and Joplin Desktop).
Hope it works for you too.

4 Likes

@gme Maybe you want to add a new topic to the #apps category for your script.

It’s just a slightly modified version of the former one, I wouldn’t want to get the credit. But this post comes up as the first result on Google when people search for anything related to importing notes from Google Keep to Joplin. So I just wanted to add a better working(for my case at least) solution.

1 Like

yes! Importing from HTML would be a great and super useful feature!

1 Like

Unfortunately I can’t import the enex file created by the last version of the python program by @gme. Screenshot of the error message:

it seems something like an encryption error. Joplin crashes, too.

If anyone could help, I’d be very grateful!

@xplosionmind is there a reason why you take s screenshot of a terminal instead of copying the text directly and put it in a code block?

You know, I once asked a customer to send me the error message and I got a Word document with a screenshot of the terminal window cramped into half a page. All I needed was a few lines of text in an email. Especially since I didn’t have Word and needed to copy the error code number to search for it in a reference database. I can’t copy text from an image.

I’m sorry that you are the first one who I ask abut this, but it seems to get more and more common in this forum that people do this and I really would like to stop this behavior.

Sorry. Here it is:

Unhandled promise rejection Promise {
  <rejected> TypeError: Cannot read property 'encryption_applied' of undefined
      at arrayHasEncryptedItems (/usr/local/Cellar/joplin/1.0.150/libexec/lib/node_modules/joplin/lib/reducer.js:107:16)
      at stateHasEncryptedItems (/usr/local/Cellar/joplin/1.0.150/libexec/lib/node_modules/joplin/lib/reducer.js:115:6)
      at reducer (/usr/local/Cellar/joplin/1.0.150/libexec/lib/node_modules/joplin/lib/reducer.js:733:32)
      at reducer (/usr/local/Cellar/joplin/1.0.150/libexec/lib/node_modules/joplin/lib/BaseApplication.js:485:10)
      at dispatch (/usr/local/Cellar/joplin/1.0.150/libexec/lib/node_modules/joplin/node_modules/redux/lib/createStore.js:178:22)
      at Application.generalMiddleware (/usr/local/Cellar/joplin/1.0.150/libexec/lib/node_modules/joplin/lib/BaseApplication.js:387:18)
      at Function.dispatch (/usr/local/Cellar/joplin/1.0.150/libexec/lib/node_modules/joplin/lib/BaseApplication.js:324:16)
      at Function.addNote (/usr/local/Cellar/joplin/1.0.150/libexec/lib/node_modules/joplin/lib/models/Tag.js:69:8)
      at processTicksAndRejections (internal/process/task_queues.js:97:5)
      at async saveNoteTags (/usr/local/Cellar/joplin/1.0.150/libexec/lib/node_modules/joplin/lib/import-enex.js:114:3)
} reason: TypeError: Cannot read property 'encryption_applied' of undefined
    at arrayHasEncryptedItems (/usr/local/Cellar/joplin/1.0.150/libexec/lib/node_modules/joplin/lib/reducer.js:107:16)
    at stateHasEncryptedItems (/usr/local/Cellar/joplin/1.0.150/libexec/lib/node_modules/joplin/lib/reducer.js:115:6)
    at reducer (/usr/local/Cellar/joplin/1.0.150/libexec/lib/node_modules/joplin/lib/reducer.js:733:32)
    at reducer (/usr/local/Cellar/joplin/1.0.150/libexec/lib/node_modules/joplin/lib/BaseApplication.js:485:10)
    at dispatch (/usr/local/Cellar/joplin/1.0.150/libexec/lib/node_modules/joplin/node_modules/redux/lib/createStore.js:178:22)
    at Application.generalMiddleware (/usr/local/Cellar/joplin/1.0.150/libexec/lib/node_modules/joplin/lib/BaseApplication.js:387:18)
    at Function.dispatch (/usr/local/Cellar/joplin/1.0.150/libexec/lib/node_modules/joplin/lib/BaseApplication.js:324:16)
    at Function.addNote (/usr/local/Cellar/joplin/1.0.150/libexec/lib/node_modules/joplin/lib/models/Tag.js:69:8)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async saveNoteTags (/usr/local/Cellar/joplin/1.0.150/libexec/lib/node_modules/joplin/lib/import-enex.js:114:3)

No worries and thank you, but in this case I actually just wanted to know why people choose to take a screeenshot of text. It’s just something I never understood.

This is a Joplin error, so it would be interesting to know if this still happens with the latest version. (It seems that you use version 1.0.150.)
On the other side, maybe the script passes either a null value to the API or something the API does not expect. Maybe @gme has an idea what the issue might be.

I installed Joplin with Homebrew, I just checked the update and it seems it’s the latest available.

Hmm, in that case, I need more information. Are you using the terminal or the desktop version? I really do not know why we even have brew as an option. It is always behind and always gives people some sort of trouble. (Not in your case, since you were able to install it.)

But back to the issue. What did you update? The script or Joplin? What happens, if you use the previous version of the script? Either way, I think @gme will have to chime in.

I updated both Joplin and the script.
I’m using Joplin on iTerm, I didn’t even know there is a desktop version.

Ok, 1.0.150 is the latest CLI version. Anyway, let’s see what @gme has to say.

1 Like

UPDATE: on the desktop version, everything works perfectly. Problem solved

If anyone is looking for a more automated solution try gkeepapi
I use it to back up my keep (not yet ready to fully switch to joplin – for small notes keep is much faster) and it works well.

1 Like

@seffyroff/@gme
I’ve expanded the original python script to handle importing image attachments from Google Keep as well. I’d love to share those changes with one of the forks if possible.
I’d also be interested in adapting the algorithm to incorporate it into Joplin officially using Electron!