The use case is very simple. On a button click, I am trying to retrieve the Data from SharePoint 2016 On Premise from my Microsoft Flow.
The Prerequisites are as follows.
1. Install the Data GateWay on a machine which is not an AD and which is running always. If the data gateway machine is switched off, then the flow will fail.
2. Create a connection
3. Add a Data Source.
All the above items, were discussed in the earlier articles.
Now, let us open the flow site.
1. Go to https://flow.microsoft.com with valid credentials and go to “My Flows”
2. Click on “Create from blank”
3. Click on “Search hundreds of connectors and triggers”
4. Select the Button trigger as shown in the below figure.
5. Click on Add an action
6. I am adding an action “Get Items” under the SharePoint service.
7. The flow will looks like below.
8. Click on the three dots on the top right corner on the action.
9. Click on “add new connection”
10. Select the Check Box “Connect via on-premise data gateway”
11. Enter the credentials of the On Premise server details and click on “Create”
12. Enter the details of the SharePoint List.
13. Save the flow and Run it.
14. On the Output section of the Get Items action, we can see the data from the SharePoint OnPremise List.
15. The important thing is, my SharePoint On Prem server is not internet facing, it is not publicly accessible. But through the gateway, the Online apps can access my On Prem Data. This can be leveraged for various use cases, such as , the data can be maintained in house.