Understanding Merging Files (without Encodian)

Options

I've seen mention that Encodian, or any other third-party app, isn't needed to combine multiple files from an array into one file. When looking at the simple-merge-webview-list-flow-package.ZIP, I can even see that no 3rd party app is being used to get the final singular file, but I'm having trouble understanding how it accomplishes that.

From the looks of it, the flow somehow uses the exact same action “populate a word template” along with the exact same word template that was used to generate each letter/envelope.

I could be missing something, because I always have to create new flows from these packages instead of straight importing them, but I don't see how you can re-use the same template to combine all of the individual files.

Does anyone understand how this works so I can set it up for my own flow? Further, what about merging documents that didn't have a template used to create the individual files?

Thanks for any help.

Comments

  • Glen Hutson
    Glen Hutson Blackbaud Employee
    Tenth Anniversary Kudos 3 Name Dropper Participant

    Aidan Lambert:

    I've seen mention that Encodian, or any other third-party app, isn't needed to combine multiple files from an array into one file. When looking at the simple-merge-webview-list-flow-package.ZIP, I can even see that no 3rd party app is being used to get the final singular file, but I'm having trouble understanding how it accomplishes that.

    From the looks of it, the flow somehow uses the exact same action “populate a word template” along with the exact same word template that was used to generate each letter/envelope.

    I could be missing something, because I always have to create new flows from these packages instead of straight importing them, but I don't see how you can re-use the same template to combine all of the individual files.

    Does anyone understand how this works so I can set it up for my own flow? Further, what about merging documents that didn't have a template used to create the individual files?

    Thanks for any help.

    Hi Aidan,

    There's two key things going on here:

    • A Word Document that has the entire content in a Repeating Section Content Control
    • A LetterArray variable

    In the Apply to each, it is reading the details about specific gifts, uses the Word Template to fill in the specifics for each individual gift, and then taking the specifics of that gift and appending it to the LetterArray.

    After those loops are done, you have an Array with all the specifics of each of the gifts. The Populate a Microsoft Word Template is then called again but passes in that array. That array in combination with the Repeating Section Content Control aspect of the Word Template is what creates the single document. It repeats the content in the Repeating Section Content Control over and over filling in the individual Content Controls with each item in the array.

    It's because we're using a simple approach in which the only differences between each of the letters is the gift specifics that we can do this without a 3rd party connector literally merging individual documents.

  • Glen Hutson:

    Hi Aidan,

    There's two key things going on here:

    • A Word Document that has the entire content in a Repeating Section Content Control
    • A LetterArray variable

    In the Apply to each, it is reading the details about specific gifts, uses the Word Template to fill in the specifics for each individual gift, and then taking the specifics of that gift and appending it to the LetterArray.

    After those loops are done, you have an Array with all the specifics of each of the gifts. The Populate a Microsoft Word Template is then called again but passes in that array. That array in combination with the Repeating Section Content Control aspect of the Word Template is what creates the single document. It repeats the content in the Repeating Section Content Control over and over filling in the individual Content Controls with each item in the array.

    It's because we're using a simple approach in which the only differences between each of the letters is the gift specifics that we can do this without a 3rd party connector literally merging individual documents.

    Ah I see, thank you very much for explaining! That is a pretty neat way to solve the problem.

  • Does this work with images/media, headers/footers as well? I tried using the repeating letter when first starting out but ran into issues and ended up using Encodian's free version to merge them all instead.

  • Glen Hutson
    Glen Hutson Blackbaud Employee
    Tenth Anniversary Kudos 3 Name Dropper Participant

    Evan Webb:

    Does this work with images/media, headers/footers as well? I tried using the repeating letter when first starting out but ran into issues and ended up using Encodian's free version to merge them all instead.

    People in the community have reported varying success with images (and I believe I may have seen one example with header/footer). This method was developed as an alternative to not have to use a 3rd party, especially due to the timing of the changes and for many orgs this being the first time diving into Power Automate. However, many may find it easier to work with Encodian rather than working through this method, and it may be the only way to achieve what one may be looking for.

Categories