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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Power Automate Desktop...
Power Automate
Answered

Power Automate Desktop - PDF Merge Functionality - Need logic to merge PDF

(0) ShareShare
ReportReport
Posted on by 19

Hello Team, 

 

I need your help with a logic to merge muliple PDF files based on a condition and below is the scenario. 

LabheshPower_0-1617976550114.png

 

 

I have a list of PDF files each 1 page report, a Total of 200 PDF files in a single Folder.

 

There are few PDF which report content is extended to next file or next file, which means that all PDF are not for single report. There are scenarios where merging 2 or 3 PDF together will make a single client file.  And that is where I need help with logic to apply.

 

These are PDF files

LabheshPower_1-1617976924559.png

 

In Power Automate Desktop, I need a logic by which I should be able to Merge

1) File 5 and 6 PDF

2) File 9, 10 and 11 PDF

 

Currently I am using Files in Folder loop, and able to navigate to each file 1 by 1, but I am unable to find a logic by where In that file folder loop, I can merge current and next file as well. 

 

Power automate provide a feature to merge 2 files, but how to implement that logic is  a key? 

LabheshPower_2-1617977114820.png

 

 Kindly help, if you can.

 

I have the same question (0)
  • Verified answer
    fraenK Profile Picture
    2,125 on at

    So the condition is "no footer" in the filename?

    Then you just check in the loop if the next filename(s) in the list contain the text until there isn't.

    Use the resulting list as an input for merge pdf.

    Set you list counter variable to the next not used PDF file in the main list. 

  • Verified answer
    LabheshPower Profile Picture
    19 on at

     let me give more info. 

    LabheshPower_0-1618272940182.png

     

    LabheshPower_1-1618272987214.png

     

  • vedkumar Profile Picture
    6 on at

    Hi ,

     

    while using fix file name in merge pdf files, path like below:

    %['D:\\Bank Mail\\ENBD\\15 Sep 2021\\ENBDLA21007137\\ENBDLA2100713781631621881127960COVER_LETTER_NEGO.pdf', 'D:\\Bank Mail\\ENBD\\15 Sep 2021\\ENBDLA21007137\\ENBDLA2100713781631621881229842COVER_LETTER_NEGO_COPY.pdf']%

     

    "\\" is there in path 

     

    But when i am using variable , it has only "\".  if i store the path in  variable , it does not work.

     

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hello @vedkumar,

     

    I have tried below sample flow, and it runs without any problems.

    Could you show us the details of your issue?

     

    shindomo_0-1632096414195.png

    SET SourceFiles TO ['C:\\Users\\User01\\Documents\\PDF Document 01.pdf', 'C:\\Users\\User01\\Documents\\PDF Document 02.pdf']
    SET MergedFile TO $'''C:\\Users\\User01\\Documents\\PDF Document Output.pdf'''
    Pdf.MergeFiles PDFFiles: SourceFiles MergedPDFPath: MergedFile IfFileExists: Pdf.IfFileExists.Overwrite PasswordDelimiter: $''',''' MergedPDF=> MergedPDF

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 267 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 196

#3
Haque Profile Picture

Haque 182

Last 30 days Overall leaderboard