The Drafts 3.0 Stress Test

A sequence chaining together 25 actions across 7 apps and 8 services to stress test the maximum abilities of Drafts 3.0.

As many of you may know, I've been beta testing the fantastic text input and distribution app Drafts. Part of my testing requires me to test out a bunch of my actions on each new version in order to see how it handles them and make sure everything is functioning properly. Not surprisingly, tapping each action again and again began to bore me, so I decided to try to automate the process. Previously, the maximum amount of actions I (or anyone, as far as I know) have been able to chain together, was five. I didn't think this was enough for my stress test of new versions of Drafts, so I decided to try to chain more. My goal was not greater numbers for the sake of having greater numbers. I wanted to put together a chain that would fire off an action for every single service that Drafts is connected to, as well as chaining to a variety of apps which support x-callback-url. I sketched out the bones of the sequence in the manner shown below, then filled in the proper URL for each action once I had it planned out. When I finished, I had created a chain of 25 individual actions, all connected through Drafts, which spread out through every service that Drafts has access to, as well as jumping between 7 different apps using x-callback parameters. After importing each action and checking and rechecking each connector, it was complete. So here it is, the Drafts 3.0 Stress Test:

Google Chrome --> Drafts --> --> Twitter --> Secondary Twitter --> Riposte --> Message --> Facebook --> Email --> Dropbox --> Reminders --> Evernote --> Due --> Instapaper --> Fantastical --> Google Chrome

Before beginning the Stress Test, find a webpage that you want to post to all of your social networks. Obviously this action is so huge that it's meant mostly as a proof of concept and to test the abilities of Drafts, but if you run it then you will still be publicly posting things to your accounts, so choose a webpage you don't mind popping up for all your followers. Next, copy some text that describes the page, or says really whatever you want, to your clipboard. The text will be shown on the top line before the page title and URL are shown. Now you are ready. Launch your Stress Test bookmarklet from the omnibar in Chrome and sit back and watch.

Here's a video of the stress test in action. (You may want to switch it to HD to make anyhting out.)

For those who want to further analyze the sequence, here's a detailed list of the actions and their functions. If you don't care about the internals of the sequence, feel free to jump to the bottom.

[1] Bookmarklet: Run this bookmarklet from a webpage in Google Chrome to begin the action sequence. It simply pulls the page title and URL from Google Chrome and sends them to Drafts, launching the "stressTest" action when they arrive.


[2] stressTest: The beginning of the action sequence. stressTest creates a new draft in Drafts of "[[clipboard]]%0A[[title]]%20[[body]]", which produces a draft with the first line populated with whatever is in your clipboard and the second line populated with the title of your URL followed by the URL itself.

The stressTest action itself takes the newly created draft and runs the stresstestcrossPost action on it. When stresstestcrossPost completes, stressTest launches the continueTest action, then its job is done.


[3] stresstestcrossPost: Called from within the stressTest action, stresstestcrossPost Posts your draft to, then calls back and tweets your draft to one of your Twitter accounts. When finished it sends the x-success parameter back to stressTest so it can continue.

drafts://x-callback-url/create?text=[[draft]]&action={{Post to}}&x-success={{drafts://x-callback-url/create?text=[[draft]]&action=Tweet%3A%20the_axx}}

[4] Post to A built in Drafts action. Posts your draft to the account you have connected to Drafts.

[5] Tweet: TheAxx: A built in Drafts action. Tweets you draft to whichever Twitter account you have specified. (In this case it tweets to my account, TheAxx.)

[6] continueTest: This action is simply a "glue" action. No actual action is performed by continueTest, instead its only purpose is to, not surprisingly, continue the test. It calls the next action once stressTest has been completed, launching secondaryAccounts.


[7] secondaryAccounts: This action now takes your draft and posts it to two secondary accounts, one for Twitter and one for (Useful, for instance, if you want to post your link to both your blog account and your personal account on each service.)


[8] Tweet: ajguyot: Tweets to my personal Twitter account, @ajguyot.

