The Custom Actions Action Sequence.

This action sequence utilizes the method I designed for "chopping" a draft, as well as, optionally, the new fill-in snippet capabilities of Text Expander Touch 2.0, to allow you designate any two actions from your action list and perform both of them on a draft, without having to first build a specific chained action for each particular combination.

I built this action because I was becoming tired of having to create new actions anytime I wanted to perform a mixture of actions from my action list on a single draft. For instance, while I have a cross post action to post to my main App.net and Twitter accounts, and a triple cross post action to add posting to Facebook to those two, I do not have an action to first post to the Twitter and App.net accounts, then send the same draft as an email, or as an iMessage. Or maybe I also want to append this particular post to a Dropbox file where I store my favorite posts. Or perhaps I want to do the same thing, but to an Evernote note. Or create a reminder with it, or copy it to my clipboard, or send it to Omnifocus. It could be anything, it entirely depends upon the situation and the text. Previously my only option (Other than creating a serparate action for every possible combination of actions) was to go back to Drafts after the actions I ran were complete, find the post in the archives where it had been sent, reopen the action list, find the next action and run it on the archived draft. Now, with the customActions action, I can type my text into Drafts in the proper format (first line: text, second line: title of action1, third line: title of action2), run customActions on the draft, and watch as the sequence combines the two actions I have chosen and runs each of them on the text from the first line.

IMG_2118.PNG

To run the customActions action sequence, you must have a draft formatted with three lines, the first line being the text you want to perform your two actions on, the second line being the first action which you wish to perform on the text in the first line (Important: This first action must support a callback, without needing to leave Drafts, for the sequence to work. Any Messaging, Email, Evernote, Dropbox, Twitter, App.net or Facebook actions will work), and the third line being the second action you wish to perform on the text from the first line after the first action has called back. (The second action is the last thing to happen in the sequence, so it is not necessary for it to happen within Drafts because there is no callback.)

Using Text Expander

If you're willing to spend a short time setting things up, you can make the process a lot easier by using the new fill in snippets in Text Expander Touch 2.0 to quickly and flawlessly add the names of each action you wish to perform into your draft. It took me less than ten minutes to set up a single Text Expander fill-in snippet which runs when I type "cA" (for choose action, but it can be whatever you want) into Drafts. The app jumps to Text Expander, where a list of my actions is displayed. I choose an action from the list, hit done, and I'm back in Drafts with the title of the action I want to run already filled in. This is quicker than typing it out yourself, and also prevents the possibilty of accidentally misspelling an action name and messing up the sequence when you run it (assuming you typed your action titles into Text Expander correctly.)

Here's what you should type into TE for the snippet after you have chosen your shortcut:

%fillpopup:name=actionChooser:default=ACTION1:ACTION2:ACTION3:ACTION4:ACTION5:ACTION6:ACTION7:ACTION8%

Just swap the titles of your actions for each spot above. To add more actions, just serparate the titles by colons. To remove some of them, just delete them and make sure it ends with a % sign.

One problem: Text Expander cannot, at this time, support any fill ins which include either "%" signs or ":" symbols. This means that there is no way to make Text Expander accept your "Tweet: USERNAME" actions, because they include a colon. Getting around this, however, is pretty simple. Just create a quick Drafts action titled something which does not include a : or % sign and which does nothing but take the full [[draft]] and run the Tweet: USERNAME action on it. This mimics the effect of the default tweet action exactly, but you can include this action title in your TE fill-in list and it will allow you to use the list to perform your tweet action.

Here's the simple action, just replace "USERNAME" with your own username when you add it into Drafts:

drafts://x-callback-url/create?text=[[draft]]&action={{Tweet: USERNAME}}

The custome actions action sequence is a combination of two actions. You only need to run customActions on your draft for everything to work, but make sure nextAction is also in your action list. customActions simply performs the function of "chopping" your actual text out of the draft and onto the clipboard, then nextActions takes the text on the clipboard and runs the designated actions on it.

Enjoy.

Direct Import Link for customActions

Direct Import Link for nextAction