Is this possible: send note from drafts to Devonthink and immediately ask where to file the note via the `move to dialog`?

Hi

im looking for a way as the title says to send from drafts to Devonthink and immediately ask where to file the note via the move to dialog?

image

is that even technically possible? what’s the best way to pursue this (drafts actions, AppleScript, JS, other?)

any thoughts would be great!

thx so much!

Z

1 Like

Since you’re in Drafts, JavaScript would be your best choice. You can write an action that queries the available groups from DT, displays them in a list for the user to choose from and then creates a new record in this group with the content of the drafts document.

Some of the steps are explained here:

As Draft’s AppleScript support is quite basic and drag & drop of notes to the Finder or Dock icons doesn’t work, another possibility might be to enable the group selector in Preferences > Files > Import and to use DEVONthink’s services, e.g. Take Plain Note.

BTW:
Just tried this app for the first time, the user interface is… well… maybe that really looks like a steep learning curve :laughing:

1 Like

@cgrunenberg

This is fantastic! (was not aware of the select group option)!

is there anyway by chance to append text to a current markdown this way instead of creating a new markdown?

thx so much!

Z

There’s also an DEVONthink 3: Append Plain Note service, see System Preferences > Shortcuts > Services. This service appends the selection to the last taken note.

wow amazing discoveries today…! andI have been using Devonthink for 4 years now…shame on me :slight_smile: :slight_smile:

this service is amazing for me yet it seems not to show md files I the selector (only shows the group where the .md file resides in)

is this by design or am I missing something?

best and thx so much for your kind help

Z

ahh now I read the last part…so its just for the last note taken you can’t choose the note to append to? (I do get the group sector when I launch this service)

thx

Z

It’s just a group selector to select the destination, documents aren’t shown.

Probably because no note was taken since launching the app, in this case it’s identical to taking a plain note.

A quick way to get a note from Drafts to DEVONthink or any app that has a Share extension is to select the note and use File > Share, or chose the Share option from Drafts’ contextual menu.

So, File > Share > DEVONthink will open the DEVONthink Sorter with the option of choosing where to put the imported note (the “group selector”).

I believe this will work this way regardless of the setting import destination setting in DEVONthink preferences. Note, using Share does not apply any export processing (like adding titles) that using Drafts’ action code would, so YMMV.

That‘s true and means no tags are kept and not even the create date.

While an action which calls a Move To hud (or the Sorter) you asked for is definitely useful I have an additional suggestion: If you are sending notes to recurring locations it would make sense to create Draft actions for each of them to skip the dialogue.

The one thing to keep in mind is that DEVONthink on the Mac supports URL actions but not URL callback. Meaning: You have to apply any action in Drafts per file. Which meant for me I won‘t use it.

Following up on @korm’s correct comment about Share > Add to DEVONthink 3, the Sorter will open to let you select a location…