Forum Discussion
Microsoft forms
I would like this email to be sent to a specific email address not the responder- populated with some answers from the form.
dawny1911 an example of a flow to send an email with a PDF attachment of the answers from a form is as follows:
In Power Automate create a new instant cloud flow then click skip on the next screen - I always like to start from a completely bland flow.
The trigger is a Forms when a new response is submitted and, as always, is followed immediately by the first action which is get response details. You might not need the following 2 actions to convert the date into UK format.
The next action is a OneDrive for Business create file. In this example I've selected for the filename one of the answers in the form which is a car license plate. You need to follow the filename with .html
For the content of the file add text and the questions from the get response details section of the dynamic content box. YOu can add html tags to add line breaks and other formatting.
Next add a a OneDrive convert file using path and select Path from the dynamic content box on the right. Your target type should be PDF.
Assuming you want to keep a copy of the PDF you next add another OneDrive create file action, selecting Filename and File Content from the convert file using path section of the dynamic content.
Finally add a send an email (v2), enter the email address it should go to in the To field. Add some text into the subject and body. Open the advanced options and for the attachment Name and Content fields select File name and File content from the convert file using path section of the dynamic content box.
..and the content of the PDF looks like this:
Rob
Los Gallardos
Microsoft Power Automate Community Super User
- dawny1911Jul 23, 2021Copper ContributorHi guys- thanks so much this is now working and is perfect!
Just one added question- can I add an image to the “create file” file content?
I would like the document to have appear it’s in headed paper but when I copy and paste no image shows.
Thanks
Dawn- RobElliottJul 23, 2021Silver Contributor
dawny1911 you can't copy & past for images due to the way they need to be encoded in the flow. See my post here for how to add an image.
Rob
Los Gallardos
Microsoft Power Automate Community Super User- dawny1911Jul 23, 2021Copper ContributorThat’s great! Again all sorted- do you know of a way to make the image smaller? It’s come through very large when printing on the pdf
- dawny1911Jul 22, 2021Copper ContributorThanks so much!!
Ive managed to complete the flow however it wont let me test as it says there are 'there are no runs for this flow'
Just a quick question - for the folder path? the example you gave starts with /
Is this what I use too?- RobElliottJul 22, 2021Silver Contributor
It won't let you test it from the Test menu until you have run it from a submitted form at least once. After that you can use the Test link.
The / puts the html and pdf files in your root OneDrive folder. I've found that works better than somewhere deep inside OneDrive, but you could try a different folder.