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.
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
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.
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)
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.
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 Draftsper file. Which meant for me I won‘t use it.