Member-only story
How to Capture data from MS SQL Server (via Gateway) and forward the output in csv to the user itself via MS Power Automate (Flow)?
Purpose: Create a flow that pulls data from a table in MS SQL server and send the executed result in csv file to the user itself.
Steps:
1. We start with PowerApps because we are going to trigger this flow in our another PowerApps application.
2. Click + New Step to add Get rows which will run the select query to get the data from SQL server.
3. Click+ New Step to Create CSV table . First of all, put the value we pulled from SQL Server in the From field. Then in Column field, selecting will return all fields, while selecting one Custom option will allow you enter one field by one field.
4. If you would like to have users send the result to themselves, add Get my Profile (V2) before Send an Email (V2). In the email content editor, we now can put the output of Create CSV table in the attachment with the defined file name (& file type).
5. Save and run it.
Thank you and enjoy it!