New: Markdown to PDF built for AI agents, PDF to E-Invoice for Factur-X/ZUGFeRD, and PDF to PDF/A for archive-ready PDF/A-3b.

Merge PDFs in a Google Drive Folder with Make

5 MIN READ

Combine the PDFs currently in a Google Drive folder into one document using Make and PDF.co. This workflow searches the folder, downloads each PDF, and saves the merged result to a different folder.

It includes PDFs directly inside the source folder—not nested folders, shortcuts, or Google Docs files.

Before You Start

You’ll need:

  • A Make account.
  • A Google account with access to the source and destination folders.
  • A PDF.co account and API key.
  • Two small sample PDFs named 01-cover.pdf and 02-details.pdf.

Use unique, consistently numbered filenames when document order matters.

Search the Source Folder

Create a Make scenario and add Google Drive → Search for Files/Folders as its first module.

Connect your Google account and configure:

  • Choose a Drive: Select the drive containing your PDFs.
  • Search Scope: Limit the search to the selected folder.
  • Choose a Folder: Select the source folder.
  • Retrieve: Files.
  • Search: Enter custom search query.
  • Limit: Set a value above the expected number of PDFs, such as 100.

Enter this query:

mimeType = 'application/pdf' and trashed = false

Enable the option that adds the selected folder to the query. This ensures the search is restricted to that folder.

Run the search and compare its returned files with the source folder. If the result reaches the configured limit, it may be incomplete; increase the limit and retest before proceeding.

Use a search for this workflow because Watch Files in a Folder detects arrivals or modifications rather than returning a fresh list of every current PDF. See the Google Drive module documentation.

Download and Upload Each PDF

Add Google Drive → Download a File:

  • Connect the same Google account.
  • Map File ID from the search result.

Next, add PDF.co → Upload a File. Create a connection using your PDF.co API key and map:

  • Data: The downloaded file’s binary data.
  • File Name: The original filename.

This produces a temporary PDF.co URL for each PDF. Your Drive files can remain private; no public sharing link is required. Uploading files to PDF.co consumes credits.

See the PDF.co upload reference.

Collect the URLs in Document Order

Add an Array aggregator after the PDF.co upload module.

Configure:

  • Source Module: Google Drive’s Search for Files/Folders module.
  • Target structure type: Custom.
  • Aggregated fields: Include the original filename from the search and the URL returned by PDF.co Upload a File.
  • Group by: Leave blank.
  • Stop processing after an empty aggregation: Enable.

Run the scenario and inspect the array. It should contain one filename and one uploaded URL for every source PDF.

Before the merge module, add a filter requiring the array’s item count to be:

  • At least 2.
  • Less than the search limit—for example, less than 100 when the search limit is 100.

Use Make’s length() function on the aggregated array for these comparisons. This stops empty or potentially truncated searches from producing a partial merged document.

In the next step’s Input Link field, use:

join(map(sort(ARRAY; asc; NAME_KEY); URL_KEY); ",")

Replace:

  • ARRAY: The aggregator’s array token.
  • NAME_KEY: The raw key for the original filename.
  • URL_KEY: The raw key for the uploaded PDF.co URL.

Use the raw keys shown in the aggregator’s test output, not these placeholder labels.

The formula sorts the filename-and-URL pairs, extracts their URLs, and joins them with commas. Confirm that the cover PDF’s URL comes first. See Make’s array functions.

Merge the PDFs

Add PDF.co → Merge a PDF and select your PDF.co connection.

Configure:

  • Enable non-PDF files as input: No.
  • Import Options: Input Links.
  • Input Link: The formula from Step 3.
  • File Name: combined.pdf.
  • Execution Mode: Sync for the initial small-file test.
  • Export Type: Download a File.
  • Profiles: Leave blank.

For larger documents, select the appropriate execution mode and follow the merge module reference. Only pass the completed PDF to the saving step.

Save and Inspect the Merged PDF

Add Google Drive → Upload a File and select a destination folder different from the source folder.

Map:

  • File Name: The Merge a PDF module’s output name.
  • Data: The Merge a PDF module’s binary Data output.

Keeping the output separate prevents future searches from including a previously merged PDF.

Run the complete scenario and open the saved document. Check that:

  • The files appear in the intended order.
  • Every source PDF appears exactly once.
  • The final page count equals the combined page count of the source PDFs.

Add a third PDF to the source folder and rerun the scenario to confirm it is included.

Once testing succeeds, save the scenario, choose its schedule, and activate it. Each scheduled run creates a new merged snapshot of the folder’s matching PDFs.

In this tutorial, you learned how to merge PDF files in the Google Drive folder using PDF.co and Make.

Was this page helpful?

Related Tutorials

See Related Tutorials

Try it with your document.

Create an account, get an API key and test a request.

Get Started Free

© Copyright 2016-2026 Artifex Software, Inc d/b/a PDF.co — All Rights Reserved