top of page
9d657493-a904-48e4-b46b-e08acb544ddf.png

POSTS

Effortlessly Auto-Send Microsoft Forms Responses to SQL Database with Power Automate

Updated: Jul 29

In this post, I will guide you through a practical Power Automate flow that captures responses from Microsoft Forms and inserts them directly into a SQL database using a stored procedure. Whether you're gathering survey data, feedback, or operational inputs, this approach automates the transfer of structured form entries into your database without any manual intervention.

We’ll use:

  • Microsoft Forms to collect responses

  • Power Automate (Flow) to automate the process

  • SQL Server (Premium connector) to insert the data using a stored procedure

Let’s break this down step by step.

Step 1: Create the Form in OneDrive/SharePoint

A digital menu highlights "Forms survey" in green within a dropdown list of Microsoft Office options, including Word and Excel.

Start by going into OneDrive or SharePoint > Click New > Forms survey. This will open a new browser tab where you can begin designing your form.

In this case, I’ve created a simple form with a couple of questions. You can add multiple fields depending on the data you want to collect. These fields will later become the parameters for your SQL stored procedure.


Step 2: Note the Form ID and Structure

A Microsoft Forms interface with two numbered questions. Background has purple and blue gradient with diagonal lines. Text fields are empty.
Get Form ID from the URL, after equal (=) sign, right to the end. That is actually a trick!

After your form is created, the Form ID can be found in the URL — this is essential for setting up your Power Automate trigger later. In my case this was an ID: Z1J6su5edEWeUMGCLGLC6AQuRy4eXRxFnfJxJO8OZhFUM1lMTTdDMjg1SExSODBEMUtLSzlQRFA4SyQlQCN0PWcu

In this example, you see two short-answer fields. Every response submitted will be processed by your Power Automate flow.


Step 3: Build the Power Automate Flow Logic


Alt text: Screenshot of a Microsoft Power Automate flow with three steps in vertical sequence. The flow starts with "When a new response is submitted" (Microsoft Forms trigger), followed by "Get response details" (Microsoft Forms action), and ends with "Execute stored procedure (V2)" (SQL Server action). This workflow automates the process of handling form submissions by retrieving response details and executing a SQL stored procedure with the collected data.
Power Automate flow logic, starting with Forms response.

Here’s a look at the full Power Automate flow structure:

  1. Trigger: When a new response is submitted

  2. Action 1: Get response details

  3. Action 2: Execute stored procedure (SQL Server)

Each of these steps plays a critical role in fetching and pushing form data into SQL Server.


Step 4: Configure the Trigger

Flowchart with steps: "When a new response is submitted," "Get response details," and "Execute stored procedure (V2)." White background.
In the Forms action connector, add the encrypted Form ID from the URL in Parameters field that I mention above.

In the “When a new response is submitted” trigger (part of the Microsoft Forms connector), paste the Form ID you copied from the form URL.

This ensures your flow listens to the correct form. The connection shown is to your Office 365 identity — make sure you’re using an account that has access to the Form.


Step 5: Extract Form Response Details

Flowchart showing a form submission process. Steps include "Get response details" and "Execute stored procedure (V2)". White background.
Add Form ID again and also Response ID from the action above (dynamic content from the first step).

Next, add the “Get response details” action. Again, use the same Form ID, and for Response ID, choose Response Id from dynamic content — this links back to the actual form submission.

This step fetches the answers submitted for all the form questions.


Step 6: Choose the SQL Server Action

Search bar with "sql" typed, showing SQL Server actions like Execute SQL query and Update row. Interface has blue and red icons.
Search for SQL connector as an action. Be aware this is Premium connector, meaning you need proper Pro License to use them (usually they got "diamonds" symbol to distinguish between them).

Search for SQL in the “Add an action” window. You’ll find several options under SQL Server (Premium Connector).

In our use case, we’ll go with “Execute stored procedure (V2)”, which is best suited for structured inserts into SQL Server databases.

🏷️ Note: SQL Server is a premium connector, so a paid Power Automate plan is required.

Step 7: Map the Form Data to SQL Parameters

Execute stored procedure interface with parameters listed. Workflow on the right shows steps: response submission, detail retrieval, execution.
SQL connectors requires Server name, database and if you use stored procedures (later more on that).

Now configure the action:

  • Choose your Server name, Database name, and your predefined Stored procedure.

  • Once selected, the flow reveals all stored procedure parameters.

  • Map each of these to the corresponding dynamic values pulled from the form response.

This securely passes the data from Forms to SQL Server, row by row.


Final Notes


  • ✔ Always test your flow with dummy responses.

  • 🧪 Consider adding error handling (e.g. scope with "run after").

  • 🔐 Ensure the SQL Server is reachable via your on-premises gateway if needed.

  • 📄 Use logs or logging tables to track successful inserts for auditing.

  • for custom connectors you need Premium (Power Automate) license

Comments

Rated 0 out of 5 stars.
No ratings yet

Add a rating
Official Logo of the Webpage

Transform your data with our data analytics services! From Excel to Power BI with Power Query in the background, drive your business forward!

  • Linkedin
  • Xing
  • RSS
  • 4844455

Contact Us

Address:
83022 Rosenheim, Bavaria

Join Us!

Stay updated with tips & tutorials!

© 2025 By Excelized. | SITE DESIGNED BY RS-TECH

bottom of page