Workflow: Save Workflow Name and Link

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

Part of my blogging about Workflow workflows involves me capturing some basic details about the workflow. This includes the name of the workflow and the link to download it. As part of my reference system these are both key items that I wanted to make available in a text file in my Workflow folder in Dropbox. This is the first workflow step in my blogging process.

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). It then uses the URL to capture the content of the download page using a Get Contents of URL action.

A useful property of the download page is that the title of the page matches the name of the workflow, so we can just query the page contents for the name of the page. At this point it may seem that we have the name of the workflow. However that isn’t always quite the case. I’m personally quite fond of using symbolic characters in my workflow names. Particularly ampersands (“&”). These are returned from the page in HTML encoded format; so “&” would be “&”. By passing this to the Make Rich Text from HTML action we can auto convert this encoding back to plain text. This is then stored in the Workflow Name variable.

Now we have both the workflow name and the download URL I place them into a text action - each on it’s own line.

The text file is then automatically saved to a specific directory in Dropbox using the workflow name (appended with .txt) as the file name. The option to overwrite the file is also set. This is because each time the workflow is changed and shared it will be assigned another unique ID for the download URL. So this allows me to update the URL by simply re-writing the file.

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 Name & Link workflow.

Author: Stephen Millard
Tags: | workflow |

Buy me a coffeeBuy me a coffee



Related posts that you may also like to read