web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / MS Forms automatic del...
Power Automate
Answered

MS Forms automatic deletion of responses

(0) ShareShare
ReportReport
Posted on by 4
Hi Forum,
 
I have a Forms survey that we use weekly for collecting data of how many employees are going to be eating inhouse the next week, so that out kitchen can make the correct portions.
This is a weekly thing, so i want to automate that the Forms data is being deleted at the end of the week, so people can click and paste a response again (i have currently set the survey to be answered once only)
 
Is this possible? I dont see that Forms itself supports this, so im thinking it can be solved with a power automate flow of some sort.
Categories:
I have the same question (0)
  • Meekou Profile Picture
    200 Moderator on at
    For your requirement, it is impossible, you could not operate Forms from power automate like delete response or create new forms.
     
    For a workaround, you could try below:
    • Add new filed like target week to indicate which week want to eat in the Form
    • Try When a new response is submitted Power Automate Trigger to save the User response to Excel file
    • Count the user numbers in Excel
    Regards,
    Meekou
  • Suggested answer
    Expiscornovus Profile Picture
    33,195 Most Valuable Professional on at
    Yes, this would be possible. You can use the Forms API for this.

    Below is an example for a personal form (which you created yourself).
     
    Use an Invoke an HTTP request (preauthorized action). Make sure you use the below for the connection settings
     
     
    2. In the action use the DELETE method and the below URI format
     
    https://forms.office.com/formapi/api/<tenantid>/users/<userid>/forms('<formid>')/responses
     
  • ML-23100640-0 Profile Picture
    4 on at
     
    I have tried to follow your steps but i reach an issue with the FormID part for some reason.
    I have setup the "initialize variable" to use "string" and then paste the FormID in.
     
    When i run the flow it keeps giving me the following error: Action 'Invoke_an_HTTP_request' failed: Invalid form id. Inner Message: Invalid form id
    (For security reasons, i have not posted the form id that is linked to the document)
     
     
    Can you see what im doing wrong?

  • Verified answer
    Expiscornovus Profile Picture
    33,195 Most Valuable Professional on at
    Make sure you replace the <tenant>, <userid> and <formid> by guid values. Also remove the '<' and '>' characters as well.
     
    So, the format of the link should look like the below example (I used some random ids).
    https://forms.office.com/formapi/api/5a5206d8-7b04-4c43-befb-aa25379245b1/users/fe8b03e6-e7dd-4749-b7cb-2715a18736e8/forms('HSEvendXekKorjpArMPzywSAKiQEb4BLkzEWYcY_6jRUQUpSVFJOVktEUE9RSTdaNVVJUjdPMDlTTy4u')/responses
     
    In my example I used a environment variable/parameter the tenant id, a dynamic content field from the Get My Profile (v2) for the user id and string variable called Form Id (Initialize variable action) for the form id.
     
    The tenant id can be retrieved via this website or in Entra Id for example:
     
    The form id can be found in the address bar when editing the form. The user id (if you created the form) can be retrieved via the get my profile (v2) action.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard