cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
tstanford1974
Frequent Visitor

Forms, Images, Attachments and email.

Hi,

I've created a MS form that uses all of the question options and users can upload files in the end. I'm looking for the user to send pictures of equipment for repair. I created a flow that allows the user to choose who gets a copy of the report by composing an email. I can't figure out how to send the images along with the data. 

Picture1.jpg

Picture2.jpg

I've tried to compose and "parse JSON" the attachments but I get errors. 

Picture3.jpg Any help with my issue would be appreciated. 

 

If I had the choice  - I would really like to be able to send the images along with the PDF that the responder has the option of printing. This would include the radial dials and other questions that are included in the form. 

 

Thanks for the assist. 

 

1 ACCEPTED SOLUTION

Accepted Solutions
tstanford1974
Frequent Visitor

I found a solution that worked for me online. https://www.dontpapanic.com/blog/?p=656

This worked. I haven't tested it with multiple files yet, but it worked!!

View solution in original post

10 REPLIES 10
CFernandes
Super User
Super User

Hello @tstanford1974 

 

The JSON you have formatted it incorrect.

 

It should be 

 

{

"Name":<your name variable>,

"ContentBytes":<FileContent>

}

 

As you are using File content directly retrieved from OneDrive I think no translation to Base64 is required because the file is retrieved as JSON, not binary.

 

CFernandes_0-1618255776555.png

 

You can find an awesome video tutorial at https://www.youtube.com/watch?v=kNC8q6NzBEc.

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

 

Thank  you for the response. I'm so close to getting it. I believe that I followed every step correctly, but when I ran the form again it errored - here is a screen of it. 

Picture1.jpg

Hey @tstanford1974 

 

Sorry I could not get back to you earlier.

 

Can you please compare your Flow with my screenshot - I am using the "id" in the Get file content action for Onedrive.

 

CFernandes_1-1618339461439.png

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

 

HI Again CFernandez,

 

I'm attaching all the screen shots I think you need for the comparison. I followed the video link you sent me step by step and still getting the error. Any help would be soooo appreciated. 

 

Picture1.png

Picture2.png

Picture3.png

Picture4.png

    Tom

Hey Mate, 

 

In your screenshot, I see you are creating a Path in the "Get File Content" action can you please pass the "id" instead and try? 

 

CFernandes_0-1618384578140.png

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

 

Hello again,

 

We are so close. I changed it to ID and the form was submitted successfully, I received an email with an attachment. woohoo!! BUT - The file can't be read. I went into my 1drive and the file is viewable. When I try to open it in from my email, or when I save it to my hard drive I get the following "02-My.Name.jpg It looks like we don't support this file format." I've tried different software to open the file and it errors. Is there something that the flow does to the file?

Try to decorate file content with Base64()

 

CFernandes_0-1618405211979.png

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

 

Same issue. But what I noticed is when I save the 

"base64(outputs('Get_file_content')?['body'])" and then run a test it gives me the same image error. Then when I go to look at the flow again the icon and name changes to "File Content". Is this normal? Picture1.pngPicture2.png

  

 

Just tried a Word Doc and this was the error for that. 

word response.png

 

tstanford1974
Frequent Visitor

I found a solution that worked for me online. https://www.dontpapanic.com/blog/?p=656

This worked. I haven't tested it with multiple files yet, but it worked!!

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (1,590)