Skip to main content

Optimize Document - Compression for Zapier

PDF4me Optimize Document is a Zapier action that shrinks Word file size without opening the document in Word. Choose Low, Medium, or High compression to remove unused macros, comments, hidden content, and personal metadata, and to compress embedded images. Returns a smaller Word file for the next Zap step.

What this action does

Takes a Word document from a previous Zap step and applies one of three optimization levels. Low keeps nearly everything and trims lightly; Medium removes comments, macros, hidden content, and personal info while compressing images; High additionally strips tracked revisions and unused styles for the smallest possible file. Useful for staying under email attachment limits, reducing cloud storage use, or preparing files for distribution.

Related Blog Posts
No blog post yet for this feature — coming soon.
In the meantime, browse the PDF4me blog for tutorials and workflows across every platform.
Visit the blog

Authenticating Your API Request

To access the PDF4me Web API through Zapier, every request must include proper authentication credentials. Authentication ensures secure communication and validates your identity as an authorized user, enabling seamless integration between your Zapier workflows and PDF4me's Word document optimization services.

Important Facts You Should Not Miss

Only File is required
File Name, Optimization Level, and Culture Name are all optional. Optimization Level defaults to Medium if left unset.
Higher compression removes more than bytes
Medium and High remove comments, macros, hidden content, and personal metadata. High also strips tracked revisions and unused styles, so back up originals if you need that history.
Reduction percentages are targets, not guarantees
Actual size reduction depends on the document's content. A file with few images and little formatting bloat will shrink less than a heavily formatted, image-rich file at the same level.
Map File from previous steps

Use the + button next to File and File Name to map from earlier Zap steps (e.g., Google Drive, Dropbox, or a trigger). The Word file must provide full content, not "Exists but not shown" references.

File: (Exists but not shown)

If you see "File: (Exists but not shown)" in the File field and get errors, select the option that provides the full file content instead. See Zapier & Power Automate Tips for details.

PDF4me Optimize Document Word Zapier - File, File Name, Optimization Level, Culture Name
Configure the Optimize Document action: map File (required) and File Name, set Optimization Level (Low, Medium, High), Culture Name optional.

What Are the Key Features of Optimize Document?

  • Three Optimization Levels: Low (~0-10%), Medium (~50-80%), High (~80-90%) target size reduction
  • Image Compression: Configurable image quality reduction per level
  • Content Cleanup: Removes unused macros, comments, and hidden content at Medium and above
  • Formatting Normalization: Cleans up redundant formatting and unused styles at High
  • Personal Information Removal: Removes author, manager, and company metadata at Medium and above
  • Font Optimization: Normalizes fonts and removes unnecessary font properties

Parameters

Complete list of parameters for the Optimize Document action. Parameter names match the Zapier configuration UI shown in the screenshot above.

Quick setup checklist
  1. Map File (Word) from your trigger or a previous step
  2. Optionally map File Name from a previous step
  3. Set Optimization Level: Low, Medium (default), or High
  4. Optionally set Culture Name for locale-specific processing
ParameterRequiredWhat it doesExample
FileRequiredWord document to compress. Map from a previous step. Must provide full file content.[4. File from Step 4]
File NameConditionalWord filename with .docx or .doc extension for the output file.abc.docx
Optimization LevelConditionalLow, Medium, or High. Controls how aggressively content is removed and images are compressed. Defaults to Medium.Medium
Culture NameConditionalCulture code affecting locale-specific document processing, such as date and number formatting.en-US

How Do the Optimization Levels Compare?

FeatureLowMediumHigh
Target file size reduction~0-10%~50-80%~80-90%
Image quality target~80%~60%~50%
FormattingPreservedNormalizedAggressive cleanup
CommentsPreservedRemovedRemoved
Tracked revisionsPreservedPreservedRemoved
Personal info (author/manager)PreservedRemovedRemoved
MacrosPreservedRemovedRemoved
Unused stylesPreservedPreservedRemoved
Hidden contentPreservedRemovedRemoved

What Does Optimize Document Return?

The PDF4me Optimize Document action returns the compressed Word file for use in subsequent Zap steps. The output format is common across all PDF4me Word file-returning actions in Zapier.

Key output fields (map these to your next step)

File Url

API endpoint to download the optimized Word file. Map this to the next step's file input.

api.pdf4me.com/Zapier/GetDocument?d=...
Alternate File Url

