Free Microsoft Flow + Twitter + SQL Server

Those days I was playing around with Microsoft Flow and have created some automation for a few things.

While playing with it the thing that I liked was the possibility to host workflows in a free account. So, if you have a live account you can pretty much use a ton of connectors and create your own workflows. You should check it out the plan offers in this link below and understand how you can use it.

image
https://emea.flow.microsoft.com/en-us/pricing/ 

Coming back to what I wanted to write about, I want to connect Microsoft Flow with SQL Server where the results will be stored in a table where you can later query it. Let’s go to action.

The first thing that you have to do is login to your Flow account and click on My flows as shown in the below picture.

imageYou have the option to use pre-created workflows and just do some small modifications to your own purposes, but in this example I am using the option to create from blank.

image

What I want to do is to every new tweet that I post, I want to save in a SQL Server Database an do some post analysis later. So, based in the below screen I select the option to use the twitter connector.

image

I’ve already created the connection with my twitter account and I want to track every tweet that I do using the #sqlserver hashtag.

image

Because my workflow is simple, I will just add an action, which is calling SQL Server to insert the tweet that I just created.

image

When I type SQL Server in the search box, I get several options. For our usage let’s pick SQL Server – Insert Row

image

The next step is creating a connection.

image
Here, you can specify an Azure SQL Database or a SQL Server Database Server that has a public IP.
PS: You can also use the a Data Gateway, but I didn’t test yet, so I don’t know what is the behavior.

Right after the connection is created, you have to specify the table that it is going to store the tweet details.

image

In my database I created the table called: dbo.tweet_analysis

After the table is selected, the schema is mapped and you can see all columns that you have fill up with data coming from the previous connector. Then, all that you have to do is relating the tweet columns with the table columns like the screen below.

image

After those steps are completed, you can save and then click in Done as shown.

image

Because I am monitoring a particular hashtag it might take some time before you start seeing data.

image

I may say that I am enjoying playing around with Microsoft Flow. It brings a lot of cool benefits, specially for those who doesn’t have code skills.

Marcos Freccia

About Marcos Freccia

MVP em SQL Server (Data Plataform) , especialista em SQL Server, e atualmente trabalhando com Microsoft Azure!

Posted on April 3, 2018, in Dicas, Microsoft Flow, VirtualPass and tagged , , , , , , . Bookmark the permalink. 1 Comment.

  1. I”m doing the same but with SharePoint List 🙂 much more easy.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s

%d bloggers like this: