cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
obadiahjohnson
Advocate I
Advocate I

Power Automate File System Create File Creating Corrupted PDF's

I'm populating an MS Word Template, saving it to onedrive, converting it to pdf, then saving both the word file and pdf to our file server as well as emailing it to the requester. The pdf that's creating opens fine in the email attachment but when it opens on the server I get "... could not open [File name] becaust it is either not a supported file type or because the file has been damaged..." Deductive reasoning tells me that since the pdf that's emailed opens fine, it must be an issue with the Create File component. This used to work in previous testing but, recently, I discovered several corrupted pdfs. The Word docs save just fine. 

Screenshot 2021-05-07 120547.jpg

1 ACCEPTED SOLUTION

Accepted Solutions
obadiahjohnson
Advocate I
Advocate I

I've figured out my issue. 

I was passing the ID of the MS Word file to the "Get File Content 3" connection and passing that file content into the "Create File 8" connection. 

I removed "Get File Content 3" entirely and get the File Content from the Convert File connector instead and passed that into "Create File 8". 

For some reason, passing the file content of an MS Word file into a pdf in an email opens fine but, when saving it to the server, it's not as flexible. 

By getting the file content from Convert file instead, I passed pdf file content into my newly created pdf instead of Word file content.

View solution in original post

1 REPLY 1
obadiahjohnson
Advocate I
Advocate I

I've figured out my issue. 

I was passing the ID of the MS Word file to the "Get File Content 3" connection and passing that file content into the "Create File 8" connection. 

I removed "Get File Content 3" entirely and get the File Content from the Convert File connector instead and passed that into "Create File 8". 

For some reason, passing the file content of an MS Word file into a pdf in an email opens fine but, when saving it to the server, it's not as flexible. 

By getting the file content from Convert file instead, I passed pdf file content into my newly created pdf instead of Word file content.

View solution in original post

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.

Users online (2,117)