Skip to main content

New File in the Folder? Zapier Generates a PDF and a Word Doc. Six Steps, Fully Automated!

· 14 min read
SEO and Content Writer

Drop a data file (e.g. JSON) into a Dropbox folder and keep a Google Docs template (e.g. Google Docs Template.docx) in the same place. When a new file appears, Zapier can run automatically: a find file step loads the template, PDF4me – Generate Document runs twice—once with Data Text (inline JSON) → PDF, once with Data File (the file from the trigger) → Word—then Upload File saves both. Six steps. Trigger-based. No manual run.

The screenshots below show the same folder paths, template name, and PDF4me settings you use in Zapier; map each Dropbox or PDF4me field from the previous step’s output (trigger → find template → actions) the way you see in the images.

In a nutshell: New File in Folder (Dropbox, /Generate document Mail Merge, include file contents and sharing link) → Find a file (same folder, Google Docs Template.docx) → PDF4me – Generate Document (template from step 2, Template File Type GoogleDocs, Input Data Format Type text, Data Text JSON, output pdf) → Upload File (Google_Docs_Zap_Deployed.pdf) → PDF4me – Generate Document (template from step 2, Input Data Format Type file, Data File from trigger, output docx) → Upload File (Google_Docs_Zap_Deployed-2.docx). Result: one PDF and one Word file in /Generate document Mail Merge/Output per run.

Why-Based Q&A

Why run Generate Document twice? One pass uses inline JSON (Data Text) to produce a PDF quickly; the second uses the trigger file as Data File to produce an editable DOCX from the same template—two formats from one Zap.

Why Zapier? Dropbox’s New File in Folder trigger plus PDF4me’s Generate Document action connects to thousands of other apps. You can extend the Zap with filters, paths, or notifications without code.


What You'll Get

Trigger: A new file in the watched Dropbox folder (e.g. a JSON data file). Input: The triggering file as data and a fixed template (Google Docs Template.docx) in the same folder. Output: A PDF (from Data Text, e.g. Google_Docs_Zap_Deployed.pdf) and a Word document (from the triggered file, e.g. Google_Docs_Zap_Deployed-2.docx) in /Generate document Mail Merge/Output. Overwrite off so existing files are not replaced.


What You Need

  • ZapierCreate a Zapier account and start a new Zap.
  • PDF4me API keyGet your API key. Connect PDF4me when you add each Generate Document action. First time? See Connect PDF4me to Zapier.
  • Dropbox — Trigger New File in Folder, action to find a file by name, and Upload File (twice).
  • Google Docs template — e.g. Google Docs Template.docx, with merge fields (e.g. {{name}}, {{course}}, {{date}}, {{instructor}}). Stored in the watched folder.
  • JSON data — As the trigger file or as inline Data Text in the first Generate Document step. Keys must match placeholders (e.g. name, course, date, instructor). Example: {"name":"Alice Johnson","course":"Intro to Automation","date":"2026-03-10","instructor":"Mr. Smith"}.

The Zap at a Glance (6 Steps)

  1. Dropbox – New File in Folder — Watch /Generate document Mail Merge. Include file contents: Yes. Include sharing link: Yes (if offered).
  2. Dropbox – Find a file (or search by path/name) — Same folder. File name: Google Docs Template.docx. Include file contents: Yes.
  3. PDF4me – Generate Document — Template from step 2. Template File Type: GoogleDocs. Input Data Format Type: text. Data Text: your JSON. Input Data Type: json. Output Document Type: pdf. Keep Pdf Editable: false.
  4. Dropbox – Upload File — Folder: /Generate document Mail Merge/Output. File: output URL or file from step 3. Overwrite: No. File name: Google_Docs_Zap_Deployed. Extension: .pdf.
  5. PDF4me – Generate Document — Template from step 2. Input Data Format Type: file. Data File: from the trigger (step 1). Input Data Type: json. Output Document Type: docx.
  6. Dropbox – Upload File — Same output folder. File from step 5. Overwrite: No. File name: Google_Docs_Zap_Deployed-2. Extension: .docx.

Complete Zap overview

Six-step Zapier-style flow: Dropbox New File in Folder, find Google Docs template, PDF4me Generate Document, Dropbox upload PDF, second PDF4me Generate Document, Dropbox upload DOCX to Output folder

Six steps: trigger, find template, Generate Document (PDF), Upload, Generate Document (DOCX), Upload. Each stage succeeds when folders and field mappings match the reference screenshots.


Step 1: New File in Folder (Trigger)

Zap so far: Trigger only.

  1. Create a new Zap. Choose DropboxNew File in Folder.
  2. Connect your Dropbox account.
  3. Folder/Generate document Mail Merge.
  4. Include files in subfolders?No (or as needed).
  5. Include file contents?Yes so the file is available for the second Generate Document (Data File).
  6. Include sharing link?Yes if you need a link in later steps.
  7. Test the trigger. The file from this step is your Data File in step 5.

New File in Folder: Configuration

Dropbox New File in Folder: folder /Generate document Mail Merge, include file contents on, include sharing link on

Watch /Generate document Mail Merge with file contents enabled so the trigger supplies the data file for the DOCX pass.


Step 2: Find the Google Docs template (Dropbox)

