There are many apps that accept text via URL schemes. Most Drafts actions in the Action Directory take advantage to these URL schemes to send to text to these apps. Sometimes, however, you have an app that you really like that has registered a URL scheme to launch the app, but doesn’t support receiving the actual text to create a note/event/task/etc.

In those cases, the only way to integrate with Drafts is via the system clipboard. Drafts’ “Copy to Clipboard” action is handy for this…but still leaves you having to quit Drafts and go launch the other app. You can make this easier by creating a URL Action that uses Drafts’ own URL schemes to put the contents of the current draft into the clipboard, and then launch the other app with a single tap. It’s still not as smooth a the experience with apps that support direct integration, but it can be pretty handy.

The URL value for the URL Action should look like:

drafts://x-callback-url/create? text=[[draft]] &action={{Copy to Clipboard}} &afterSuccess=Delete &x-success={{mailto:}}

Line breaks added for legibility.

I have created a ready to install version of this URL Action in the Action Directory.

The key piece that will need to be changed is the “x-success” parameter. Let’s break down what happens here:

  • “drafts://x-callback-url/create?” - this is Drafts’ own URL to create a new draft.
  • “text=[[draft]]” - this sends the contents of the current draft in the URL when it is triggered.
  • “action={{Copy to Clipboard}}” - this tells Drafts after it has created the new draft, trigger the “Copy to Clipbaord” action - which will, of course, put the text in the system clipboard.
  • “afterSuccess=Delete” - this tells Drafts to delete the new draft it has just created. You don’t want the duplicate left around.
  • “x-success={{mailto:}}” - this parameter tells Drafts when it is done with the above steps, open this URL. It can be any URL (including an http:// URL). This example will open the Mail app, but if you edit this value to match the URL of any app, it will open that app. Not all apps register URL schemes, but many do just for the purposes of launching, and they usually match the name of the app as it appears on your device screen – so try it.

Once you get to the app, you will still need to paste the text in the clipboard to complete the process, but it save a few steps along the way. If you want to try this trick with other apps and can’t seem to figure out the URL scheme, contact the developer of the app and ask if they support URL schemes…oh, and ask them (nicely) to expand their URL support to accept text, so you don’t have to use this trick to integrate with their app!