cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
obadiahjohnson
Frequent Visitor

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
Frequent Visitor

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
Frequent Visitor

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
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

Users online (44,097)