iOS power users are raving about Workflow, a new app released on Thursday that brings automation to iOS devices. The app is powerful, and one of the first things I wanted to do was to create a workflow that would create affiliate links for Apple and Amazon. For the non-bloggers reading this, affiliate links give me a small kickback when you (the reader), click on a link on my site and then make a purchase at Amazon, iTunes, the Mac App Store, or the iOS App Store.
There is a Mac app called Affiliate that does this but it only works when I’m posting from my laptop. I wanted a workflow that would perform the same function on my iPhone or iPad. I had invested some time in trying to figure out how to do this with Drafts but was unsuccessful. When Workflow was released on Thursday, I decided to see if I could build a workflow that would serve this need.
After a bit of fiddling around and learning the app as I went, I ended up with the following (split into two screenshots since it wouldn’t fit into one):
This workflow requires that Clean Links be installed, which is a free app that turns shortened and redirected links into the true location of the item. It also requires the user to copy the iTunes or Amazon link to the clipboard before running the action. When the workflow is run, it passes the link through Clean Links, determines if it is an iTunes or Amazon link, applies the appropriate affiliate code, and copies the resulting affiliate link to the clipboard. I can then paste it into whatever I’m working on.
One caveat… I could not get this to work as an extension. I’m not sure why. It may be a problem with Workflow (which is only on version 1.0) or there could be some other problem. To get around this I simply added the workflow to my home screen so that I can run it with one tap.
Feel free to download this workflow and modify it to serve your own purposes.