Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

TheInspectorGadget

macrumors newbie
Original poster
Jul 5, 2024
2
1
I am paranoid that one day I'll open my Notes app and everything I've ever written will be gone from a system bug or deletion.
My entire brain dump for the last 10 years. How can I copy everything over to another platform as a backup? Alternatively export everything into files and backup on a external hard drive.
I have 850 notes

Thanks for your help
 
Last edited:
Notes will sync with Gmail, Outlook, and/or just about any other email account that supports IMAP. If you add the account under internet accounts in System Settings, you will see a folder for it in your Notes app. New/Existing notes do not automatically get copied there though, its a manual process and not a sync. You'll need to hold option while dragging a note from your iCloud account to the new folder to create a copy of the note in your email account.

The notes you copy will be synced to a Notes folder (Label if you use Google) in your email account and you will be able to open them there like a message without need of the Notes app if you ever need to.
 
Notes will sync with Gmail, Outlook, and/or just about any other email account that supports IMAP. If you add the account under internet accounts in System Settings, you will see a folder for it in your Notes app. New/Existing notes do not automatically get copied there though, its a manual process and not a sync. You'll need to hold option while dragging a note from your iCloud account to the new folder to create a copy of the note in your email account.

The notes you copy will be synced to a Notes folder (Label if you use Google) in your email account and you will be able to open them there like a message without need of the Notes app if you ever need to.
You're a genius. It did it automatically. I backed up 50 notes in my Microsoft outlook account, will do the rest later.
Only issue is it doesn't include any images or attachments thats fine, I can live.
Thank you!
 
  • Like
Reactions: CharlesShaw
Have you tried this application?
 
You can make blogs/website from Apple Notes
 
this applescript works ok for me. flattens the notes to html files in a dir of your choice.

run from terminal with : osascript < yourscript.scr

Code:
-- Output each note as html file, run with: osascript < export_notes.scr


tell application "Notes"
    set targetFolder to "Notes" -- Replace with the name of your Notes folder
    set savePath to "SAVE_ALL_NOTES_HTML/" -- Replace with your desired save directory
    do shell script "mkdir -p " & quoted form of savePath
    set notesList to notes of folder targetFolder
    set fileCounter to 1001 -- Start numbering files at 1001
    repeat with aNote in notesList
        try
            -- Get the HTML content of the note
            set noteContent to body of aNote
            -- Construct the file path with sequential numbering
            set filePath to savePath & fileCounter & ".html"
            -- Write the HTML content to the file
            do shell script "echo " & quoted form of noteContent & " > " & quoted form of filePath
            set fileCounter to fileCounter + 1 -- Increment the counter for the next file
        on error errMsg
            -- Log the error message (optional)
            log "Error with note " & fileCounter & ": " & errMsg
            -- Skip to the next note
        end try
    end repeat
end tell
 
Last edited by a moderator:
  • Like
Reactions: djs71a
this applescript works ok for me. flattens the notes to html files in a dir of your choice.

run from terminal with : osascript < yourscript.scr


-- Output each note as html file, run with: osascript < export_notes.scr


tell application "Notes"
set targetFolder to "Notes" -- Replace with the name of your Notes folder
set savePath to "SAVE_ALL_NOTES_HTML/" -- Replace with your desired save directory
do shell script "mkdir -p " & quoted form of savePath
set notesList to notes of folder targetFolder
set fileCounter to 1001 -- Start numbering files at 1001
repeat with aNote in notesList
try
-- Get the HTML content of the note
set noteContent to body of aNote
-- Construct the file path with sequential numbering
set filePath to savePath & fileCounter & ".html"
-- Write the HTML content to the file
do shell script "echo " & quoted form of noteContent & " > " & quoted form of filePath
set fileCounter to fileCounter + 1 -- Increment the counter for the next file
on error errMsg
-- Log the error message (optional)
log "Error with note " & fileCounter & ": " & errMsg
-- Skip to the next note
end try
end repeat
end tell
Is it possible to output to PDF or markdown files instead of HTML?
 
Is it possible to output to PDF or markdown files instead of HTML?
sure, you can do almost anything really...
Code:
tell application "Notes"

    -- Replace with your desired save directory


    set savePath to "SAVE_ALL_NOTES_MD/"

    -- Ensure the save directory exists

    do shell script "mkdir -p " & quoted form of savePath
    -- Get the list of notes in the target folder

    set targetFolder to "Notes" -- Replace with the name of your Notes folder

    set notesList to notes of folder targetFolder

    set fileCounter to 1001 -- Start numbering files at 1001



    repeat with aNote in notesList

        try

            -- Get the content of the current note

            set noteTitle to name of aNote

            set noteContent to body of aNote

          

            -- Construct the Markdown content

            set markdownContent to "# " & noteTitle & linefeed & linefeed & noteContent

          

            -- Construct the file path with sequential numbering

            set filePath to savePath & fileCounter & ".md"

          

            -- Write the Markdown content to the file

            do shell script "echo " & quoted form of markdownContent & " > " & quoted form of filePath



            -- Increment the counter for the next file

            set fileCounter to fileCounter + 1

        on error errMsg

            -- Log the error message and continue with the next note

            log "Error with note " & fileCounter & ": " & errMsg

        end try

    end repeat

end tell
 
Last edited by a moderator:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.