cancel
Showing results for 
Search instead for 
Did you mean: 
Pstork1

Approve a File Uploaded via Microsoft Forms

Step #1 – Upload the file using Microsoft Forms

The first step is to create a Microsoft Form that can be used to upload a file.  There are two possibilities here.  First, if you are creating the Form personally then the file will be stored in your OneDrive. But if you are creating the Form as part of an Office 365 Group then the file will be stored in the SharePoint site that was created when the group was created. Either way the file is placed in a subdirectory called ‘/Apps/Microsoft Forms/{Name of the Form}/Question/’.  This makes it easy to find the file if you are uploading files from multiple forms. The file will also be uniquely named by adding the name of the submitter to the end of the original file name.

For our purposes I created a simple MS Form that had two questions.  The first lets the responder upload a file.  MS Forms has a specific question type that adds an attachment control to the form. Setting optional properties on the attachment control can also be used to limit the file extensions that can be uploaded, the maximum file size, and the maximum number of files. The second question is a text question used for the user to submit the email address of the person who is going to approve the file. Here’s a screenshot of the form I created.

image.png

Step #2 – Create an Approval flow

Now that we’ve used MS Forms to submit the file lets create a Power Automate flow to approve the file. Here’s a screenshot of the completed flow.  We’ll come back and examine each action.

image.png

The flow is triggered when a new response is submitted to MS Forms. Unfortunately, the trigger doesn’t contain dynamic content that includes all the responses.  So we have to follow the trigger with a Get Response Details action to get the responder’s email address, the approver’s email address and the name of the file that was uploaded.  Here are the details for the MS Forms trigger and actions we are using. For the trigger the only parameter you need is to pick the form that you used to upload the file. Then get the details by picking the form and supplying the ID of the response returned by the trigger.

image.png

Once you’ve gotten the details from the form you need to isolate the Id of the file that was uploaded so you can share it with the Approver. The easiest way to do that is to Parse the JSON response from the Form response details. The trick here is to run the flow once before adding the Parse JSON action so you can get a sample output to use to generate the schema. Here’s a screenshot of the Parse JSON action.

image.png

Now that we have access to the Id for the file we can use that to create a sharing link to use in our approval so the approver can access the file.  However, even though we limited the Form upload to only one file it will return the file information as a collection.  So we’ll use a First() function to get the one record out of the collection to use with the Create a Share Link action. The formula to feed into the File parameter is ‘first(body('Parse_JSON'))?['id']’. We set the action to provide a Link that is available to an anonymous user and provides only View permission.

image.png

Now that we have the link we can create the Approval.  We fill out the Approval action as shown in the screenshot below with the email of the Approver from the Form response and the sharing link we generated above.

image.png

Once the Approver responds to the Approval we can complete the flow by sending an email back to the person who filled out the original Form with whatever details we want to supply.   The Send an Email V2 action uses the Responder’s email from the original Form Details action at the start of the flow.

image.png

That completes this walkthrough.  This should provide enough detail to get you started if you want to approve a file uploaded via an MS Form.

Comments
About the Author
  • Experienced Consultant with a demonstrated history of working in the information technology and services industry. Skilled in Office 365, Azure, SharePoint Online, PowerShell, Nintex, K2, SharePoint Designer workflow automation, PowerApps, Microsoft Flow, PowerShell, Active Directory, Operating Systems, Networking, and JavaScript. Strong consulting professional with a Bachelor of Engineering (B.E.) focused in Information Technology from Mumbai University.
  • I am a Microsoft Business Applications MVP and a Senior Manager at EY. I am a technology enthusiast and problem solver. I work/speak/blog/Vlog on Microsoft technology, including Office 365, Power Apps, Power Automate, SharePoint, and Teams Etc. I am helping global clients on Power Platform adoption and empowering them with Power Platform possibilities, capabilities, and easiness. I am a leader of the Houston Power Platform User Group and Power Automate community superuser. I love traveling , exploring new places, and meeting people from different cultures.
  • Read more about me and my achievements at: https://ganeshsanapblogs.wordpress.com/about MCT | SharePoint, Microsoft 365 and Power Platform Consultant | Contributor on SharePoint StackExchange, MSFT Techcommunity
  • Encodian Owner / Founder - Ex Microsoft Consulting Services - Architect / Developer - 20 years in SharePoint - PowerPlatform Fan
  • Founder of SKILLFUL SARDINE, a company focused on productivity and the Power Platform. You can find me on LinkedIn: https://linkedin.com/in/manueltgomes and twitter http://twitter.com/manueltgomes. I also write at https://www.manueltgomes.com, so if you want some Power Automate, SharePoint or Power Apps content I'm your guy 🙂
  • I am the Owner/Principal Architect at Don't Pa..Panic Consulting. I've been working in the information technology industry for over 30 years, and have played key roles in several enterprise SharePoint architectural design review, Intranet deployment, application development, and migration projects. I've been a Microsoft Most Valuable Professional (MVP) 15 consecutive years and am also a Microsoft Certified SharePoint Masters (MCSM) since 2013.
  • Big fan of Power Platform technologies and implemented many solutions.
  • Passionate #Programmer #SharePoint #SPFx #M365 #Power Platform| Microsoft MVP | SharePoint StackOverflow, Github, PnP contributor
  • Web site – https://kamdaryash.wordpress.com Youtube channel - https://www.youtube.com/channel/UCM149rFkLNgerSvgDVeYTZQ/