[9] stresstestRiposte: Drafts supports multiple Twitter accounts, but it does not support multiple accounts. In order to get around this, I utilize the x-callback capabilities of the popular client Riposte. (Free in the App Store. I don't actually use this app, preferring Felix myself, but it works perfectly for me to keep the app hidden in an infrequently used folder and have its only purpose be to allow cross posting to two ADN accounts at once via Drafts.) After secondaryAccounts Tweets your draft, it then calls the action stresstestRiposte, which jumps over to Riposte, posts your action to your secondary ADN account, then calls back to Drafts and launches continueTest2.


[10] continueTest2: Another "glue" action, continueTest2 launches the stresstestMessage action. When Drafts tells it that stresstestMessage has succeeded, continueTest2 launches continueTest3.


[11] stresstestMessage: This is a custom messaging action which creates a new message with the recipients already chosen and the body filled in with your draft. Simply hit "send" and the success parameter will be sent, along with your message, so that the sequence continues.

[12] continueTest3: the next "glue" action (there's a lot of these). This one posts your draft to Facebook, then calls back and launches continueTest4. (There are reasons for which I did not just nest this simple, built in Post to Facebook action with another useful action like I did with the previous built in actions, and I will explain it at the end.)

drafts://x-callback-url/create?text=[[draft]]&action={{Post to Facebook}}&x-success={{drafts://x-callback-url/create?text=[[draft]]&action=continueTest4}}

[13] Post to Facebook: Posts your draft to Facebook.

[14] continueTest4: The next "glue" action. This one launches stresstestEmail, then calls back and starts continueTest5.


[15] stresstestEmail: A custom email action. stresstestEmail creates a new email message with the recipients and subject filled in and the body populated with your draft. Hit send for the email to send and the action sequence to continue.

[16] continueTest5: This one launches stresstestDropbox, then calls back to continueTest6.


[17] stresstestDropbox: A custom Dropbox action that will append your Draft to a file in Dropbox.

[18] continueTest6: Calls stresstestReminders, then calls continueTest7.


[19] stresstestReminders: Used the new List in Reminders built in Drafts action to add only the body of your draft, which is the page title and URL for your webpage, to a reminders list titled "Links."

drafts://x-callback-url/create?text=%23Links[[body]]&action={{List in Reminders}}

[20] continueTest7: Launches the stresstestEvernote action, then calls back and launches the stresstestClipboard action.


[21] stresstestEvernote: A custom Evernote action that appends your draft to an Evernote note where you may keep links.

[22] stresstestClipboard: A semi-pointless action which copies your draft to the clipboard and then calls back and launches stresstestDue. This action isn't necessary to anything, as you could just keep sending the [[draft]] variable instead of copying it and sending [[clipboard]], but I wanted to include every function built into Drafts so as to test everything at once.

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

[23] stresstestDue: this action sends your draft to Due, where you create a reminder from the text, then it calls back to Drafts and launches stresstestInstapaper.


[24] stresstestInstapaper: This action saves the URL to Instapaper, then calls back to Drafts and launches stresstestFantastical.


[25] stresstestFantastical: The final action. stresstestFantastical creates a new event in Fantastical scheduled for tomorrow with the event name of the webpage title. The URL is parsed and automatically added to the URL section of your event details and your description that accompanies your text is placed in the Notes section of your event details. Add the event and Fantastical will call back and land you right back where you started: in Google Chrome looking at your webpage.


The End.

So there it is, the Drafts 3.0 Stress Test. If you're wondering about all those continue tests, what seems to be a bug in Drafts makes it so that when you nest multiple actions in one which require Drafts to pause until they are completed, such as sending an email or a message, Drafts for some reason does not wait for them to complete before rushing ahead with the next part of the sequence. That's why I had to split up the actions which I originally had in only 3 different continueTests so that they were only called one at a time throughout 7 continue tests. Post to Facebook could have been nested with something else, but I didn't have any other simple actions left over to pair it with, so it was placed in its own personal continueTest as well.

I'm testing this in Drafts 3.0.1 and it is working flawlessly and rapidly. I'm very impressed with the ability of Drafts to not only run this entire sequence, but to run it so quickly. The distance Drafts has come in just a little over a year since it was first released is incredible.

If you want to try the Drafts 3.0 Stress Test on your own device, or if you want to use the model I built for it to make smaller but still large chains of action for your own purposes, I'll include the import links for each action in the sequence below. If you import all of them, just make sure that you change the account information in a few of them so that they post to your own accounts instead of mine, otherwise the sequence will fail. Once you've fixed that info, the sequence should run perfectly on your device as well.

If you make anything cool with my model, or have any questions or comments, please share them with me by any of the methods displayed in my contact page.


Below are the individual import links for each action in this sequence. Alternatively, if you are planning on importing every one of them, and if you also have Launch Center Pro, you could try out my newest action sequence for batch importing actions.

To batch import every URL action displayed below, follow this link to open a new draft formatted properly for the batch import. Then run the Chopper action (or whatever you may have renamed it to) to watch Drafts import them one by one. If you don't have Chopper or the accompanying actions necessary for the batch import, you can get them here.

Important: Batch importing only works for URL actions, so the four custom actions not of the URL format which are used in the Stress Test must still be imported individually. Make sure to import stresstestMessage, stresstestEmail, stresstestDropbox and stresstestEvernote from the list below.

Bookmarklet: No import link here, bookmark this page on Chrome, then change the title of the page to whatever you want to call your bookmarklet to launch the test, and replace the URL of the page with the following JavaScript:






















Post to ADN