web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

Document Merge Action Corrupt File Error

(0) ShareShare
ReportReport
Posted on by 5,195 Super User 2025 Season 2

I am trying to build a Document Merge flow using the Adobe Merge PDFs action.

Goal: Retrieve table data from Excel file; Create Word templates from Excel data; Convert each Word template to PDF; Merge all PDF document into a single PDF document with one address per page.

Everything is working except the 'Create file' output is a single page pdf with only one address, when - based on the available test data, there should be two pages with one address on each page.


How do I make this dynamic, so that every line from the Excel is reflected as a separate page in the final pdf document?
 
What am I missing?

Phineas_0-1715487910805.png

 

I have the same question (0)
  • Phineas Profile Picture
    5,195 Super User 2025 Season 2 on at
    Re: Document Merge Action Corrupt File Error

    I moved the Merge PDF to outside the 'Apply to all' loop I get the following error -
         - "The input file appears to be corrupted and cannot be processed."

    This with the Merge PDFs IN the loop. No errors are created. When I take out the 'Terminate' and run the entire flow it completes successfully, but I only get one address on one page of the pdf file.

    Phineas_3-1715473699987.png

     

    Phineas_2-1715473598929.png

     


    This is when I move the Merge PDF outside the loop. If I try to use the array variable I get the error.

    Phineas_6-1715474413009.png

     

    Phineas_1-1715473298990.png


    And my Merge PDFs doesn't have access to the PDF content outside the loop.

    Phineas_5-1715474168917.png

     

  • AlexEncodian Profile Picture
    4,409 Moderator on at
    Re: Document Merge Action Corrupt File Error

    @Phineas 

     

    Usually you need the file extension in the filename. Try adding it in the append to variable bit.

     

    Not sure this makes a difference, but it looks like you've hard coded the filename in the convert Word to PDF action. Shouldnt this be the dynamic file name from the docx document you are feeding in?

     

  • Phineas Profile Picture
    5,195 Super User 2025 Season 2 on at
    Re: Document Merge Action Corrupt File Error

    Thank you for your reply.

    After days of frustration, I finally get it to this...

    The Word files are being created.

    The pdf files are being created.

    Now, I'm stuck on creating the merged pdf file.

    I need the flow to combine the pdf files in the folder so the user can use one file to print labels.

    Here is the folder showing the newly created pdf files that I want to merge.

    Phineas_1-1715563361895.png
    Here is the flow.

    Phineas_2-1715563454531.png

    Phineas_3-1715563661153.png

     



     



  • AlexEncodian Profile Picture
    4,409 Moderator on at
    Re: Document Merge Action Corrupt File Error

    @Phineas 

    You are still putting the merge action in the apply to each. Think about it logically - you are applying the merge action to each PDF file which doesn't make sense. You need to apply the merge action once to all PDFs in the array you created. 

  • Phineas Profile Picture
    5,195 Super User 2025 Season 2 on at
    Re: Document Merge Action Corrupt File Error

    Edited Reply -

    I finally got it. Thank you for your patience and assistance.
    Phineas_6-1715616498143.png

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 691 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 431 Moderator

#3
developerAJ Profile Picture

developerAJ 266

Last 30 days Overall leaderboard