Alternative download URL with filename in path.

api.pdf4me.com/Zapier/GetAltDocument/.../document.docx
FieldTypeWhat it contains
Job IdStringUnique identifier for the Zapier job execution.
File UrlURLAPI endpoint to download the optimized Word file.
Alternate File UrlURLAlternate download URL with the filename in the path.
File NameStringBase filename without extension.
Full File NameStringComplete filename with extension.
File ExtensionStringFile extension of the returned file, .docx.

Example JSON output (URLs show format only, not working links):

{
"Job Id": "...",
"File Url": "api.pdf4me.com/Zapier/GetDocument?d=...",
"Alternate File Url": "api.pdf4me.com/Zapier/GetAltDocument/.../document.docx",
"File Name": "document",
"Full File Name": "document.docx",
"File Extension": ".docx"
}

Typical Setups

Workflow ExamplesCommon Zapier workflow patterns using Optimize Document.
Shrinking attachments before email
  1. A trigger fires when a document is marked ready for email distribution.
  2. PDF4me Optimize Document runs with Optimization Level set to Medium to balance size reduction with formatting.
  3. A Gmail or Outlook step sends the smaller file as an attachment.
Reducing cloud storage footprint
  1. A scheduled Zap lists Word files above a size threshold in a Dropbox or Drive folder.
  2. PDF4me Optimize Document runs with Optimization Level set to High for maximum reduction.
  3. The compressed file replaces or supplements the original in cloud storage.
Preparing files for long-term archive
  1. A trigger fires on quarterly project or matter closure.
  2. PDF4me Optimize Document runs with Optimization Level set to Low to preserve quality and revision history while trimming file size, or Medium if personal metadata should also be removed.
  3. An upload step archives the optimized file to cold storage.

Practical Tips

File: (Exists but not shown) causes errors
Select the mapping option that provides the file's full binary content instead of a reference. See Zapier & Power Automate Tips for the exact steps.
High removes tracked revisions
If you need to preserve comment and revision history, use Low or Medium instead of High, or archive the original file before compressing.
Optimization Level defaults to Medium
If you leave Optimization Level unset, the action applies Medium compression rather than skipping optimization.
Reduction percentages vary by document
A file with few embedded images and little redundant formatting will not shrink as much as an image-heavy file at the same optimization level.
Culture Name only affects locale formatting
It does not change how aggressively the document is compressed, leave it blank unless you specifically need locale-aware processing.

Cheat Sheet

FieldValue
ActionOptimize Document
File[Mapped from previous step]
File Nameabc.docx
Optimization LevelMedium (default)
Culture Nameen-US (optional)
ConnectionPDF4me API key

Common Questions

How do I compress a Word document automatically in Zapier?+
Add the PDF4me Optimize Document action to a Zap, map the Word file from a previous step using the full-content option, and set Optimization Level to Low, Medium, or High. The action returns a smaller Word file with no manual compression in Word required.
What is the difference between Low, Medium, and High optimization?+
Low targets roughly 0-10% size reduction and preserves comments and revisions. Medium targets roughly 50-80% and removes comments, macros, hidden content, and personal info while preserving revisions. High targets roughly 80-90% and also removes revisions and unused styles. See Microsoft's community discussion on compressing Word documents for the manual alternative this action automates.
Does compressing a Word document remove comments or tracked changes?+
It depends on the level. Low preserves comments and revisions. Medium removes comments but preserves revisions. High removes both comments and revisions along with unused styles and hidden content.
Will compression reduce the image quality inside the document?+
Yes, images are recompressed as part of the size reduction. Low targets roughly 80% image quality, Medium roughly 60%, and High roughly 50%, so higher compression levels apply more aggressive image quality reduction.
Is Culture Name required to compress a Word document?+
No. Only File is required. Culture Name is optional and only affects locale-specific document processing, such as date and number formatting. See Zapier's guidance on setting up actions for general help configuring optional fields in a Zap.

Same Task on Other Platforms

Industry Use Cases & Applications

  • Email Marketing Materials: Optimize document attachments for marketing campaigns (Medium level)
  • Client Deliverables: Reduce file sizes for faster client downloads (Low level for quality)
  • Proposal Distribution: Compress RFP responses for email submission (Medium level)
  • Report Distribution: Optimize monthly reports for wider email distribution (Medium level)
  • Template Library Cleanup: Reduce template storage requirements (High level for storage)

Get Help