Draft to DEVONthink 3

This is only applicable to the Mac-version.
I have an action that just transfers a Draft text to DEVONthink Global Inbox like this
and it works fine, except when the Drafts text contains a “;”. The transfer of text from Drafts proceeds up to the “;” and stops.
If the “;” is removed the entire Drafts text is transfered.
In the iOS version transfer works OK

Use {{}} to URL encode as referenced in the template documentation.

E.g. {{[[title]]}} to URL encode the title of the draft.

Try replacing title with safe_title in your link, as in …


Documentation for that is here (see Content Tags section).

Sorry to say, no this does not help. The transfer of the text is stopped at the semi-colon character.
Since it works fine on the iOS side transfer to DEVONthink to Go one would hope the DEVON-side is correct even on the macOS-side.
Of course this is not a big problem, I can easily avoid using the semicolon character, but its still a bit of a teaser.

@Gul-ipad, did you try URL encoding the data for use in the URL as I suggested above? That would stop you passing the raw semicolon, and semi colons are reserved characters in regards to URLs.

  • See RFC 3986 p13, the list of sub-delims.

As it happens, I just made a similar action today.

Mine does not fail with semicolons. Here’s my action. It contains features particular to what I need, but the general idea appears to be what @Gul-ipad might have been looking to do.


Note: I’m sending the markdown file to a particular database/group – thus the UUID at the end of the x-devonthink:// URL.

Also: I’m sending the text to clipboard then sending the clipboard to DEVONthink. You might want to try that.

First, the history.
This has been working fine, but I am not able to specify when and at what version update this happened.
I’m trying to pass a markdown text from Drafts to a markdown note in DEVONthink. The text stops to transfer at the “;” like this
Draft text


This is a ; and the text stops.
DEVONthink result is a markdown file with the heading 21 55 22 and text
This is a

I’m going to look into your action tomorrow

Thank you for your action script. It works fine, no problems with the semicolons.
Now for the fun part.
After modifying your action, removing the URL-part, verifying correct result in Global Inbox, I continued to change by removing the Clipboard part and in the x-devonthink line substituting the clipboard with body, ie getting back to my original action string. Testing again and it works just fine!
Aha, copying the working x-devonthink line into my own action (to the eye they now look identical) and running my action, the text stops at the semicolon! I have now played around with my original action, verifying (in my view) every possible setting etc in my action and I can not find any differences between the working one and my old, nonfunctioning, action.
I did write a new action, copied the text from my old, non-functioning action, into the new one and the action works fine.
I think it´s time to close this, its way over my head, but I’m pleased to have a working action back.
Thank you all for the help.

Does your non-functioning action have “Encode tags” turned on in the URL step? Seems like a likely culprit. If that is off the special characters returned by tags that require encoding in a URL will not be encoded.

Yes, the URL encode tags is on.
A bit of history, again. This action was duplicated from the ios-world to the macOS-world and modified with proper URL syntax the day a got my hands on the Drafts macOS app (at the time it was released). Thus, it has lived through a number of updates och Drafts and macOS along the way. It is a strange thing, but I’m happy my actions are all back to working order.

Here is a screen dump of my Action Log.