Trying to adapt a drafts script to save to md and not text to devonthink

Hi all

I found in the action script directory of drafts only 1 script (by the actual developer) that actually works…

problem is it saves as txt file where I want it to save it as .md

Looking the script it seems quite simple


I tried modifying it with no success


as it creates a weird webloc fie

can anyone help me modify the script or refer to some documentation on this?



See e.g. Error with Drafts for macOS and AppleScript

Thx @cgrunenberg!

while this is cool news, I think AppleScript will be Mac only while the x-devonthink:// method will work both on the Mac and iOS (and thus with both DT and DTTG). Unless im wrong?

in any case is markdown just not supported in the x-devonthink:// method? Or is my syntax wrong?

thx so much again!


The x-devonthink:// commands are only intended for clipping websites so far (e.g. via bookmarklets or browser extensions).

@cgrunenberg, thx so much again for the prompt response

so for moving stuff from drafts to devonthink/devonthinkTOGO (on iOS) what method shall I use (the covers both?)

drafts is text only (if that matters, I assume its simpler?)

Also: the drafts dev own methods using this


works well and is very reliable but its kind a pain to manually convert the text output to .md each time :slight_smile:

best and stay safe guys!


On the Mac I would definitely recommend a script like the linked one.

@zeltak this works on the Mac:


There were some script steps before this URL step to define the dTags and ffn template tags.

wow @apoc527 that’s so helpful, thx so much for this!

just in case you want it or someone else needs it I modified the script by a bit to work with the title and I know use this:


thx again!