Flow Actions
Doc Generation Flow Actions

Merge Documents (Sync)

introduction the cloudfiles merge documents (sync) flow action lets you combine multiple files into a single document directly within salesforce flow builder this synchronous action delivers real time outputs that you can use immediately in subsequent automation steps this feature streamlines document workflows by consolidating pdfs from various libraries—whether in salesforce or external drives—into one file you can then store the merged document back in salesforce or in a custom library location below is how the action appears in flow builder the following sections provide detailed descriptions of the input and output parameters what this action does this flow action automates the combination of multiple pdf files into a single pdf document document merging helps in doucument merging by merging multiple pdf files into one consolidated document supporting merging documents from both salesforce files and external libraries retainaing the order of documents as provided in the input collection storage options save the merged document in salesforce by linking it to a specific record as a content document placing it in a designated file library store the file in external storage when using the package with the cloudfiles | document management & sharing platform https //appexchange salesforce com/appxlistingdetail?listingid=a0n4v00000gh9ufuar input parameters here is a list of all input parameters with a summary for details, check out the individual sections below resources list of resources to be combined file name name for the resulting merged file destination (optional) location to save the output document 1 resources the resources parameter accepts a collection of apex defined variables that point to documents from salesforce files or external storage 2 file name this parameter defines the name of the resulting merged file input a static name or dynamically assign one using flow resources example "merged file pdf" or "mergedfiles {!account name} pdf" this name will be visible in salesforce files or in the external storage location 3 destination the destination parameter determines where the merged document will be stored after cloudfiles completes the merge operation steps to configure destination create an apex defined variable of apex class cldfs resource to save in salesforce (default behavior) if no destination is provided, the merged file is saved to salesforce files to explicitly link the file to a record library set to salesforce id set to the record id of the salesforce record to store in external storage when using cloudfiles with the cloudfiles | document management & sharing platform assign the following fields library external library name driveid id of the connected drive id id of the folder or location within the drive pass the configured variable as the destination parameter in the merge documents (sync) action output parameters the cloudfiles merge documents (sync) action provides immediate outputs, accessible in the flow's all resources 1 document this output parameter specifies the metadata details of the generated file this parameter is populated only if the destination input parameter is configured if not, it will be null field details when saved in salesforce and linked to a record i d the generated file's content document id l ibrary salesforce other fields will be null when saved in external storage contains metadata details of the file stored in the external storage 2 content version id if no destination parameter is specified, the file is stored in the salesforce file library this parameter holds the content version id of the generated file in salesforce 3 document name the name of the generated document 4 download url a dynamic url to download the generated file