Add to Devonthink with tags - now works on mac DTP3 as well as ios DTTG

This is a very small adjustment to @joshsullivan 's action at

It makes it work with Devonthink DTP3 as well as DTTG by removing callback-url -

x-devonthink://createText?title=[[date|%Y%m%d%H%M]]%2D[[title]]&text=[[line|3…]]&location=[[line|2]]&tags=[[tags]]

2 Likes

For me it is not working… DEVONthink is opening on Mac but no document is shared from Drafts.

Anybody here having the same problem and hopefully a solution?

As Sam told, you have to remove the x-callback-url/ part.

The action should look like

x-devonthink://createText?title=[[title]]&text=[[body]]&tags=[[tags]]

For more information search for “URL commands” in DevonThink help inside the app.

1 Like

I simply duplicated the step, and then turned iOS off for the version without the x-callback-url part (and macOS off for the version with it).

Screen Shot 2020-10-04 at 14.49.58

Hi Chrome were you able to get work?
I removed the x-callback-url/ part but nevertheless it doesn’t work

Thanks

Hey!

For me it is working with this on Mac:

x-devonthink://createMarkdown?title=[[title]]&text=[[draft]]

and this on iOS:

x-devonthink://x-callback-url/createMarkdown?title=[[title]]&text=[[body]]&tags=[[tags]]&x-success={{drafts5://}}&x-cancel={{drafts5:}}

Greetings

therefore you get the iOS version working keeping the x-callback-url part that many people in this thread say should be cut away…?

For me the version I posted works. It creates an md file in DT complete with Tags.

Sorry for the late post but I am not using Drafts any longer…

two questions: why you don’t use drafts anymore, just curious…?
your DTTG is version3?

TIA

Hey!

Yes, I am using the latest versions of DT Desktop and DTTG 3 on iOS. I rechecked and with this action everything works fine.

Regarding your other question: I switched to Bear. I really like to work with a nice GUI and do not need all those power action features of Drafts. In fact I have no programming skills and I never got into the whole action stuff. The “text starts here” thing never really got me either. I always write my stuff directly into OmniFocus, Fantastical, Mail and so on. Bear gives me a really nice GUI and tons of export options and a really nice pdf output.

and therefore… what are you using DT for…?

DT is my knowledge repository, called a PKM in modern times. DT is great at storing massive amounts of data, but not so nice for creating documents like md files. I want something fast and nice for this capture step which does not get in my way and is fun to use.

With Bear (or Drafts) I gather text or pictures (not possible in Drafts as easy), flesh them out and get them out of there when ready (e.g. when the article or book I read is finished). Because, for me, neither Drafts nor Bear is good at functioning as a PKM. I export them as pdf or md to the appropriate database in DT.

I always thought this is the normal use case for DT and Drafts (hence there is this action for exporting stuff into DT). For what are you using DT and Drafts?

I am beginning with DT; I imagine basically as yours and as a Journal capture data, mainly text… I feel Drafts too less structured for acting as a Journal in itself perhaps I will try Bear

Thanks

super
Can you help me adding a tag “senttoDT” to the drafts note so that I know what note has been sent to Devonthink

You can use the “After Success” settings on your action to assign tags and/or file away a draft after the action has successfully run. That’s probably your best bet. See:

1 Like

elegant solution!
what I did: added a script step:
draft.addTag(“sent-to-Devonthink”);
draft.isArchived = true;
draft.update();