URL scheme createText works, createMarkdown doesn't


In Drafts.app I have an action to send a draft to DT3’s global inbox.

This action works perfectly, but it (obviously) creates a plain text note:


However, if I use createMarkdown instead of createText (and leave everything else the same), it creates an empty document with the title '' and with the type ‘internet location’.


I think I’m following the help and previous answers, but I’m obviously missing something obvious — what’s going wrong here, please?


When I use


in Firefox, I get a Markdown document in DT3 with the name “Versuch-MD” and a single title line containing the word “Titel”. Using square brackets as in your example, the name is “[[Versuch-MD]]” (with the square brackets!), and the file itself contains the footnote index 1 at the beginning of the file and the word “Titel” as footnote 1 at the bottom. So it seems to work somehow, but I’m not sure that it does what it should do.

However, if I use the location parameter with an empty string like you did, the name of the record is set to ‘’ (literally two single quotation marks) and the type to Internet Location.

I’m wondering: Why would you specify an empty location, and why would you use ‘’ to specify it? The documentation says:

location: The URL linking to the content, e.g., the URL of the website for the bookmark (URL).

You do not have an URL to link to, and ‘’ is not a valid URL in any case.

Thanks for replying:

The answer to ‘why do I use an empty location’ is that whoever originally wrote the command used it and it worked when I copied it!

And it does works perfectly with createText to create a plaintext file in the Global Inbox, with the correct Document Title and Body. So it’s clearly valid in this sense at least.

What I don’t understand is why it doesn’t work with createMarkdown in the same way: the lack of a URL isn’t a problem with createText, so why is it a problem with createMarkdown?


1 Like

I think that locationmakes no sense here, and it makes even less sense (if that’s possible) to provide an illegal URL to this parameter.

DT3 does something in one case (createText) and something in the other (createMarkdown) – but both commands have to handle a bogus parameter. So it’s sheer luck that one command “works” and the other doesn’t.

Just leave out the location=''. You don’t need it anyway in this case and it’s ill-formed, so what’s the point in putting it there in the first place?

And since you’re apparently using Drafts, why not take the “Send MD to DT” action from them? From having a look at it, it should work. According to the Drafts documentation, the text in square brackets is replaced by Draft values like the text and the title.

I’ll give those ideas a go – thanks!

With the createMarkdown command: .

  • If there is a location specified, DEVONthink downloads the URL as a Markdown document, ignoring the text parameter.
  • If there is no location specified, it creates a new Markdown document.

ignores the text parameter and downloads the URL as a Markdown document.

Downloading the URL works for createMarkdown, createWebarchive, createHTML, createFormattedNote, and createPDF.

Thanks, Jim!

You’re welcome :slight_smile: