Open Twitter.com User Profiles in a 3rd-Party Twitter Client with Workflow

Here’s a useful action extension for Workflow that will open a user’s profile based on a Twitter.com link in either Tweetbot or Twitterrific.

This works with either a link to a Twitter user’s profile, such as https://twitter.com/jordanmerrick or a direct link to a tweet, and it doesn’t matter if the link points to the desktop or mobile domain.

An animated GIF of the workflow in action

It’s largely unnecessary to have the workflow ask which Twitter client you use, since most people likely just use the one day-to-day, so you should modify the final steps of the workflow to automatically open your preferred app.

For some reason, this workflow doesn’t want to run on my iPad with the iOS 9 Public Beta 2. I’ve tested it on iOS 8 devices and it works fine, so if you’re using the latest beta of iOS 9 then you may find it doesn’t work. But, you know, that’s why it’s a beta.

Backing up Workflows

This workflow is now no deprecated after the introduction of Workflow 1.3 and it’s syncing and “Get my Workflows” action. You can find an updated version of this workflow here.

Until Workflow has its own backup functionality1, it’s really important to make sure you’re manually backing up your workflows. There’s always the possibility that you could accidentally change or delete a workflow, have to reinstall the app or even lose your device.

I’m ashamed to say that I wasn’t doing this, and had a close call when a workflow I sent from my iPad to iPhone didn’t work, causing the app to crash every time I launched it2. Fortunately, I was able to fix the problem but the thought of losing all my workflows motivated me to figure out a decent backup process.

Each workflow is simply a .wflow file, and the link that Workflow generates is just a web preview. When you add a workflow, you’re actually just downloading a very small .wflow file that opens in Workflow.

While Workflow does generate a link on demand that you could technically use as a backup, I prefer to have the actual workflow file itself, just in case there’s ever an issue with Workflow’s website (or they themselves suffer any data loss).

To that end, I’ve created a workflow to backup workflows to Dropbox. This does require a working internet connection, as it relies upon the link that Workflow generates. The way the backup workflow operates is as follows:

  1. View the workflow you want to backup and use the Share Sheet to copy its link to the clipboard.
  2. Exit the workflow and then double-tap the “Workflow Backup” workflow to trigger it.
  3. The workflow will use the link in the clipboard and modify it to point to the .wflow file.
  4. The file is downloaded, renamed using the format {Name of workflow} - {ISO8601 datestamp}.wflow3 and saved to Dropbox, under the folder /Workflows.

If you ever need to restore one of these saved workflows, you can use the Dropbox app to open them in Workflow.

Dropbox backup of Workflows

Some of my workflows are adapted for iPhone and iPad, so I’ve modified the backup workflow on each device to also use an appropriate /iPhone or /iPad subfolder in the /Workflows Dropbox folder.

  1. Another feature sorely lacking from Workflow is the ability to sync workflows between devices.Β 

  2. I was using Personal Hotspot on my iPhone but, for some reason, my iPhone decided to switch to a public access point while it was receiving the workflow. I’m guessing this corrupted it which, in turn, caused Workflow to crash.Β 

  3. For example: “Get iTunes Podcast URL – 2015-07-24.wflow”Β 

Open iTunes Store Albums in Apple Music with Workflow

Apple Music includes an option with its sharing menu to open a song or album in the iTunes Store if you wish to buy it, but there isn’t currently a way to do this in reverse. I still like to browse the iTunes Store, but having to switch between apps and perform a search see if an album is available on Apple Music is a bit of a chore.

Starting with iOS 8.4, iTunes Store links now open in the Music app, rather than the iTunes Store. Using a Workflow action extension, it’s simply a case of getting the iTunes Store link to a particular album and then immediately opening it. When the URL is opened, the default behaviour takes over and the album is then opened in the Music app. Now, if I stumble across an album in the iTunes Store that I want to stream with Apple Music, I just open the share sheet, tap “Run workflow” and then select “Open in Apple Music”.

Workflow to open iTunes Store content in Apple Music

Despite the new behaviour for iTunes Store links, it’s still possible to specify whether a link opens within the Music app or the iTunes Store by adding either &app=musicor &app=itunes to the end of an iTunes Store URL. I’ve included the former in the workflow simply to ensure links open in the Music app.

Post a Text Shot to Twitter with Workflow

You’ve no doubt seen many Twitter users post “text shots” – a text clipping in the form of an image as a way to provide more content than the 140 character limit allows. The process of doing this can be pretty laborious, though a few apps now exist, such as OneShot, that make this process easier.

As an alternative to using a separate app, we can use a Workflow Action extension to post a text shot to Twitter, along with the title and URL of the page it refers to. The tweet I posted and embedded above was created using this workflow.