Zap so far: Trigger → Find file.

  1. Add DropboxFind a file (or the search action that returns a file by name in a folder).
  2. Folder/Generate document Mail Merge.
  3. File nameGoogle Docs Template.docx.
  4. Include file contents?Yes.
  5. If multiple matches: choose first or the option that returns one file.
  6. Test. Map this step’s file (and name/extension if separate) into both Generate Document actions as Template File.

Find template: Configuration

Dropbox find file in /Generate document Mail Merge for Google Docs Template.docx with file contents included

Locate Google Docs Template.docx in the same folder as the trigger; both Generate Document steps use this template.


Step 3: Generate Document (PDF) — Data Text

Zap so far: Trigger → Find template → Generate Document (first run).

  1. Add PDF4meGenerate Document.
  2. Template File — From step 2 (file / binary from the find step).
  3. Template File Name — e.g. Google Docs Template and extension .docx from step 2 if the action asks for them separately.
  4. Template File TypeGoogleDocs.
  5. Input Data Format Typetext. Data Text — Your JSON (e.g. [{"name":"Alice Johnson","course":"Intro to Automation","date":"2026-03-10","instructor":"Mr. Smith"}]). Input Data Typejson.
  6. Output Document Typepdf. Keep Pdf Editablefalse.
  7. Test. Use the returned file URL (or file object) in step 4.

Generate Document: PDF output

PDF4me Generate Document: GoogleDocs template, Data Text JSON with name course date instructor, output PDF

First pass: template from find step, inline JSON as Data Text, output PDF for upload.


Step 4: Upload File (PDF)

Zap so far: Trigger → Find template → Generate PDF → Upload.

  1. Add DropboxUpload File.
  2. Folder/Generate document Mail Merge/Output.
  3. File — From step 3 (URL or file field Zapier exposes).
  4. OverwriteNo. File nameGoogle_Docs_Zap_Deployed. Extension.pdf.
  5. Include sharing link — optional Yes.
  6. Test.

Upload File: PDF

Dropbox upload to /Generate document Mail Merge/Output, file from Generate Document PDF step, name Google_Docs_Zap_Deployed.pdf

Save the PDF to the Output subfolder with a fixed base name and .pdf extension.


Step 5: Generate Document (DOCX) — Data File

Zap so far: Trigger → Find template → PDF path complete → second Generate Document.

  1. Add PDF4meGenerate Document.
  2. Template File — From step 2 again.
  3. Template File TypeGoogleDocs.
  4. Input Data Format Typefile. Data File — From step 1 (the file that triggered the Zap). Input Data Typejson.
  5. Output Document Typedocx.
  6. Test. Pass the output to step 6.

Generate Document: DOCX output

PDF4me Generate Document: GoogleDocs template from find step, Data File from New File in Folder trigger, output DOCX

Second pass: same template, JSON from the trigger file, Word output.


Step 6: Upload File (DOCX)

Zap so far: All six steps.

  1. Add DropboxUpload File.
  2. Folder/Generate document Mail Merge/Output.
  3. File — From step 5.
  4. OverwriteNo. File nameGoogle_Docs_Zap_Deployed-2. Extension.docx.
  5. Turn the Zap on. Each new file in the watched folder produces one PDF and one DOCX in Output.

Upload File: DOCX

Dropbox upload DOCX to Output folder, file from second Generate Document, name Google_Docs_Zap_Deployed-2.docx

Second upload uses the DOCX from step 5 and a distinct file name so it does not overwrite the PDF.


Use Cases

Dual format on trigger: When a new JSON file lands, get a fixed PDF and an editable DOCX without clicking Run in an automation builder.

Certificates and reports: One Google Docs template; each new data file drives a fresh pair of outputs in Output.

Downstream handoff: Add Gmail, Slack, or Drive steps after Upload to notify teams or archive by date.


Quick Reference

StepKey settingExample
New File in FolderFolder, file contents/Generate document Mail Merge; Yes
Find fileFolder, file nameSame folder; Google Docs Template.docx
Generate Document (PDF)Template, Data Text, outputStep 2; JSON; pdf
Upload FileFolder, file, name.../Output; step 3; Google_Docs_Zap_Deployed.pdf
Generate Document (DOCX)Template, Data FileStep 2; step 1 (trigger file); docx
Upload FileFolder, file, name.../Output; step 5; Google_Docs_Zap_Deployed-2.docx

For parameter-level detail, see Generate Document Single — Zapier. For a manual four-step flow on Make (download template + data, no folder trigger), see Google Docs template in Make (four steps).


Troubleshooting

Find step returns no file

Confirm Google Docs Template.docx exists in /Generate document Mail Merge and the name matches exactly (including spaces and extension).

Placeholders not replaced

JSON keys must match template placeholders. The trigger file used in step 5 must be valid JSON with those keys. Step 3 Data Text should be valid JSON (often an array of one object).

401, 402, or API errors

See PDF4me Troubleshooting for API key, credits, and connection issues.


What's Next

  1. Dry run — Add a test JSON file to /Generate document Mail Merge and confirm Google_Docs_Zap_Deployed.pdf and Google_Docs_Zap_Deployed-2.docx in Output.
  2. Single output — Remove one Generate Document pair (action + upload) if you only need PDF or only Word.
  3. Manual flowGoogle Docs in Make (4 steps) without a Dropbox trigger.
  4. Dynamic Data Text — Use Formatter, Code by Zapier, or a prior step to build JSON instead of pasting static text.