cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Rajesh
Advocate II
Advocate II

Generate PDF from SharePoint list item

Hi

 

Is it possible to generate PDF from a SharePoint list item with all the form data when an item is saved into SharePoint?

 

I've looked into the option RenderListDataAsStream. but I guess this only converts word documents into stream

https://docs.microsoft.com/en-us/sharepoint/dev/sp-add-ins/working-with-lists-and-list-items-with-re...

 

Thanks

44 REPLIES 44

I have generated a pdf, meeting my requirements. But, I face a isuue in saving each user submission as a different pdf file. Now, the same file is getting refreshed.

 

 

How to create a flow that automatically saves with same filename or to prompt the user to enter the filename along with date?

 

Thanks

Vigneshraj C T

Bhavuk1987
Helper III
Helper III

Hi,

 

I tried the same solution but getting error. during create convert file.powerautomate screen1.PNG

can you please help me on that

Sorry for not being able to help you, I abandoned this project since the word connector is premium, I don't want to pay additional for something that should already be included.

@sajarac 

Hi,

Thanks for your reply. I tried to figure out a way to solve the afore-mentioned issue.

 

@Vignesh_2112 

Thank you very much!  I have this working now after many tries; many ways.  
I still have an issue, however.  My field from my Sharepoint list is an HTML text field.  So, my PDF is showing all code instead of a nice clean printout.  


To clarify, my content originates in a SharePoint list Enhanced Rich Text field.  It is then assigned the property of HTML text in my Power App and presents beautifully.  Not so much in the PDF.  


Any thoughts on the best approach to fix this?  

html content.png

 

 

Thank you.  

Try to convert as a Docx file, then proceed to save this as a PDF file.

 

Thanks

Vignesh

Thanks for your suggestion, but unless i don't understand, that is a premium connector to which I don't have access.  I did try...no luck. 

Hello,

 

I've been trying to accomplish this. I'm running into an error on the Create HTML table, BadRequest The 'from' property value in the 'table' action inputs is of type 'String'. The value must be of type 'Array'. 

 

I don't quite understand this. I'm not a programmer. Any ideas? Any assistance is greatly appreciated. 

 

Thank you.

 

did you resolve the issue? did yup try to change the Share point column to Plain text?

 

It seems like is an error in the JSON structure,

 

Watch this video and probably you will get a better idea, 

 

https://www.youtube.com/watch?v=HLdOO4JPZ2I

No, not yet, which column, it's a list, so I'm not sure which column to use. Can I use any column?

Watch the video first and understand how the data is connected between PA and Flow. You can Parse any value form PA to your document using the JSON structure. 

 

I am not a programmer too, And I had many fail attempts until I did it step by step. Not quite easy but doable. 

Thank you for the video, it helped. I was able to add the initialize variable for the array. Now, I just have to figure out where it placed the PDF file! 

itrole_44_0-1595602270982.png

 

Found the PDF file. However, it only has the word Title in it. So I will continue to play around with it to see if I can get the data into the file. Thank you for your help in pointing me in the right direction. 

Glad to help.

 

this site can help you building your tables.

 

https://www.w3schools.com/html/html_examples.asp

 

And if you only can see Title, probably is not correctly mapped.

 

Regards

 

@itrole_44  - can you share your initialize variable and create HTML table?  I'm initializing a variable of integer type from my the ID of my sharepoint list get item.  the HTML table doesn't like that as it wants the array type.  I'm not using PA so i'm not sure what i'm missing here. 

When I try to do this Convert File only allows me to choose files from my personal OneDrive for Business:

ecalzavara_0-1606367483754.png

and not from the Sharepoint location where the file is stored:

ecalzavara_1-1606367534890.png

How can I tell him to look for the files in Sharepoint rather than in my personal account of OneDrive (for Business)?

Thank you 

 

Did you ever get this to work? I'm getting horrendous output with all the data centered in one small column.

Could this also work with a sharepoint connector instead of one drive? 

I don't want to save the files to my own one drive as I am creating the flow for a department.

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!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

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