Workflow: Save Workflow Icon

This blog post covers the third sub-workflow of the blogging workflow process described in the Blogging About Workflows blog post.

One of the elements I use in my blog posts (among other places) are workflow icons. I try and choose meaningful pictographs for the icons (though the set could do with a significant expansion) and I try to use the base icon colour in a meaningful way. Within my blog posts I often use them as the intro image - as I do in this post and so having a copy of the icon image ready and waiting for me when I blog is a real boon.

The workflow begins by capturing any input parameter and then proceeds on the basis that the the URL to the download page is on the device clipboard (note that I always start the workflow off by first using the Copy Link sharing option from the workflow itself to get that URL onto the clipboard). Just like the Save Workflow Name and Link workflow it captures the download page title and stores this in a variable as the name of the workflow.

In the previous sub-workflow that downloads the workflow file from Amazon Web Services by inserting the unique workflow ID into a special URL, we do the same here to get the URL that identifies the icon image file that is displayed on the download page.

To make it easy to identify, the file is downloaded and assigned a file name of the format “{workflow name} (icon).png”. The file at this point is actually very large and since I only ever need a much smaller version I resize the image file so that it has a width of 150 pixels. More than sufficient for my particular needs. The file is then saved to a workflow directory in Dropbox ready for me to use in my blog post.

The last step uses the workflow input to pass control back to another app/workflow. In the case of the blogging process it goes back to the DocFlow workflow. If no input parameter was received then the Open X-Callback URL action will do nothing.

The details of the workflow can be seen below and you can also download this Save Workflow Icon workflow.

Author: Stephen Millard
Tags: | workflow |

Buy me a coffeeBuy me a coffee



Related posts that you may also like to read