How to Merge Word DOCX Documents in Power Automate
Manually combining Word documents is more than just monotonous. Copying content from one file into another can be downright sloppy, leading to awkward spacings and misplaced objects which need to be eventually corrected by hand.
Programmatically merging DOCX documents is a far more reliable method than merging files manually — and thanks to Power Automate, it’s even easier to accomplish. Using the Cloudmersive Document Conversion connector in Power Automate, we can merge up to 10 Word documents in a single flow with full control over the order our files are merged in. We’ll end up with a single, neatly joined document that respects the objects and spacing used in the original files.
In this article, we’ll walk through a quick instant cloud flow that merges three Word DOCX documents using the Cloudmersive Document Conversion connector.
We’ll start by adding three Get file content actions into our flow. These actions retrieve our DOCX file bytes, which we’ll use in our subsequent file merge action.
Next, we’ll add a new action and search for Cloudmersive connectors. We’re looking for the Cloudmersive Document Conversion connector with the green logo.
We’ll next click “See more” to navigate to the actions list, and from there, we’ll search for an action called Merge Multiple Word DOCX Together.
When we open this action, we’ll need to create our Cloudmersive connection before we can begin filling our request parameters. To do that, we’ll need a free Cloudmersive API key (this allows 800 API calls per month), which we can get by creating a free account on the Cloudmersive website.
With that out of the way, we we’ll add each set of file bytes in our flow to each of this action’s input file parameters. Each file needs to be accompanied by a name in this request, but it doesn’t have to be the real file name (as shown in my example). To include our third file, we’ll click “Show all” to view the advanced parameters where additional file inputs are provided.
To wrap up our flow, we’ll add a Create file action that generates a new DOCX document from the Merge Multiple action’s OutputContent value.
We’ll now save and test our flow. When it finishes running, we’ll have a merged document in our target folder.
Just like that, we’re all done — no additional steps required!