Skip to content

Instantly share code, notes, and snippets.

@shapiro125
Forked from bzerangue/import.scpt
Last active March 7, 2021 12:57
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save shapiro125/c506042cb8104b187fb8d2c3a07bc898 to your computer and use it in GitHub Desktop.
Save shapiro125/c506042cb8104b187fb8d2c3a07bc898 to your computer and use it in GitHub Desktop.
Applescript: Import Apple Notes to Evernote
tell application "Notes"
set theMessages to every note
repeat with thisMessage in theMessages
# added identification of folder to create notebooks based on existing folder hierarchy
set myFolder to the container of thisMessage
set myFolder to the name of myFolder
set myTitle to the name of thisMessage
set myText to the body of thisMessage
set myCreateDate to the creation date of thisMessage
set myModDate to the modification date of thisMessage
tell application "Evernote"
set myNote to create note with text myTitle title myTitle notebook myFolder tags ["Imported from Notes"]
set the HTML content of myNote to myText
set the creation date of myNote to myCreateDate
set the modification date of myNote to myModDate
end tell
end repeat
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment