Automatic Weekly Recaps with Workflow on iOS

Posted on

I posted my first Weekly Links Recap a few days ago as a way to share some interesting articles I’ve come across during the week that I may not have had time or enough opinion on to give their own blog post. When I first had this idea it seemed like a lot of work to find the link, grab the excerpt (or provide my own blurb), put it into a draft post in my blog and remember to always post on Fridays – I figured that sooner or later I might find the effort not worth the reward. 

As a nerd, programmer and loyal iOS Workflow user I knew there had to be a better way to accomplish this & I was right! To give a bit of background, before I owned an iPhone, I was a loyal Android of almost 7 years and I had automated a lot of daily activities using Tasker, a phenomenal app that let you perform a set of tasks based on triggers or contexts. When I found out about Workflow on iOS, it was an instant purchase and it definitely has more than $4.99 worth of functionality. Due to the nature of iOS it is not as powerful as Tasker, but what it is able to do still boggles the mind.

A sample screenshot of my “Share Links to Dropbox” Workflow.

Share Links to Dropbox Screenshot

In order to accomplish this automation I built two separate workflows. The first one (and the more complicated of the two) I call Share Links to Dropbox and it’s steps are as follows –

  1. Store the URL & Text as INPUT
  2. Grab the URL from INPUT
  3. Store it as URLINPUT
  4. Grab the Text from INPUT
  5. Store it as TEXTINPUT
  6. Use the Get Article from Web Page action
  7. Store the article as URLARTICLES
  8. Use the Get Details of Articles > Title action to get the Title of the Article
  9. Store as URLTITLE
  10. Check IF URLTITLE = URLINPUT
    1. If True Choose from Menu (Manually Input Text or Use Article Excerpt)
      • When a workflow accepts both Text & URL, if no text is elected the Get Text from Input also returns the URL. This allows me to enter my own excerpt / blurb.
      • If Manually Enter Excerpt is chosen, Ask for Input and store that in URLEXCERPT
      • If Use Article Excerpt is chosen, use the Get Details of Articles > Excerpt action and store that in URLEXCERPT
    2. If False, store TEXTINPUT into URLEXCERPT
  11. Get the Current Date
  12. Use a custom Date Format of w to get the week number
  13. Store that as WEEKNUMBER
  14. Format all variables into Markdown formatted text for my blog

    * [URLTITLE](URLINPUT)
    > URLEXCERPT

  15. Pass the above Text into the Append to Dropbox File action with the following parameters –
    1. Mode: Append
    2. File Path: Apps/iOSWorkflow/WeeklyLinks_W<WEEKNUMBER>
    3. Make New Line: Yes

That may seem like a lot of steps, but it covers all use cases for sharing. If I want use what Workflow assumes to be the excerpt of the article I can do so, if I want to select another part of the article to be the excerpt I can do that, or if I want to supply my own custom blurb I can do that as well.

While the Share Links to Dropbox workflow is a bit complicated (and contain 34 steps) the workflow that actually creates the post is much simpler at a grand total of 5 steps! That workflow is called Create Weekly Links Blog Post and it’s steps are –

  1. Get the Current Date
  2. Use a custom Date Format of w to get the week number
  3. Store that was WEEKNUMBER
  4. Get the Current Date
  5. Use a Date Format of Long
  6. Store that was POSTDATE
  7. Use the Get Files from Dropbox action with the following parameters (matching the Append to Dropbox File action from the first workflow) –
    1. Show Dropbox Picker: Off
    2. File Path: Apps/iOSWorkflow/WeeklyLinks_W<WEEKNUMBER>
    3. Error If Not Found: Yes
  8. Pass that file into a Post to WordPress Action with the below parameters –
    1. Title: Weekly Links Recap * <POSTDATE>
    2. Type: Post
    3. Format: Standard
    4. Status: Draft

Instead of having to remember to run the Workflow at 7AM on Friday mornings, I setup a Launch Center Pro notification action that allows me to automatically run that workflow from a notification I receive at that time. Once I am fully awake for the day and have some downtime at, I will do a quick proofread of the post and publish it to my blog.

I am sure that my workflows are by no means perfect, but so far they get the job done and probably save me a lot of time and headache. This time savings and versatility will allow me to keep this series of weekly recaps going without any hassle.