Skip to main content

One post tagged with "watch folder"

View All Tags

Auto-Merge Every PDF Dropped into a Dropbox Folder in Power Automate: A 6-Step Dynamic Workflow

· 23 min read
SEO and Content Writer

The painful part of "merge these PDFs" tickets is not the merging, it is knowing what is in the folder at run time. Names change, files come and go, somebody adds a fifth document at 4:55 pm. This walkthrough builds the exact pattern in Power Automate with PDF4me Merge multiple PDF files, Dropbox, and a single Apply to each loop. Six flow actions. Zero hardcoded filenames. Every PDF currently in the watched folder gets stitched together the moment a new file lands, and the output name carries the file count so each run is uniquely identifiable.

The flow at a glance
1. When a file is created
Dropbox trigger on /blog data/merge files dropbox. Fires the moment any file lands.
2. List files in folder
Dropbox action on the same folder. Returns every current file as an array of metadata objects.
3. Initialize variable
Name Files, Type Array. Buffer for the binary content of every file.
4. Apply to each
Loop body(List_files_in_folder). Inside, Get file content by Id, then Append to array with base64ToBinary on $content.
5. Merge multiple PDFs
PDF4me action. Body/docContent the Files array, Output File Name Output.pdf. One consolidated PDF out.
6. Create file
Dropbox /blog data/merge blog template/output. File Name expression concat(merge-, length(List_files_in_folder), .pdf).