Jun 15 2020 09:39 AM
Looking for an API to access MS forms and pull the survey results on a weekly basis.
Jun 15 2020 09:51 AM
@ravipokala an API has been promised for Forms for a long time but has never arrived. The solution is therefore to use a flow in Power Automate to save each form response to a list in SharePoint. You can either see the last week's responses there or you could have another flow with a recurrence schedule trigger set to 1 week. That would get the items created in the list in the last week and do whatever you want to do with it.
Rob
Los Gallardos
Microsoft Power Automate Community Super User
Sep 25 2020 03:28 PM
@RobElliott , a fairly good workaround. Unfortunately, Flows are prone to failing now and then and if you miss a response I guess there's no way to re-fetch it in retrospect?
Sep 27 2020 12:12 AM
@Martin Dreyer the response will still be in the spreadsheet behind the form, so you've still got the response even if the flow fails for some reason. Over the last 3 years I've found Power Automate to be very reliable and a flows will very rarely fail once you have properly tested it. Power Automate is far more reliable than Forms which, as this form shows, is far more prone to errors and things not working the way they should.
Rob
Los Gallardos
Microsoft Power Automate Community Super User
Nov 07 2020 11:52 AM
@ravipokala I'm using VBA + SeleniumBasic-2.0.9.0
You must first open the URL “https://forms.office.com/Pages/DesignPage.aspx” to obtain a token
Then you can call "https://forms.office.com/formapi/DownloadExcelFile.ashx?formid=" + put your form ID Here + "&timezoneOffset=180&minResponseId=1&maxResponseId=1000"
This is working for me
Nov 30 2020 03:58 AM
Nov 30 2020 04:26 AM
Hi @ssahal ! You just need access the URL “https://forms.office.com/Pages/DesignPage.aspx”, then in same section you calls "https://forms.office.com/formapi/DownloadExcelFile.ashx?formid=" + [put your form ID Here] + "&timezoneOffset=180&minResponseId=1&maxResponseId=1000"
The token is automatically generated in the site section.
So, unfortunately, you need to use a browser to use the API. I tried everything to get files using code and nothing worked.
If you find out how to generate the token by code, please share it with us! Tks
Nov 30 2020 04:38 AM
Dec 07 2020 10:48 AM
Looking forward to seeing what you come up with. Power Automate is often just to picking up that a form was submitted. So I'm looking at alternatives. Thanks.
Dec 10 2020 05:14 PM
I need a Microsoft Forms API so that I can programmatically create new forms/polls and add them to every Microsoft Teams meeting/invite or click a button during Teams meeting to send form out to all attendees. Each meeting should be able to use a same/similar forms template but generate a new form so that CEO can poll attendees and graph responses. It seems this capability should be here already. Would be nice to be able to generate the form from a forms template on the fly and provide a Microsoft Forms bot to deliver the poll to the user in an interactive format.
Feb 24 2021 01:46 AM
@JTAPPS-1exactly what I'm trying to do - programmatically create a microsoft form. After that I can use Logic Apps for example, but the creation of the form is what I'm missing. Simply put I have some variables in powershell that I want to become a microsoft form.