Skip to main content
Participant
December 22, 2021
Question

Adding merge pdf action in middle of Flow

  • December 22, 2021
  • 1 reply
  • 549 views

I have a current approval Power Automate Flow that works like a champ.  It is used to route invoices for approval and creates an Approval Summary page using fields in a document library.  The process goes as follows: a new invoice is loaded into the document library and certain fields are completed.  The invoice is selected and we manually trigger the Invoice Approval flow.  It is a fairly complicated flow and involves many steps and actions.  The end result is the (hopefully) fully approved invoice with the flow ending with the creation of the Approval Summary page and an email informing that said summary page is ready for merging.  Then someone has to go to the document library and manually merge the Approval Summary page and the originally loaded invoice so that there is 1 file with the summary page as page 1 and the invoice that was routed as the reminder of the file.  The original invoice could be multiple pages but we've never seen an invoice be more than 5 pages long.

 

What I'd like to do is insert the Adobe services merge pdf action into my current flow so that it will take the Approval Summary page created and merge it into the beginning of the original invoice file.  Thus saving us MANY clicks in order to finish the routing process.  My problem is, I don't think I am using the correct references to pull these files together as I'm getting the error:

"For application/pdf mime-type The input file appears to be corrupted and cannot be processed."

 

In the flow there are several steps which collect the "approval" contents and applies them to an html template.  An html temp file is created, converted to pdf, then deleted.  What remains in my document library is now 2 separate entries: original invoice file (Invoice-1234-ClientName.pdf) and the Approval Summary page (Invoice-1234-ClientName-Approval.pdf).

 

I tried just adding the Merge pdf action right after the Approval Summary page creation steps, but got the error.  I then added a Get file content action to try and pull the approval page right before the merge step, but I get the same error.  I need the merge file to replace the original invoice file as there are other flows that occur after this step that rely on that file name reference.  What would I need to show this community in order to assist me in troubleshooting this insertion?

 

Thanks for the assist.

This topic has been closed for replies.

1 reply

Ben Vanderberg
Community Manager
Community Manager
January 5, 2022

Can you provide a screenshot of your flow? You can also DM me if you are more comfortable with that. It is easier to diagnose visually to see how your flow works.

Participant
February 9, 2022

Issue resolved; needed to add an upload step to save the newly merged pdf back into the document library.  All works now as it should.