Jun 03 2022 06:57 PM - edited Jun 05 2022 08:48 PM
Hello everyone,
I have a ms form, which populates a SharePoint online list & attachment (file 1), filled out by my CSR team. My help team then takes this list data only, and puts it in an Adobe .pdf form for (file 2).
I need to automate, when approved is checked, to push the list data into the .pdf file.
A QR code is removed from file 1 and placed in file 2 and then emailed out.
Does anyone have a suggestion? Oh and I have 2 days to make this happen.
Thank you,
LA
Jun 03 2022 09:50 PM
Sounds like you need more time than two days lol. There might be holes in your requirements.
The list data can be exported to excel and there is out-of-the-box functionality that you can use to generate an excel file (use the export to excel function) from the list views. For example, if you had an approved site column in your list - create a list view to only include approved items with all of the site columns you want to include. You can export the list view that only includes approved items then you can use the MS Office functionality, Print to PDF. This is a realistic solution that is within your timeline.
For example, I have a travel request list with a custom view that will only display row items if the request has been approved:
I can use the Export function to export the list view data, which would give me something like this:
Then I can choose to Print the Excel File to a PDF from MS Excel:
I hope that gives you some ideas.
Good luck!
Jun 04 2022 01:46 AM
@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
Jun 05 2022 10:48 AM - edited Jun 05 2022 12:59 PM
@RobElliott Thank you for replying to my project!
The workflow goes this way:
CSR gets inquiry
CSR enters into MS Forms, it is saved to SP list w/attachment (file 1)
Help team reviews and approves if applicable
Data from list needs to be placed in template(.pdf) from data in the list (file 2)
Help then takes QR code from 1st file, places it in 2nd file and email back to customer.
Jun 05 2022 11:44 AM
Jun 05 2022 11:46 AM
@RobElliott In my OneDrive for Business I do not have a Get file content - html. This is what I have:
Ideas?
Jun 05 2022 12:37 PM - edited Jun 05 2022 12:39 PM
@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
Jun 05 2022 01:23 PM