Integration with Devonthink

I would be interested in exchanging experiences on how to use Devonthink 3 and Drafts best together. I am transferring files between the two systems but would be interested in having small snippets from Draft automatically put into DEVONthink documents. I see that there are very healthy integration communities such as draftist and I wonder if there is an appetite for a devonthink Drafts community.

1 Like

What exactly do you have in mind? There are already many actions available in the directory that help to integrate Drafts with DEVONthink:

1 Like

Specifically, I would like to automatically send snippets created in Drafts during the day to my Daily journal in Devonthink. Basically, It would be great to see if different lines in a draft document could be destined to different DevonTHINK folders or Docs.

This should definitely be possible!

You can use Drafts Scripting abilities to separate the draft into the different parts and e.g. use the URL Commands of DEVONthink (https://download.devontechnologies.com/download/devonthink/3.9/DEVONthink%20Manual.pdf#page215) to send the parts to the DEVONthink - I think it’s only possible to create new documents with the URL Commands, but maybe you can use Apple script for that…

1 Like

I think the first decision would be to decide which app does the heavy work since both are scriptable. You might decide by use case or by your general preference.

An example: My Draft action to send texts to DEVONthink on the Mac is super simple: I send everything to DEVONthink’s Global inbox (exactly: to Finder folder “Inbox” which is connected to the Global Inbox). That’s it.

Other Draft actions—or me—might have tagged the texts before and a Smart Rule (with a script) in DEVONthink processes the texts by its tags—“normal” tags are simply kept, “destination tags” cause the Smart Rule to send the texts to a certain destination in DEVONthink and get removed afterwards, the tag “excerpt” causes the Smart Rule to apply the label “Excerpt” and gets removed after that, etc.

There is a number of reasons I went for this solution. One is that Drafts isn’t my first choice for taking notes—chronologically speaking, that is. Nowadays it is almost the only note taking app I use. But I could use others and the process-by-tag system still does work.

Another reason is that getting access to specific locations in DEVONthink from outside of it is not as comfortable as with DEVONthink To Go. To be more specific: The aforementioned (by @FlohGro) URL commands do not work in a batch. Using them makes moving texts from Drafts to DEVONthink very tedious.

Also, I usually do the moving/exporting of the Drafts notes mostly on my Mac because I’m mostly working at home. For the Drafts/DEVONthink To Go combo I have actions using X-URL commands which allow batch apply.

So one way to handle your use case could be to simply tag (or use a certain line in the note for the same purpose, whichever you prefer) a text created in Drafts “daily journal” and send it to DEVONthink’s Global Inbox. Just make sure to keep the create date (tick the box “Maintain Dates” in the action).

A Smart Rule script could look for that identifier (wether tag or a line in the text) and check if a note with its create date exists in the group (or database) “Daily Journal”. If not, it creates that note with the text from Drafts. And if it does, it appends it. Of course this would mean that the snippets will get combined to daily entries only in DEVONthink.

1 Like

THank you this is very helpful and I will try