Sure.It’s the File action in the Service department of the Action steps.
Create a new Action, click the + icon, the scroll to Services and click File:
Then it’s just the fine settings:
Name: The default is [[time]]
, which is the current time in the format YYYY-MM-DD-HH-MM-SS
. Please keep in mind that the idea was to be able to batch apply this Action, so this might cause havoc because this Action might very well create more than one file per second which means they would have the same name.
I went for [[created|%Y-%m-%d-%H-%M-%S]].md
instead. Of course, you can use names completely without time stamps. But then their naming must be unique too. And yes, you can use any extension that works with plain text, like .txt
.
Tags: The tags you have added to your draft in Drafts become macOS Finder tags which DEVONthink uses. The only downside is that Drafts’ tags are not case-sensitive.
The big box holds all the content: [[draft]] is everything in your draft, [[title]] and [[body]] are parts of the draft, i. e. the first line and the rest. You could add whatever you like, e. g. metadata. And just in case if you are wondering: I prepend every draft with an empty paragraph to disable metadata in DEVONthink.
Destination: Choose Bookmark
. It’s the not so obvious name for a Finder folder to save to. And when you don’t have any Bookmarks and therefore can’t yet select any, it gets even less intuitive: You have to type a name (like “DEVONthink Global Inbox”) and then … no, you don’t select the folder in an Open dialogue. This happens only when you run the Action for the first time.
Advanced: If the date and time you actually wrote the drafts matters to you and not just the date the .txt file was created by this Action, tick this box.
Platforms: This is a Mac-only action, so do not enable it for iOS. In the left column of the action window you can make this action appear from Drafts for iOS/iPadOS completely. And vice versa for mobile-only actions.
And, again in the left column, there is After Success. It is quite handy to tag the draft after it has been sent to whatever other app for internal use in Drafts: Tag them “DEVONthink” and create a Workspace that shows all drafts tagged “DEVONthink”.
And just in case: When you want to apply this Action on a number of drafts, select them, context-click on them, click Run Action
and click your “Send to DEVONthink Global Inbox” action.
This may sound overly complicated, but once it is set up, it works. Admittedly, the Run Action
procedure isn’t anything like all drafts in an indexed Finder folder that get automatically moved by DEVONthink into one of its database. But like I said, for me this is the only big con of Drafts, by far outweighed by its pros when taking notes. I have developed a routine of moving the notes at least once per day and that’s okay for me.