Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Updated to import the modification date as well since that's how notes are sorted in Note.app
tell application "Notes"
set theNotes to every note of the folder "Notes"
repeat with thisNote in theNotes
set myTitle to the name of thisNote
set myText to the body of thisNote
set myCreateDate to the creation date of thisNote
set myUpdateDate to the modification date of thisNote
tell application "Evernote"
set theTransferredNote to create note with html myText ¬
title myTitle ¬
created myCreateDate ¬
notebook "Imported Notes"
set modification date of theTransferredNote to myUpdateDate
end tell
end repeat
end tell
@billda

This comment has been minimized.

Copy link

billda commented Jun 17, 2013

Here's a small improvement since Evernote crashes (and stops the import) if there is a title longer than 255 characters:

tell application "Notes"
set theNotes to every note of the folder "Notes"
repeat with thisNote in theNotes
set myTitle to the name of thisNote
if length of myTitle is less than 255 then
set myShortTitle to myTitle
else
set myShortTitle to text 1 thru 254 of myTitle
end if
set myText to the body of thisNote
set myCreateDate to the creation date of thisNote
set myUpdateDate to the modification date of thisNote
tell application "Evernote"
set theTransferredNote to create note with html myText ¬
title myShortTitle ¬
created myCreateDate ¬
notebook "Notes"
set modification date of theTransferredNote to myUpdateDate
end tell
end repeat
end tell

@amritbs

This comment has been minimized.

Copy link

amritbs commented Apr 30, 2016

This worked brilliantly for me. Thank you!

@afangel

This comment has been minimized.

Copy link

afangel commented Feb 23, 2017

Excuse my inexperience, but I can't seem to get it to work. Both scripts seem to run fine but they don't seem to find anything located in the "Notes" folder.

  • The notes of interest are all stored in a single notebook under my iCloud account.
  • My system language is set to Danish and as such the folder reference may need correction? I tried editing to "Noter" (Danish for note in plural) – also being the name of the notebook of interest.
  • I also tried navigating in to find the notes folder archive to shed light on the naming and its potential content, but the notes seem to be compiled in a bulk file.

Any input would be much appreciated.

Cheers

@Kul-92

This comment has been minimized.

Copy link

Kul-92 commented Aug 10, 2017

I am moving from ios to android, this worked perfectly! Thank you!

@hmiah101

This comment has been minimized.

Copy link

hmiah101 commented Aug 24, 2017

Hi guys,

Apologies for the noob question, how do I run the script? I'm pretty sure it's not as simple as downloading the zip file, extracting and running the script via Script Editor as that hasn't done the trick. Came across this tool and it sounds perfect for me to transfer over 800 of my notes to Evernote, but am stuck on how to do it :/

Would be very grateful if someone could kindly offer me some help. Thanks!

@sailisheth

This comment has been minimized.

Copy link

sailisheth commented Dec 4, 2018

Worked perfectly! Thank You so Much!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.