Action Extension “Run Drafts Action”


#1

I’ve been thinking recently that the incredible scripting power of Drafts, and specifically its scriptable hooks into iOS system features, has the potential to make it a powerful automation system in its own right (à la Workflow). I would love to have a “Run Drafts Action” action extension in the bottom row of the share sheet, so that I could run script actions on bits of text in other apps. For example, I could share a link from a webpage, then in the share sheet tap “Run Drafts Action” and then use my script action for appending links to an Interesting Links draft I maintain without having to make a new draft and then trigger the action.

I know that something like this is available with drag & drop, and that I can drag external bits of text onto the action drawer, but a share sheet implementation would also be really useful.


#2

I could — and probably will — make a Workflow workflow to do this, but I thought it might be nice to have it as native functionality.


#3

Honestly, this is in the category of things I would not spend my time on unless Apple makes some policy/API changes. Action extensions are not allowed to trigger URLs and processes that go outside the extension and Apple’s APIs do not support it.

Workflow got around this by obfuscating calls to system methods disallowed in extensions, and for whatever reason Apple did not reject them when they have rejected other apps for doing the same thing (including Drafts - multiple times - when Today widgets were first introduced). Now that they are in Apple, I’m sure they get a pass, but I have a lot better things to spend time on than building something that is likely to trigger rejections from app review.


#4

Thanks @agiletortoise. Good to know some of the background in this case. It’s a shame that Drafts isn’t allowed to do some of the stuff that Workflow is, but agree that developing a feature that is likely to lead to rejection is a bad idea. Hope they change those rules at some point.


#5

If anyone is interested, here is the workflow I made to achieve this.