Forum Discussion
Automate pull SP list into a fillable .pdf form
LauraAnn1207 yes you can do this with a flow in Power Automate and it shouldn't take 2 days. I have an example below for a car service durvey that takes a Microsoft Forms form, creates an html file then converts that to PDF and sends an email with the attached PDF. (Do not use the Microsoft Forms template in Power Automate as it has an error that Microsoft have never fixed.)
1. a) Your trigger needs to be a Forms when a new response is submitted. b) This is followed immediately by get response details. c) you might not need to convert the date, but because my company uses UK date format I then get the date of the service and make sure that it's in UK format otherwise it will be wrong in the email.
2. Im the email we are adding a logo which is stored on SharePoint. Add a SharePoint get file content using path and then click the folder icon to drill down to select the image.
3. Next, add a OneDrive for Business create file action. You will need to use html tags in the file content field. You'll see in the image below that the logo image is added via a dataUri expression using the output from the previous action.
dataUri(body('Get_file_content_using_path'))
4. Next, add a OneDrive for Business convert file using path, select path from the create file section of the dynamic content box. Make sure the target type is set to PDF.
5. Next, add another OneDrive create file action and select file name and file content from the convert file section of the dynamic contnet box
6. Finally, add a send an email action and add your text. For the attachments select file name and file content from the convert file section of the dynamic content box.
7. And this is the result@ an email with attached PDF that you also have stored in your OneDrive.
Come back with any questions about this.
Rob
Los Gallardos
Microsoft Power Automate Community Super User
RobElliott In my OneDrive for Business I do not have a Get file content - html. This is what I have:
Ideas?
- RobElliottJun 05, 2022Silver Contributor
LauraAnn1207 I always rename the actions so I know what they do. You have get file content which is the one you need and which is what I said you need to add in #3 in my previous post. I'd just renamed it in my flow adding the - html (my flow is a live flow, not one just built for the purposes of an example)
Rob
Los Gallardos
Microsoft Power Automate Community Super User- LauraAnn1207Jun 05, 2022Copper ContributorThank you, I feel silly.