cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
NewPAuser_UK
New Member

Forms allowing upload - attach actual file and email to staff

I have a Microsoft Form created and it asked the user various questions and allows them to upload a file at the end.

 

I have the flow working currently which emails a number of users the responses to the questions which is all working fine.

 

However, the email only contains a file attachment with what looks like the file location rather than the file itself.

 

Is it possible to attach the upload rather than just the location?

Screenshot 2020-10-21 at 12.56.34.png

Screenshot 2020-10-21 at 12.56.03.png

  

1 ACCEPTED SOLUTION

Accepted Solutions
Pstork1
Dual Super User III
Dual Super User III

Files uploaded to Forms are automatically saved to the Maker's OneDrive for Business.  To add them as an attachment you need to retrieve the file contents from there.  To do that take the response from the upload question and Parse the JSON.  Then use the ID to retrieve the file content from JSON.  You can then insert the name and file content as an attachment.  (Note: I've used the First() function to pull the first file from the collection, since it always returns a collection) See the screenshot below.

image.png

image.png



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

6 REPLIES 6
Pstork1
Dual Super User III
Dual Super User III

Files uploaded to Forms are automatically saved to the Maker's OneDrive for Business.  To add them as an attachment you need to retrieve the file contents from there.  To do that take the response from the upload question and Parse the JSON.  Then use the ID to retrieve the file content from JSON.  You can then insert the name and file content as an attachment.  (Note: I've used the First() function to pull the first file from the collection, since it always returns a collection) See the screenshot below.

image.png

image.png



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

Thanks Pstork1 - worked perfectly

eddoria
Frequent Visitor

Is there a similar flow action to do this from SharePoint?

Pstork1
Dual Super User III
Dual Super User III

Yes there is a get file content action for SharePoint as well.  But the point is that MS Forms automatically saves uploaded files to OneDrive.  There is no way to change that behavior and have the Form store the file in SharePoint.  But for files uploaded to SharePoint manually or through other processes you can definitely get the file content.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
eddoria
Frequent Visitor

Thank you for your response. Our form is part of an O365 group so when the form is filled in and submitted, any files uploaded and then saved automatically as part of the O365 group sharepoint site.

Pstork1
Dual Super User III
Dual Super User III

Then the process is essentially the same, just use the SharePoint actions instead of the OneDrive actions.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Top Solution Authors
Users online (1,291)