The audio on this post was recorded and uploaded with the Workflow.app on my phone. The images were too. The posts was written in drafts and posted from there with a Workflow action.

Yesterday’s post was just about using workflow.app to post to a blog in a way that other tools can do. The method might suit some people’s needs better than using the WordPress app or the browser. It could be altered and improved too. But essentially it is just another way of doing something. I think this next step is a much bigger deal.

Workflow has actions that allow you to record audio or take video. It also has an encode media action.

record-encode-screenshot

This looked promising. I have now got a workflow that will record audio, encode to MP3 and upload to my blog.

I will end up with the link to the MP3 on the clipboard ready to paste into a post.

Getting the url to the MP3 took me a while to figure out. The action returns the url to the attachment page. I had to uses a few more actions to get the content of that page and then get the url to the MP3 with a regular expression. I don’t know much about regEx and less about the flavour used by Worpflow.app. I got there in the end.

workflow-regEx

A couple of OSs ago this seemed impossible on iOS. Now you can save an MP3 created with one of the myriad of audio apps to Dropbox, iCloud, one drive ect and upload through mobile safari.

I like to think this is a bit better. It is certainly a wee bit quicker if you do not need to edit the audio.

There were always apps that would record and publish audio to the Internet. What I like about this method is it goes along with the idea of owning your own data, posting to your own domain and having a little more control.

I am now wondering if it would be worthwhile seeing if you can trigger workflows from a draft.app custom script. This post on the drafts blog: Drafts 4.1.2 – Workflow Integration | Agile Tortoise makes it look as if that would be possible. This would turn the drafts app into a WordPress editor. One could upload images and audio directly from drafts, perhaps inserting the image or audio code at the insertion point.

Posting to WordPresss is pretty simple on the go. Recent versions of WordPress have a fairly good performance on Mobile Safari. the WordPress app performs a little better the body field is less ‘jumpy’ and uploading photos a little simpler.

There are a few other blogging apps but I’ve not stuck with any.

I tend to write posts in drafts as there is even less chrome and more space to type. It also has some clever shortcuts, helps with markdown and can do cleaver stuff with text and scripts.

A while back I noticed that the new version of Workflow had actions for posting to WordPress. I made some quick tests sand it seemed to do the trick.

Today I started thinking about it again. Workflow allows you to make posts, pages and media. When I tried uploading media I was disappointed that uploading an image returns the url to the attachment webpage rather than the attachment itself.

I’ve tried to extract the url form the page but the best I have is to extract all of the urls on the page and present this as a list to choose from. This is copied to the clipboard.

image upload

So I have an workflow that is an action extension. This allow me to pick a photo then run the workflow. It is presented as a document picker in other apps, for example pixelmator. When this workflow runs it resizes the image and uploads it to my blog. It then grabs the attachment page and pulls a list of links out of that. I can pick a link to copy to the clipboard.

Making a post

The next workflow I have is one for making a post. This runs from drafts.
It first set a variable to the draft. Then it shows the photo library. When a phot is picked it uploads the photo to the blog. As in the first script it downloads the attachment page, extracts the urls and let’s me pick one. This time the one picked is put in another variable.

The workflow then get the first variable, and posts it to the blog as a draft. It asks for a title and used the url to the uploaded image as the posts featured image.

It also asks for tags when it runs.

The featured image for this post is a couple of screenshots taken on my phone. They were stitched together with workflow and the result edited a bit in snapseed.