Skip to main content
Solved

URGENT Merging Specific PDFs

  • February 20, 2025
  • 5 replies
  • 91 views

Forum|alt.badge.img+2

Hi All,

 

I have a dictionary variable with a pdf name as key and some other pdf names as a string values separated by coma ( , ), now i want to merge those documents ( Key and the all the files name in value ) in a single pdf file with the name of the key. But I can’t find any activity to do so.

 

This is the Dictionary variable structure 


 

Best answer by Aaron.Gleason

Check this out from our Bot Store:

https://botstore.automationanywhere.com/bot/merge-multiple-pdf-documents-into-single-document

There are others, too, so check them out.

This topic has been closed for replies.

5 replies

Aaron.Gleason
Automation Anywhere Team
Forum|alt.badge.img+14
  • Automation Anywhere Team
  • Answer
  • February 21, 2025

Check this out from our Bot Store:

https://botstore.automationanywhere.com/bot/merge-multiple-pdf-documents-into-single-document

There are others, too, so check them out.


Forum|alt.badge.img+7
  • Navigator | Tier 3
  • February 21, 2025

You can use the String: Split action to extract all the file names in the dictionary value and save them as a list.

Then, you can use make a copy of the first item in the newly generated list, which is located at index 0, and give the copy the name of the dictionary key.
Note: Don't forget to add '.pdf’ to the dictionary key.

Next, iterate over each one of the values in the list from index 1 to index List:size -1.

  • The loop must start from index 1 to skip the first item in the list because that's the file that will be copied and used as the base.
  • The size of the list minus 1 is equal to the last index of the list.

Finally, use the PDF: Merge documents action as shown in the following image:

You can find the source code of the bot shown in the image in the next link: 
A360-Merge_PDFs_from_dictionary.json - GitHub Gist
You can use this extension to import the source code to a task bot: 
Bot Assistant - Chrome Web Store (google.com)


Forum|alt.badge.img+5
  • Navigator | Tier 3
  • February 25, 2025

I suggest using this bot store package. 

https://botstore.automationanywhere.com/bot/pdf-utilities-package then use this action: 

  • Merge all PDF files in a directory
     

     


Shreya.Kumar
Pathfinder Community Team
Forum|alt.badge.img+14
  • Pathfinder Community Team
  • March 3, 2025

@AryanGuru did any of the above suggestions help? Please mark as best answer if they did! 


Shreya.Kumar
Pathfinder Community Team
Forum|alt.badge.img+14
  • Pathfinder Community Team
  • July 23, 2025

Closing this topic for replies now.

To everyone reading this in the future: please feel free to start a new thread if these solutions don’t help.