Drafts, Things and Devonthink

Can anyone help me to achieve this with a drafts action please?

  1. Send the current draft to devonthink
  2. Create a task in Things and include the devonthink item link in the notes field

For step 1, there’s several Send to DevonThink actions in the action directory.

Try this one from Greg for example - https://actions.getdrafts.com/a/1CY.

I’m not a DTG user, so you would have to check the result of the x-callback-url to see if they are passing back the UUID or a link. There’s some information here that describes some uses, and some of the feedback, but it isn’t structured as documentation, so if the creation returns anything it is unclear, but otherwise, you could presumably search for the last added after creating with a second call, and use the result from that to build the URL.


For step 2, the following action in the directory for Things should give you an idea of how to add something to Things (again, not an app I use), and include a URL that links out. You would just want to modify it to your DT item rather than the Draft item, but as a result you should be able to re-use a large proportion of the code @nahumck put in there.


Hope that helps.

How can I check the result of the x-callback-url please?

If a callback URL returns parameters, they are available to scripts in the context.callbackResponses array ( docs ), or as individual tags in the format [[callback_resultParameterName]]. See the Callback URL step docs for details.

It’s helpful to have docs from the target app to know what, if anything, they send back or you are guessing a bit. If you put this script after the callback, you could use it to inspect any result parameters:

let resp = context.callbackResponses[0];
1 Like

Thanks so much for taking the time to help me with this, I got it working.