coaching newsletter contact

Workflow to Share Articles with Twitter Handle

I like to share articles on Twitter. And I want to make sure I give the author credit in the tweet. But it’s not always easy to find their Twitter handle.

I can usually track it down, but I can quickly derail and find myself down a rabbit hole of links. I’m on a mission, but it’s too easy to click on another article and lose 20 minutes.

I mentioned the app Workflow (iTunes) on my home screen post for MacSparky’s site. It’s a tool that I continue finding more uses for. In this case, I found a way to search the source code of an article to find all the potential Twitter handles on the page.

Caveats

Making this happen was easier than I was expecting, but there are a few caveats you should be aware of before using this:

1. Intent, Share, Sharer

There are times when the list of handles shows up and has one of these values. It’s because the article has a share bar of some kind on it. I could find a way to exclude these from the list but it wasn’t a quick fix for me and I didn’t want to spend too much time on it.

2. Not 100%

If there’s a handle on the page, the workflow usually finds them. But there are instances where I know that a handle is in the article and it still doesn’t find it. I haven’t been able to track down why, but it’s infrequent enough that I don’t worry about it.

How it works

You can find the workflow here, but here’s the process:

1. Get the URL and expand it

I use this primarily from Pocket. It drives me crazy when services shorten links with their own shortener. So the first thing the workflow does is get the URL from the input and expand it. It then takes the expanded URL and saves it to a variable for later.

2. Get URL contents and make HTML

It then takes the URL, fetches the content of the webpage, and creates an HTML document from it. This is what allows searching in the next step.

3. Search for Twitter handles

Using a RegEx search string, it looks for anything that looks like a Twitter handle in the source HTML. It takes the results of that search and adds it to a list that you choose from.

4. Create the share string

The last step is to create the string of text that will be passed to the share sheet. It uses the expanded URL from the beginning and the handle you selected to create the string. You can alter this for yours if you like a different format.

Using the workflow

When you find an article you want to share, invoke the share sheet and hit Run Workflow. Select this workflow and wait for it to ask which Twitter handle to use. Once you’ve selected one, the share sheet will pop up again and you can pick your method of sharing. It will dump the created share string into the application. All you have to do is add your comment to the beginning of the string. Poof!

UPDATE: I had a number of requests to add the title of the article to the tweet. I wanted to encourage myself to add an original comment about the article, but sometimes want this as well. So I went ahead and created another version that adds the title to the beginning of the tweet. Enjoy!

Thu, Aug 27, 2015 07:00pm CDT https://bhlg.us/4cu4
#apps #workflow

Want to see my August 2020 Bullet Journal setup?

Join 1,514 subscribers!

I'll send you the link to a six-minute overview video of my August 2020 spreads when you sign up for my newsletter, The Weekly Impulse.

Site Analytics

I use Fathom Analytics on this site because I care about your privacy. And if you ever want to see the stats collected and the data I see, check out the live analytics here.

Amazon Affiliate

joebuhlig.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means to earn fees when linking to Amazon.com and affiliated sites.

Disclaimer

Disclosure of Material Connection: Some of the links in the post above might be “affiliate links.” This means if you click on the link and purchase the item, I will receive an affiliate commission. Regardless, I only recommend products or services I use personally and believe will add value to my readers. I am disclosing this in accordance with the Federal Trade Commission’s 16 CFR, Part 255: “Guides Concerning the Use of Endorsements and Testimonials in Advertising.”

an analog mind in a digital world

👋 I'm Joe Buhlig. I strive to build productivity systems that stand the test of time and help me do more than check boxes. I'm here to help you do the same.

🎙 I read a lot of books and talk about it.

🐿 I can't focus on one thing for long, so I write a lot of code for an eclectic grouping of projects.

📓 And I'm a bit obsessed with finding non-proprietary solutions to digital problems. Thus, text files for the win! 🎉

MN U.S.A 1986-09-30
  • all
  • articles
  • code
  • likes
  • notes
  • photos
  • replies
  • reposts
  • steps
  • videos
coaching newsletter contact
© 2014-2025 by Joe Buhlig