Tag Archives: MS Flow

Saving Tweets to Excel using Microsoft Flow

Microsoft Flow is the new tool integrated with Office 365 which allows different services to interact. Such as social media providers like Twitter and Facebook or file sharing platforms like Dropbox, OneDrive and Google Drive, and many more services.

I wrote a blog post earlier this year about integrating machine learning tools and another post about syncing Google calendar data into SharePoint using Flow processes, but I thought I would get back to basics and provide a clear easy tutorial for Microsoft Flow newcomers.

In this example, I’m going to setup a Flow to put all the tweets made from the company (my) twitter account into an excel spreadsheet. This is a simple process but might be useful for keeping track of marketing or even leaving an audit trail of marketing activity by the social media owners within an organisation. The excel spreadsheet will sit in OneDrive for business but you can determine where you would like it stored.

To start, we are going to create a new excel spreadsheet with a table. In OneDrive for business, create a new excel spreadsheet called “tweets”.

Microsoft Excel Online

Add the following column headers:

  • Tweet Text
  • Location
  • Time

Select the column headers and in the insert menu, select “table”. This will make a new table in Excel which Flow can access to add rows.

Open Microsoft Flow. The Flow icon should be available in your Office 365 App Launcher if you have the licence enabled (alternatively you can just go to the website).

Search the templates for “Twitter”, and select the “Save tweets to an Excel file” template.

Microsoft Flow Templates

You will then be required to login to Twitter and Excel. When logging into Excel, make sure that you sign into OneDrive for Business with the correct account (otherwise you will get unauthorised access when trying to add rows). When both services are signed in, press continue.

Twitter trigger

In the twitter trigger, add the twitter account name to the search text box. This will fire off the process when that account tweets.

Excel action

In the insert row action, find the tweets excel spreadsheet in your OneDrive for Business by using the folder icon. The table will appear automatically under the Table name drop down. You can then select each column and add the appropriate tweet field.

Save the Flow and check that it is enabled.

In twitter, send a tweet from your account.

Twitter tweet

The Flow will run every 60 seconds, you can check the runs by clicking on the “i” icon next to the Flow and then filtering by “Checks (no data)”. After a couple of minutes, your spreadsheet should be updated with the tweet data!

Excel populated with tweets from MS Flow