I migrated around 2,000 notes from Apple Notes into Obsidian. The rough method is to export out of Apple Notes to HTML files, then HTML to Markdown via Pandoc or if you are not as technical the Bear method works nicely. This is focused on the Bear method which is more user friendly if you’re not as familiar with using command line tools.
We built an Automator Workflow for macOS that can export all your Apple Notes as HTML files. This will include most note contents, but not all. See the breakdown below:
Text, lists, and photos should be included
Note : only macOS 10.15 Catalina supports photo export. On earlier macOS versions, Apple Notes will not export photos
Task lists convert into bulleted lists
Rich media links will convert to plain text links
Non-photo attachments like PDFs or other files are not supported and will be excluded from export to HTML files. They will remain safely in Apple Notes
How to use this Automator Workflow
Download our AppleScript
Double-click it to open Automator
Press the Play button
Choose or create a new folder to store your exported Apple Notes
In Bear, click File > Import Notes
In the dialog that opens, find the folder containing your exported notes
Select the folder containing the exported files
(Optional) Adjust any import features such as whether to keep the original creation date, and whether to use the first line or file name for note titles
Click Import Notes
Step 2: Convert HTML to Markdown with Bear
After you import notes with Bear, you can export them back out in a clean format that works well with Obsidian.
Select all notes (CMD+A)
File > Export Notes
Export as Markdown
Now you should have a folder full of .md files that you can import into Obsidian.
Guess you never tried Pandoc???
IMOO there is no simpler tool to do conversions from almost any type of document to any other type of document.
No need for a complicated setup and another App like you describe.
why should I lie about this man
Also, I needed to convert was the google takeout export so multiple files (624 notes) and typing each name in the prompt seems laborious (that’s what I mean when i say I don’t have a non-developer mind, idk how to make it automatic for a folder of files)
As an alternative to the automator script here is my short applescript to do the same.
It saves embedded images in the same directory but still require manual tweaks afterwards to fix the links. Be also aware, there are backslashes dusting imported markdown files. They came from unmatched <\ul> HTML from notes.
It is possible to keep notes’ attachments the same way as embedded images and automate folder structure creation. This code is far from perfect but works on Big Sur OS.
Just copy-paste the collapsed code for starters. I hope that will save you some time. Cheers.
It requires pandoc tool too.
applescript code
set i to 1
set exportFolder to "/Users/<your_user>/notes_export/" # change this to your home folder location.
set pandocExecutableLocation to "/usr/local/bin/pandoc" # brew install pandoc
tell application "Notes"
repeat with aFolder in folders
repeat with aNote in notes in aFolder
set output to (body of aNote) as Unicode text
set filePrefix to exportFolder & name of aFolder & "-"
set targetHTMLFile to (filePrefix & i & ".html")
set targetMDFile to (filePrefix & i & ".md")
set myFile to open for access targetHTMLFile with write permission
set eof of myFile to 0
write output to myFile starting at eof
close access myFile
try
do shell script pandocExecutableLocation & " --extract-media=" & exportFolder & " --to markdown --from html-native_divs-native_spans-auto_identifiers -o " & quoted form of targetMDFile & " " & quoted form of targetHTMLFile & "&& rm " & quoted form of targetHTMLFile
end try
set i to i + 1
end repeat
end repeat
end tell
If, like me, you have the opposite scenario with Apple Notes (migrating 1 very-large note into Obsidian instead of numerous small ones), the solution is different :
Create a new file in TextEdit on Mac or Notepad on Windows, in the menubar make sure the format selected is Plain Text not Rich Text
go back to where the notes originally are, select all, copy, paste into TextEdit or Notepad
then select all in there, copy, switch to Obsidian, New Note, paste without formatting (Paste and Match Style under ‘Edit’ - or Command + Option + Shift + v then select “unformatted text”. In windows, it’s Ctrl + Alt + Shift v then select "unformatted text”).
This is important because for some reason, when pasting from a non-standard multimedia featured-notes tool, markdown editors seem to parse unknown code as extra carriage-returns (blank enter-spaces), which creates a problem if you plan to do text analytics or formatting-retention is otherwise essential.
I tried bear’s script and was not happy with the results. It does not export images and only worked on 257/329 notes. It also did not report the failures.
I also tried the notes app exporter. This worked on 312/329 but similarly does not export images and dumps to txt files.
Neither bear or notes app preserves the directory structure. Bear does seem to add a tag at the end of the note indicating which project it was under in apple notes.
I found this app on the app store and it performed the best, but did not work for images. I like that it is on the app store vs write app’s being a download from their website. It exports directly to markdown and it only failed on 3 of my notes, which it reported and had an html version dumped. It also preserved my projects in the export directory structure. However, while it claims to support images, it created empty “attachments” directories with no images.
Just wanted to add this update in case it is useful to others since the two suggestions did not work best for me. Please let me know if you know of an option that works well with images.
Today (2021-11-19) I used Version 3 of Exporter, written by Chintan Ghate. It’s much better than the AppleScript (Bear) process to extract Notes because it creates directories (folders) to mimic the structure of the Notes I created in Apple Notes. It also seems to nicely convert them to MarkDown (.md).
Buying the paid version enables me to select one or more segments inside the Notes structure, rather than the entire DB.
Exporter processed 710 notes in the time it took me to write this.
Richard.
Sorry, I must be really dense. This is my first time using Obsidian. I have exported the notes with Exporter 3, but where is the option in Obsidian to import them??
You don’t need to import anything because Obsidian just works with local files. It simply needs to have the folder with the files accessible as, or within, a vault.