This workflow relies on Due’s ability to trigger a URL when you dismiss the reminder. It does require at least two interactions to run successfully:
- Swiping Due’s notice on the lock screen to dismiss the action, which activates the URL. (If you have a passcode or TouchID set up, you will have to also unlock your iPhone at this point.)
- Tapping “Send” on the email or message that Drafts generates.
Set up a draft with dummy text. You need to target a specific draft via its UUID to schedule it, so you must enter some text to create a draft to target. I wrote one titled “Scheduled Mail” to create an easily recognizable draft. By default, Drafts will treat the first line of a draft as the subject and insert it with the email action. I want to leave the first line intact as Scheduled Mail and modify the body each time so that I always know which draft is being targeted and don’t delete it by mistake. You obviously don’t want to delete the draft as that will break this action. I created a new action based on the built-in Email action that is modified to use
[[body]] instead of
I created this workflow to schedule mail to distribute a workout to my after-school Fitness Club kids, so I further modified this custom email action to use TextExpander to auto-fill the email addresses, using Drafts’ support for TextExpander snippets. Drafts will expand
<<;fmail>> (my snippet for my Fitness Club email list) into the full list of emails when the action is triggered. I also pre-filled the subject line with “Fitness Club” followed by the day’s date, which is dynamically filled via a TextExpander snippet. You could pre-fill all of this manually, but TextExpander makes it much easier to update the information since all you have to do is enter it in one place and it will be automatically updated when you refresh your snippets in an app that supports TextExpander.
Get the UUID of the Scheduled Mail draft with a UUID import action (direct import link from the Drafts 4 Review Alex Guyot did on MacStories). This action will copy it directly to the clipboard so you can paste it at the appropriate point.
The first part of the URL is:
Paste in the UUID of the Scheduled Mail draft here.
The UUID should be followed by
to use Draft’s built-in Email action,
to send an SMS or iMessage, or
for a custom action.
If you have a space in your action name, it must be percent encoded or the action will fail without warning and without any further actions being performed.
If you have elected not to pre-fill recipients, you can choose recipients from your Contacts when the action is triggered. You can make edits or changes before tapping “Send”.
Because of the limitations on background processes and inter-app communication in iOS, I don’t believe it’s possible to send an email without any user interaction. I could be wrong about this. If you know a better way to accomplish this, send me a message on Twitter or the site contact form.
Surprisingly, you have to resort to some similar kluges in OS X too. This is easiest guide I’ve found for using Automator and Calendar to do it. The problem is that you have to have your computer powered on and awake at the scheduled time, or the task won’t run. Since my iPhone is almost never off, but my MacBook is usually asleep unless I’m using it — and furthermore I’m almost always in transit exactly when I want this action to run — it’s much more convenient to have it run on my iPhone.