Automate retweets with Microsoft Flow

Still true

This was an interesting use case. I manage the Boston Office 365 User Group’s twitter feed, @Bos365. As we look to promote our non-profit events and content through Twitter, I sometimes just want to tweet the same thing a couple of times. Twitter is instant, and your tweets can get buried pretty quick, I wanted to send a reminder for some tweets weeks later. Eventually I’ll update this to handle tweets within a time range, more below.

Enter Microsoft Flow!

Using Buffer with Flow, I can now have tweets auto-retweet when I want them to. Here’s how:

Retweet Buffer with Microsoft FlowTo sum up, it triggers when a tweet is sent via Buffer. It checks if the tweet contains #rt, if so, it waits 4 weeks and retweets the same tweet without the #rt.

Trigger: Buffer – When an update is shared

I recently fell in love with Buffer as I manage a few different twitter handles, LinkedIn pages and my own Facebook and Instagram accounts. Lovely tool. And fortunately Flow supports it!

Buffer Trigger in Flow

Condition: If text contains #rt

Super simple, does the Text of the update from Buffer contain #rt?

Microsoft Flow Condition Checking Buffer

Yes, Buffer update contains #rt

Yes Buffer Contains rt

There is no false, or NO condition for this Flow. If the tweet doesn’t contain #rt, let’s ignore it, move along, nothing to see here.

Action: Notifications – Send me a mobile notification

I’m paranoid, and love to control my technology. This notification simply tells me that “Hey, we’re queuing up a tweet to retweet later”.

Simple enough! You can skip this if you’re not as paranoid (or controlling).

Action: Schedule – Delay

Don’t want to reschedule the tweet immediately, let’s give it some time. I selected 4 weeks, feels right. I will at some point revisit this and update it so I can specify the length of time in the #rt value, like #rt14, or #rt28 (in days).

Delay sending the update to BufferNote: 4 weeks is the maximum length you can set a delay, unless you have a better SKU. If you try to and run the Flow, you’ll get an error like

The provided ‘Wait’ action ‘interval’ value ‘4’ ‘Month’ is not supported for the ‘Consumption’ SKU. The value must be between ‘5’ seconds and ’30’ day(s)

Action: Buffer – Create an update

Once that delay finishes, let’s create an update in Buffer. I could just tweet it but I want it to fit into my Buffer schedule of tweets, and I can move it around or delete it if I decide I don’t need this retweet anymore.

Create Update in Buffer from FlowThe Text value is replacing #rt with a space: replace(triggerBody()?['text'],'#rt',''). Doing this to ensure this tweet doesn’t loop forever and ever and ever and ever…

Action: Notifications – Send me a mobile notification

Again, I’m paranoid, and love to control my technology. This notification simply tells me that “Hey, a retweet has been queued”.

Mobile phone notifcation

Done – but I’m paranoid, how do I know it’s working if I have to wait 4 weeks?

First, that’s where the notifications help ;)

Secondly, check the status! When this Flow runs and finds a tweet update with #rt, the Flow remains in a Running state until it’s finished. Note the one lonely Running in the history list

I can then click on that and see it’s details, including what tweet it’s waiting on

Flow in progress

Note the yellow 3/4 circle on the Delay action, meaning it’s waiting on that. Just before that in my notification I can see the text message it’s waiting on. I can also see more details from Buffer if I expand that trigger.


I hope this helps you find new ways to use Microsoft Flow! ‘Tl next time, Happy Flowin’!

Leave a Reply

Up ↑

%d bloggers like this: