I must apologize if some of my followers received email notifications for some non-existent posts today. Iโm working on automating the posting process from my Mac and Iโve encountered a glitch in the system. No matter what status I set a post, an immediate notification email is sent out 1. On the other hand, Iโm almost there, which is kinda cool.
When my primary writing tool shifted from my MacBook Pro, to my iPad Pro, a couple of years ago I set up an WordPress workflow using the excellent Workflow app. It sped up the posting process so much it made blogging from my MacBook feel archaic. With the arrival of Scrivener 3, however, Iโve begun splitting my writing time between iPad and my MacBook. So Iโve been exploring automation options to make posting from my Mac feel less archaic.
MacOS includes a utility called โAutomator,โ which served as an inspiration for the Workflow app. Itโs very powerful, but it also lacks any sort of plugins for WordPress 2. This made it unusable for my needs. Or so I thought.
WordPress has an option to post by email though a private email address, and this feature allows for shortcodes to set values for a postโs title, category, tags, excerpt, and even status 3. Iโve toyed around for the past several days 4 and think Iโve come up with a automation process which meets my needs.
First, I created an Automator folder action, which becomes active anytime a new file appears in a designated folder 5. Now, when I compile my latest post from Scrivener and into that folder 6 the file is opened in textEdit, the contents passed on through the workflow, and then textEdit is quit. This was the easy part.
More difficult was taking the content of my blog post and appending information like the post title, tags, categories, and excerpt. For this I used another one of Appleโs under utilized tools, AppleScript. This scripting language is easy to read, fun for tinkering, and very powerful. An AppleScript can also be called from within an Automator workflow, which made it ideal for my needs.
Once my workflow closes textEdit I am prompted with several dialog boxes. The first asks for the post title 7, the second asks for a category 8, and the third asks for tags. The results of each of these dialogs is saved to a variable, which the script then uses to compose a new email.
I could send the message without having to look at it, but I decided Iโd like to be able to do a final proof on the draft. This allows me to make any changes Iโd like, but it also affords me the opportunity to add an excerpt by copying a bit of text from the main post. Once I hit send, the post is included on my blog as a Draft. From there I can apply a featured image, do any final edits, and schedule my post. Itโs fast, streamlined, and handles a good portion of my work for me. When I begin writing my next Fiction Tuesday novel I could even create a second folder action with settings specific to that story.
Iโm quite excited by the prospects. In fact, I published this post using the workflow I describe. But Iโm also not certain Iโll be leaving the โpost via emailโ feature enabled. Anyone who spies out my private email address could flood my blog with spam posts. This is a prospect I do not relish 9.
- Iโm hoping this message it sent only as an alert for me, which would make sense, but thereโs no indication this is the case in the resulting inbox message. ↩
- This is not Appleโs fault, developers have to create their own ties to Automator. ↩
- Among a host of other features ↩
- Tinkering is what I do when Iโm too tired to write, but my brain requires a creative outlet. ↩
- In my case, I created a โblog postsโ folder on my desktop. ↩
- Using Markdown as the compile option. ↩
- Iโd like to get this to be applied using a filename so I donโt have to type it out, but Iโm not quite there yet. ↩
- Itโs unfortunate, but I donโt think I can create a check list of common categories to be selected, so I have to type it out. The same is true for tags. ↩
- It also doesn’t like Markdown by default So I have to cut the text from the “visual” editor, and then past it into the “Text” editor in order for my markup to work. This is less than ideal. ↩
Discover more from Painfully Hopeful
Subscribe to get the latest posts sent to your email.

Very interesting! I know Automator has some real power and I set up a few simple things in the past. I would play more with it but my iPad works well for me.
Iโm a bit disappointed with the email to post feature, so I turned it off. But it was a good exercise, and Iโve begun a Lynda course to brush up on my AppleScript. I may be able to rig something up. Iโd REALLY like Workflow to come over to MacOS, though. Automator is cool, Workflow is better.
Well Apple hired the workflow team so…
They actually bought Workflow in itโs entirety!
True, but I wanted to stress the team of people are working there. So they didnโt just buy the app but the people and the app (hence its free).
True.