I just wrote a shortcut that some of you might find useful.
Suppose you want to embed a link that when clicked on will run a Drafts 5 action. I’m thinking of a Markdown link, or a HTML link, or even a raw link.
And suppose there are a few that you would regularly want to embed that way. (But occasionally another one occurs to you.)
This action enables you to do it.
Before you use it you will want to edit the list of action names at the top of the shortcut. I’ve only put one in.
-
When you launch this shortcut - and I’ve set it up to respond to spoken “Drafts action” - it will pop up your (tailored) list of Drafts actions.
-
Pick a Drafts action or select “Other…”.
- If you select “Other…” you can enter an action name.
-
Next you have the choice of three formats. Pick one and the link, together with the human-readable action name, will be copied to the clipboard. The formats are:
- Markdown
- HTML
- URL only
-
You are prompted as to whether you want to test the link - by immediately running it.
Action names can contain spaces; The URL encoding step enables that.
Here is a sample Markdown version of the link - copied straight out of the action:
[Test action with spaces](drafts5://x-callback-url/runAction?action=Test%20action%20with%20spaces)
And here’s an HTML one:
<a href='drafts5://x-callback-url/runAction?action=Test%20action%20with%20spaces'>Test action with spaces</a>
Why Bother?
The idea for this came out of trying to use a iThoughts mindmap as a launcher for actions. The Markdown produced by this shortcut works fine with it.
But then I tested it with Launch Center Pro, MindNode and Omnifocus.
The latter particularly interested me as a task like “write blah document in this specific format” could have a note where tapping on the link ran a Drafts action that created the document in that specific format. It could even prompt for input.
I haven’t figured out how to parameterise this, by the way.
Thoughts?