How to Integrate Microsoft Forms With a Laravel Website for Automated Survey & Data Collection?

vastdan 0 Reputation points
2025-12-09T09:38:55.2366667+00:00

Hello,

I’m working on a project that involves collecting survey responses through Microsoft Forms, and I want the submitted data to automatically sync with a Laravel-based website. As an example, one of the platforms I’m testing with this real estate website

My goal is to:

Embed a Microsoft Form inside a Laravel page

Automatically receive the form responses in the Laravel backend

Trigger actions like saving results into the database or notifying admins

Avoid manually exporting Excel files from Microsoft Forms

I’ve tried embedding the form using an iframe, which works visually, but Laravel doesn’t receive any data directly. I am not sure whether Microsoft Forms provides a webhook, API, or integration method that Laravel can consume.

What is the recommended way to integrate Microsoft Forms with a Laravel application so that response data can be collected and processed automatically? Does Microsoft Forms offer an API or webhook for real-time data transfer? Or do I need to use Microsoft Power Automate to push the form data into my Laravel system?

Any guidance would be highly appreciated.

Developer technologies | Windows Forms
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Q&A Assist
    2025-12-09T09:39:16.7166667+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    Microsoft Forms does not currently provide a direct API or webhook for real-time data transfer that would allow you to automatically receive form responses in your Laravel application. However, you can utilize Microsoft Power Automate to achieve your goal of syncing data from Microsoft Forms to your Laravel backend.

    Here’s a recommended approach:

    1. Create Your Microsoft Form: Set up your survey or form using Microsoft Forms as you normally would.
    2. Use Microsoft Power Automate: Set up a flow in Microsoft Power Automate that triggers when a new response is submitted to your Microsoft Form. You can configure this flow to send the response data to your Laravel application.
      • You can use the HTTP action in Power Automate to send a POST request to an endpoint in your Laravel application with the form data.
    3. Set Up Laravel Endpoint: In your Laravel application, create an endpoint that will receive the data from Power Automate. This endpoint should handle the incoming data and save it to your database or perform any other actions you require (like notifying admins).
    4. Embed the Form: You can continue to embed the Microsoft Form in your Laravel application using an iframe for visual purposes, but the data collection will primarily occur through Power Automate.

    This method allows you to automate the data collection process without the need for manual exports from Microsoft Forms.


    References:

    0 comments No comments

  2. Adiba Khan 1,440 Reputation points Microsoft External Staff
    2025-12-09T10:56:56.4166667+00:00

    Thanks for reaching out. Here’s the recommended approach when you want to integrate Microsoft Forms with a back end framework to automatically receive and process form responses. I will also highlight what is not supported today and practical workarounds.

    What Microsoft supports-how to get form responses automatically

    using power automate(the officially supported path)

    Microsoft phones can be connected to power automate. There is a built-in trigger “when a new response is submitted" this trigger lets you fire an automated “flow” as soon as someone submits a form.

    Within that flow you can get the response details (questions+ answers) via the “get response details” action. Then you can add more actions- e.g. HTTP POST to your back end, write to a database, notify admins, add to SharePoint/excel/teams etc.

    This makes power automate the recommended and officially supported way to integrate forms with external systems like a laravel backend.

    Therefore: embed your Microsoft forms (e.g. via iframe) In your laravel page if you want but treat power automate(or similar automation) as the “glue” that retrieves and pushes the data to your back end.

    Many third party automation tools(our internal enterprise automation platforms) do similar things under the hood: detect the submission-> call a webhook/custom endpoint-> push data where needed.

    In short: there is a supported event based pipeline: Form-> power automate flow->HTTP POST/other action-> laravel backend (or other storage/processing).

    What Microsoft does not support-limitations you should know

    despite repeated request, there is currently no official public API in Microsoft graph for fully managing Microsoft forms(e.g. Creating forms programmatically and retrieving responses for general automation) the graph API support for forms is not available.

    As a result you can't rely on “pure API” solution (i.e. You can't have your Laravel backend hit a REST API (like /forms/../responses) periodically to fetch new responses, because it doesn’t exist as a public contract).

    Some community or “undocumented API” hacks may exist (people have tried using internal endpoints via Azure app registrations or scripts)-like those are unsupported, brittle and risky for production.

    Also: if you plan multiple workflows on the same form (e.g. More than one separate flow triggered by the same form) there are practical limitations: there is anecdotal evidence that only a small number of “the web hook based” flows are reliably supported per form.

    Recommended architecture for Laravel + Microsoft forms integration

    Given the above, he added is the pattern I would recommend if you want to build something robust.

    User-> fills out MS Form(embedded in Laravel page or external link)
    		|
    MS form submission triggers a power automate flow (trigger: when a new response submitted)
    		|
    Flow uses "Get response details", then executes an HTTP POST (webhook) to your Laravel backend API endpoint
    		|
    Laravel backend receives JSON payload-> process data ( save to DB, send notification, etc.)
    

    Step by step

    1. create your form in Microsoft forms. Make sure link/sharing settings allow submissions.
    2. Go to power automate->  create a new “automate cloud flow”
      1. use trigger: when a new response is submitted
      2. use action: get response details(pointing to your form).
    3. Add an action: HTTP-HTTP POST request(or whichever action suits your backend)
      1. configure it to POST to your Laravel end point.
      2. Optionally include headers(e.g. Authorization token) for security.
      3. Configure the POST body to include the dynamic content from the form.
    4. In Laravel, create a route/end point(e.g. /api/forms/webhook) that accepts the JSON , validates the request(e.g. Signature/secret), then mapped the data into your database, trigger notifications, etc.
    5. (optional) If you want to embed the form inside your laravel website: include the forms embedded iframe. Submission goes via Microsoft forms-the flow triggers regardless

    this give you full automations: once the user submits the form, data flows into your laravel backend-no manual exporting, no CSV downloads, no excel copy/paste.

    Why we don't provide the direct REST API for Microsoft forms

    Microsoft forms was built primarily for “Lightweight surveys/quizzes for end users” with tight integration into Microsoft 365-including excel, SharePoint and power automate. Power automate flows are designed way to integrate form data with other systems.

    Offering a public REST API (with full CRUD for forms+ responses) would introduce more surface for permissions, security, versioning and maintenance-and historically, demand has been served by automation workflows rather than by APIs.

    We want to encourage use of power platform/power automate/power apps for extensibility. Rather than having ad-hoc scripts hitting undocumented endpoints(which is fragile).

    So today power automate remains the officially supported integration method.

    What you should do right now

    since you already have

    A Laravel based website

    you wish to embed a Microsoft form

    you want realtime  syncing so that whenever someone submits the form the data flows into your Lavarel backend

    Then the best path is to build a power automate flow+ Laravel Webhook as described above

    you can ignore attempts to “get a webhook directly from Microsoft forms” or “use the graph API for form responses/push” because there's do not exist.

    Please let us know if you require any further assistance we’re happy to help. If you found this information useful, kindly mark this as "Accept Answer".

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.