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

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