Blogging with RSS and Workflow
Summary: After being called out on Twitter, I briefly describe how I use RSS and Workflow as blogger's duct tape and Swiss Army Knife.
A couple of days ago, I tweeted that RSS and the Workflow app for iOS is like duct tape for blogging. Workflow’s Twitter account called me out, asking if I could share them. This post is a partial response to that request; at some point I’ll create public shares once I’ve stripped out the personal data and credentials.
I currently have four Workflows I use to help me manage my blog (including my newsletter) and I anticipate this list growing.
Here’s what I’ve got so far:
This is my largest workflow and I use it to generate and send my newsletter.
First step is to retrieve my list of subscribers from a text file I store in Dropbox. I extract the text and save it to a Recipients variable.
Next I generate a date and subtract 1 week. This is then stored in the LastDate variable.
Next I pull down my RSS feed and retrieve the last 10 items. I then filter these articles, removing anything older than LastDate. I also change the order to Oldest First. I then loop through the list of articles getting and setting the article’s Title, Excerpt, URL and the Published Date as variables. I then dump each article’s variables into a markdown text snippet and finally combine each of these into a new text object and store it as a variable.
Next I convert the markdown text variable to Rich Text and pass it to an Send Email action. The action displays a compose sheet with the Recipients variable added to the BCC field and the Rich Text goes in the message field.
Finally, I write the rest of my newsletter and send it off.
Currently my newsletter isn’t much more than a list of this week’s post and a little director’s commentary about why I wrote them. For the most part that’s easy enough to bash out on my iPad in the compose sheet, however if my newsletter grows to more than that, and decide to transfer writing to another app, Workflow would make that trivial.
2. Manage Email
This workflow lets me add or remove email addresses to my recipient list. Subscribing or Unsubscribing from my newsletter is handled by email, which is handled by a PHP script on my website.
When I receive an email containing the new or unsubscribing recipient, I copy to the iOS clipboard and then run the workflow, which starts by extracting the email address from the clipboard and saves it to a variable.
Next I retrieve the recipient list from Dropbox and test if the email already exists. If it exists, I assume the recipient wants to be removed and if it doesn’t I add them to list.
So far, my newsletter doesn’t have many recipients as I mostly pitch it towards people who don’t use social media. If it grows then I’ll have to create system that scales better than that (i.e. pure server-side automation) but that’s a problem for future Chris.
3. Publish to Chris Rosser
This workflow transfers new content from iOS device to my web server and kicks off the build process that converts markdown to HTML.
The workflow is actually quite simple. Basically all it does is ask me to select a file from Dropbox. It queries the file for its name and extension and then passes that to a Run Script Over SSH action.
The simplicity of the workflow belies the complexity of the backend on my server, which I wrote in Python. The Python script can handle markdown files, images, and zipped archives containing both markdown and images files.
4. Tweet Article
This workflow works similarly to my newsletter generator. It reads my RSS feed, extracts an article of my choosing and posts the details to my Twitter account.
Necessity is rightly called the mother of invention. I’m always thinking about more efficient ways to automate the boring stuff. Some of it requires a little server-side code1 but I’m continually delighted by what I can with Workflow.
These workflows are specific to me and may or may not help others. I love to hear how other bloggers solve their problems. I’m also happy to help out a fellow blogger if you want help in greasing your own machinery. In either case, feel free to contact me on Twitter, Facebook or email.
For non–coders, you could easily replace my server–side stuff with web services like IFTTT and Zapier. ↩