After creating a Microsoft Form with an upload file option, you can setup a flow to send the results of the form in an email with the uploaded file as an attachment using Power Automate.


    To get to Power Automate, log on to mail.atu.edu, and click on the square button on the top left hand side of the screen.


    Click on All apps.



    Click on Power Automate



  1. Click on My flows
  2. Click on  + New
  3. Click on Automated--from blank



  1. Name the flow
  2. Select "When a new response is submitted Microsoft Forms". A search for Microsoft Forms may be required.
  3. Click on Create



  1. Select the Microsoft Form (in this example, it's Upload Form)
  2. Click on + New step



  1. Search for Microsoft Forms
  2. Select "Get response details Microsoft Forms"



  1. In the Form Id field, select the form again.
  2. Click in the Response id input box
  3. Select Response Id from the popup box
  4. Click on + New step



  1. Search for Parse JSON
  2. Select "Parse JSON Data Operation"



  1. Click in the Content input box
  2. Select the upload file field from the response details list
  3. Click in the Schema field and copy and paste the following JSON code:
{
 "type": "array",
 "items": {
 "type": "object",
 "properties": {
 "name": {
 "type": "string"
            },
 "link": {
 "type": "string"
            },
 "id": {
 "type": "string"
            },
 "type": {},
 "size": {
 "type": "integer"
            },
 "referenceId": {
 "type": "string"
            },
 "driveId": {
 "type": "string"
            },
 "status": {
 "type": "integer"
            },
 "uploadSessionUrl": {}
        },
 "required": [
 "name",
 "link",
 "id",
 "type",
 "size",
 "referenceId",
 "driveId",
 "status",
 "uploadSessionUrl"
        ]
    }
}

    4. Click on + New step



  1. Search for Get file content
  2. Select "Get file content using path OneDrive for Business"



  1. Type in the file path to the OneDrive folder in the form /Apps/Microsoft Forms/Form Name/Question/ where Form Name is the name of the Microsoft Form and a slash is at the end of Question.  In this example, since the form is named "Upload Form", the path is /Apps/Microsoft Forms/Upload Form/Question/
  2. Click on Expression in the popup window.
  3. In the function box, type (or copy and paste) first(body('Parse_JSON'))?['name']
  4. Click OK
  5. Click on + New step



  1. Search for Send Email
  2. Select "Send an email (V2) Outlook 365 Outlook"



  1. In the To field type the email address to send the email to and select the email account from the search list.
  2. Type the subject of the email in the Subject field.
  3. Format the body with the label and select the appropriate field (4) in the pop up box under Get response details.
  4. (Response detail fields)
  5. When finished, click on Show advanced options



  1. Click in the Attachments Name field.
  2. In the popup box, click on Expression
  3. In the function box, type (or copy and paste) first(body('Parse_JSON'))?['name']
  4. In the popup box, click on OK



  1. Click in the Attachment Content field
  2. In the popup box, select File content
  3. Click on Save



The flow should look like the following:



The "Send an email (V2)" should look like the following: