Automate pull SP list into a fillable .pdf form

Occasional Contributor

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.

 

#pdf

Does anyone have a suggestion? Oh and I have 2 days to make this happen.

 

Thank you,

LA

8 Replies

@LauraAnn1207 

 

Sounds like you need more time than two days lol. There might be holes in your requirements.

 

  • When you have a form - did you mean Microsoft Forms?
  • Why use a PDF to push data of an approved item? This adds a lot of complexity and a whole bunch of other questions.

 

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:

 

Tristan999_1-1654317912267.png

 

I can use the Export function to export the list view data, which would give me something like this:

 

Tristan999_2-1654318072544.png

 

Then I can choose to Print the Excel File to a PDF from MS Excel:

 

Tristan999_3-1654318148398.png

 

I hope that gives you some ideas. 

 

Good luck!

@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.

1-Flow.png

 

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.

 

2a-Flow.png

 

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'))

 

 

2-Flow.png

 

 

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.

3-Flow.png

 

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

 

4-Flow.png

 

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.

5-Flow.png

 

7. And this is the result@ an email with attached PDF that you also have stored  in your OneDrive.

6-Email.png

 

7-PDF.png

 

Come back with any questions about this.

 

Rob
Los Gallardos
Microsoft Power Automate Community Super User

@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.

Thank you for your reply.

Yes it is a MS Form.

.pdf is a template we already have created.

Any ideas are appreciated

@RobElliott In my OneDrive for Business I do not have a Get file content - html. This is what I have: 

 

LauraAnn1207_0-1654454787864.png

 

 

Ideas?

@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

Thank you, I feel silly.
So in the Create file, what if I have a template that we fill in information?