To use the workflow, first take a screenshot of the portion of the page that you want to post as an excerpt and then run the Action extension. The workflow uses this screenshot, giving you the option to crop it specifically to the text you want to include. The content of a tweet will be prefilled with the image, the title of the page you’re viewing and the URL, which you can then edit with anything else you’d like to include.

Generate iTunes Affiliate Links with Workflow

Blink is a new iOS app that provides a great way to generate iTunes affiliate links. The app has a great feature set (such as Markdown formatting and in-app search results), though one feature I particularly like is that you can call Blink from the Action sheet within the iTunes or App Store and create an affiliate link directly.

While reading a review of Blink over at Macdrifter, Gabe Weatherhead had this little piece of advice:

Let me start by saying that even if you don’t have a blog, you should create an affiliate account and generate affiliate links. You’ll make some money back on your purchases you make with it.

This got me thinking about how useful it would be to have a workflow that not only creates an iTunes affiliate link within the iTunes or App Store, but include an option to immediately open that URL as well. With Workflow, I can.

Here’s a workflow I created that can be called from the Action sheet within the iTunes or App Store. An affiliate link is generated which will be copied to the clipboard in your choice of plain text, Markdown or HTML link (along with the app name), or you can simply open the link in the appropriate store.

Whenever I’m about to buy an app, I run the workflow before purchasing it. The Store still displays the item I was looking at, and the page is simply refreshed to use my affiliate code.

Make sure to edit the workflow and update the Text action with your own affiliate tracking code.

If you use iTunes affiliate links on a regular basis, I’d highly recommend checking out Blink – I have and it’s awesome.

Subscribe to a Podcast Using its iTunes Store Link in Any Third-Party App with Workflow

I’m an avid listener of podcasts and frequently use the Podcast app on iOS to look through the iTunes podcast directory. I dont, however, use the Podcasts app to listen to podcasts (I use Castro), which makes subscribing to a podcast I’ve found within the directory a bit of a chore.

The iTunes Store doesn’t surface a podcast’s feed, only providing an iTunes link (the same type of link used to link to music, apps or movies) when sharing from within the app. This means that the link will only work within iTunes or the Podcasts app, and it can’t be shared to another podcast app.

Since I can’t use the iTunes link to subscribe to a podcast in any other app, I have to do either of the following:

  1. Open Castro.
  2. Tap the + icon to add a new podcast.
  3. Search for the name of the podcast.
  4. Select the right podcast and subscribe.

Or:

  1. Visit the podcast’s website in Safari.
  2. Find the link to its RSS feed.
  3. Tap it, forgetting that Apple’s own Podcasts app handles RSS links.
  4. Switch back to Safari.
  5. Copy the link to the RSS feed.
  6. Open Castro.
  7. Tap the + icon to add a new podcast, at which point the URL in the clipboard is autofilled and I can then subscribe.

Ok, it’s not a long process, but it sure as hell is inconvenient.

Using Workflow for easier podcast subscriptions

A favourite of mine, Workflow is a fantastic automation tool that takes advantage of many features, such as extensions in iOS 8. Workflows can be run directly from the share sheet as an Action, providing a near-limitless number of possibilities.

After using Workflow for a few months, and reading what others have been able to do with it, I was determined to find a way to avoid either of the above processes when subscribing to a podcast, and I began to look for any way to somehow find the direct feed of a podcast from it’s iTunes link.

I stumbled upon this post on Super User, which explains how to decode an iTunes podcast link into a JSON file, surfacing all of its information – and the feed URL.

Using this information, I’ve created a workflow that can be called from the share sheet in iOS that will query the iTunes link, find the feed’s actual URL and pass it along to a third-party app of your choice, or just copy to the clipboard. You’re now able to browse the Podcast directory, or open any iTunes link to a podcast, and subscribe to any podcast using the app of your choice. No more app switching and searching for podcasts.

A quick rundown of what the workflow does to accomplish this:

  1. A regular expression is used to find the podcast’s ID number from the URL, storing it as the variable PodcastID.
  2. Gets the contents of the URL used to find more information about a feed, using PodcastID.
  3. Another regular expression is used to identify the feedUrl value, which gives us the feed’s direct URL and is saved as the variable PodcastURL.
  4. A menu is created with the option to copy PodcastURL to the clipboard, or open it in a number of third-party apps.
  5. An alert is displayed if the URL is copied to the clipboard.
  6. To open the feed in either Castro or Instacast, a regular expression is used to find and replace “http” or “https” with “castro” or “podcast”. For Overcast, Workflow includes a built-in action for Overcast which is used.

Changelog

2015-07-09: Updated workflow to provide better handling of podcasts with a URL in their name, and fixed an issue where SoundCloud feeds would not parse correctly.