Microsoft Flow In 10 Days - Day Five - Flow With SharePoint On-premise Gateways

Hi guys!

Today, I will be covering the day-five topics of my MS Flow series. If you have not checked out my previous posts about Microsoft Flow, I would recommend you have a look at it. Links to the previous posts are given below.

What I am going to cover

I am planning to write a series on MS Flow on which I will cover most of the areas in it. This will be a 10-day series:

A few points before moving on to the topic.

Microsoft Flow is an online service that helps in connecting various apps and services. And those include Microsoft products like SharePoint, Dynamics, Excel, Power BI etc... and non-Microsoft services like Twitter, Facebook, MailChimp, etc.

Today, we are going to connect the online Microsoft Flow and on-prem SharePoint environment. This is going to be done using Microsoft on-prem Data Gateway.

Based on Microsoft’s definition:

The On-premises data gateway acts as a bridge, providing quick and secure data transfer between on-premises data and the Power BI, Microsoft Flow, Logic Apps, and PowerApps services.

You can use a single gateway with different services at the same time. If you are using Power BI as well as PowerApps, a single gateway can be used for both. It is dependent on the account you sign in with.

Before that, you must install .net framework (preferably 4.6).

Now, we will see how to install the Data Gateway.

Installation

Go to https://powerapps.microsoft.com/en-us/downloads/

On the lower right corner, you will find the option to download.

SharePoint

On clicking it, it downloads the GatewayInstall.exe.

Double-click on the .exe file and run it. You will get the below screen.

SharePoint 

Click on Next.

SharePoint 

Check the checkbox – “I accept the terms of use and privacy statement” and click on “Install”.

It takes a minute or two to install.

SharePoint

After that, it asks for your online credentials. You have to provide your flow account credentials (which is your Online SharePoint Credentials also).

SharePoint

It prompts for the password. Once you successfully sign-in, we get to choose between the 2 options.

  • New Gateway on the computer.
  • Migrate a Gateway.
SharePoint

I am selecting the “Register a new gateway on this computer” option. Click on “Next”.

Here, fill the name for your GateWay and the Recovery Key. In case, if you want to migrate or recover an existing GateWay in future.

SharePoint

Finally, we get the success message for installing the Gateway.

SharePoint

Now, we can close this. Our next target is on creating the flow which is going to get data from the on-prem environment.

Open your flow environment. And clicking on the gear icon settings, we can find the “Connections”.

SharePoint

In this page, we will see all the connections that we have used in our flows. We are going to create a new connection.

SharePoint

Click on “New Connection” (Connect to on-prem). This navigates to a new page.

SharePoint

Type “SharePoint” on the search box to filter. Now, click on the “SharePoint” connection.

SharePoint

Select “Connect using on-prem data gateway”. It opens the fields that have to be filled to achieve this.

SharePoint

Here, in the username, I am passing my on-prem Username and my password in the Password field.

In the “Choose a gateway” option, we can select based on the online environments we have. As I have only one environment, it shows my FlowArticleGateway only.

Once all these are filled appropriately, then the “Create” button at the bottom right is enabled.

Now, I can see that in my list of connections.

SharePoint

Now, our final step is to create flow and use this connection in it.

Click on “Create from blank” in our flow environment. If you not sure about this step, check my previous articles. Links are given at the top of this article.

SharePoint

In our new flow, select SharePoint as the connector and use “When an item is created” as the trigger for this flow.

SharePoint

This is my on-prem environment list and its URL. (http://flowsharepoint/sites/CheckFLow)

SharePoint 

Now, in my flow, once I have entered the Site address, the list is shown in the drop-down.

SharePoint

My flow logic is – When a new item is created in the “FlowList”, I am going to replicate that item in the “ArticleList”.

                              Flow 

After saving this, I am going to test it.

For this, I have created an item in “FlowList” with the Title “Day 5 C sharp corner”.

SharePoint

I could see the same in the “ArticleList".

SharePoint

Cool, right!... It works perfectly. Use cases for this will be huge once you understand this.

Thanks for reading. Will see you on Day Six.


Similar Articles