As a beginner in Keyboard Maestro, I hope you can help me (get started).
I want to import all markdown files from a folder into Apple Notes.
Each file should become a note, with the filename as the title.
The contents of the file should appear in the new note.
I have no idea how to approach this, so I hope you can help me.
Since I choose not to use Apple Notes, you may wish to wait for replies by those who are more knowledgeable about it, but for what it may be worth, here are my thoughts on the challenge of importing Markdown files into Apple Notes.
As you have probably noticed, you can import MD files using File > Import to Notes…
in Notes.app’s menu bar. Just select them all (⌘A) inside the file selector box.
Notes.app (I call it that to distinguish the application from the notes) will then bring up an alert box that warns that the notes “may look different in Notes”. Whether that means cosmetic differences in the way that they will be rendered, or some of the Markdown code being ignored or mishandled, one can only guess.
So far, there has been no need to automate anything, but maybe you wanted a macro that performed the task more than once (perhaps you have a folder that accumulates MD files and you want the importing to Notes.app to be automatic). In this case, it would still be better to initiate the importing from within Notes.app, because opening the files with Notes.app from the Finder would trigger the alert box for every single file and Notes.app would place each note into its own unique “Imported Notes” folder inside the application.
Notes.app uses the first line of a note file’s text as the title. You would probably want your macro to deal with that, before the files were imported. This would be easy to achieve (my thinking is: for each file, get the filename and concatenate that filename + the existing text of the file—details on request).
So… a macro to achieve what you wanted would be reasonably straightforward. You would have copied your notes, which are currently in plain text files that are universally readable and indeed writable (by, say, other KM macros) into the SQLite database that is used by Notes.app. If you wanted to get them out again, for use in another application, you would have another challenge.
Perhaps you have good reasons for wanting to use Notes.app, but if not, may I recommend that you consider keeping your notes in plain text files and using Obsidian or another application that does not lock your notes in.
Hello @Seagram
While I tend to share Kevin’s (@kevinb) opinion and thoughts about your plans doing this, there’s something you might consider.
Unless you want to do it yourself without having macOS 26 Tahoe installed (release this Fall) and want them to be imported as Markdown you need an Application that works like an extension to the Notes App.
It’s called something like Pro Notes or so and lets you write Markdown inside the Notes.app.
Otherwise you would have to deal with its Rich text mode.
But let me say something about that, too. If you’re familiar with scripting and a tool like Pandoc there is a chance to build a complex Macro that creates every single Note in HTML - but that’s only possible with scripting and it’s not easy because need to deal with the area of the Note where the text goes at runtime. Copy an HTML document‘s source and pasting it in the Note‘s Body would only result in the code you copied as written in Rich Text without any formatting at all.
Greetings from Germany
Tobias