Skip to main content

Compress and archive old Google Drive PDFs to AWS S3 cold storage with Slack reports

Workflow preview

Workflow preview
100%
Compress and archive old Google Drive PDFs to AWS S3 cold storage with Slack reports preview
Open on n8n.io

1. Workflow Overview

Consolidate and compress project archives for cost optimized cloud storage Description Optimize your cloud storage costs by using this automation to intelligently compress and migrate aging proj...

Best for

  • File Management automation workflows
  • intermediate n8n builders looking for reusable templates

Tools used

n8n-nodes-base.scheduletrigger, n8n-nodes-base.googledrive, n8n-nodes-base.code, n8n-nodes-base.if, n8n-nodes-htmlcsstopdf.htmlcsstopdf, n8n-nodes-base.s3, n8n-nodes-base.slack, n8n-nodes-base.stickynote

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Jitesh Dugar.

Original n8n.io source

1.1 Workflow description

Title
Compress and archive old Google Drive PDFs to AWS S3 cold storage with Slack reports
Workflow name
Compress and archive old Google Drive PDFs to AWS S3 cold storage with Slack reports

Consolidate and compress project archives for cost-optimized cloud storage

🎯 Description

Optimize your cloud storage costs by using this automation to intelligently compress and migrate aging project documentation. This workflow allows you to achieve a professional data lifecycle policy by identifying "stale" files in active storage, applying high-ratio PDF compression, and migrating them to cold storage while maintaining a searchable audit trail.

A critical technical feature of this template is the Luxon-based lifecycle logic. By utilizing {{ $now.minus({ months: 6 }).toISODate() }}, the workflow dynamically filters for files that haven't been modified in over half a year. It then generates a unique archive path using {{ $now.toFormat('yyyy/MM_MMM') }}, ensuring your cold storage bucket remains perfectly indexed by year and month without any manual folder creation or renaming.

✨ How to achieve automated storage optimization

You can achieve an enterprise-grade archiving system by using the available tools to:

  1. Monitor and age-gate β€” Use the Google Drive node to list project files and a Code node to compare file metadata against a 6-month "hot storage" threshold.
  2. Compress and verify β€” Pass identified files through the HTML to PDF compression engine to reduce file size by up to 80% while maintaining document readability.
  3. Migrate to cold storage β€” Stream the compressed binary directly to AWS S3 (or a dedicated archive folder), using dynamic naming conventions for organized retrieval.
  4. Log and notify β€” Automatically alert the IT team via Slack upon batch completion, providing a report on the specific files migrated and the storage path used.

πŸ’‘ Key features

  • Intelligent cost reduction β€” Automatically targets large, old files for compression, significantly reducing long-term "Cold Storage" billing.
  • Dynamic indexing β€” Uses Luxon to build a chronological folder structure in the cloud, making multi-year archives easy to navigate.
  • Integrity assurance β€” The workflow ensures files meet specific age and type criteria before moving them, preventing accidental archival of active documents.

πŸ“¦ What you will need

  1. Google Drive β€” Your "Hot" storage where active project files are kept.
  2. HTML to PDF Node β€” Used here for the PDF compression and optimization engine.
  3. AWS S3 β€” Your destination "Cold" storage for long-term archiving.
  4. Slack β€” For automated reporting on storage optimization status.

Ready to optimize your cloud storage? Import this template, connect your credentials, and start saving on long-term data costs today.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Trigger: Weekly Archive Scan

Type / Role
n8n-nodes-base.scheduleTrigger - scheduleTrigger
Config choices
Version 1.1

Block 2 - List Active Project Files

Type / Role
n8n-nodes-base.googleDrive - googleDrive
Config choices
Version 3

Block 3 - Calculate File Age (Luxon Logic)

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 4 - IF: Meets Archive Criteria?

Type / Role
n8n-nodes-base.if - if
Config choices
Version 1

Block 5 - Download Hot Storage Binary

Type / Role
n8n-nodes-base.googleDrive - googleDrive
Config choices
Version 3

Block 6 - Compress PDF for Archival

Type / Role
n8n-nodes-htmlcsstopdf.htmlcsstopdf - htmlcsstopdf
Config choices
Version 1

Block 7 - Upload to Cold Storage (S3)

Type / Role
n8n-nodes-base.s3 - s3
Config choices
Version 1

Block 8 - Log Savings to Slack

Type / Role
n8n-nodes-base.slack - slack
Config choices
Version 2.1

Block 9 - Main Documentation

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 10 - Processing Overview

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

3. Summary Table

Workflow Compress and archive old Google Drive PDFs to AWS S3 cold storage with Slack reports
Complexity intermediate
Nodes 10
Categories File Management
Author Jitesh Dugar
Published 12 Jan 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/12655/12655.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Compress and archive old Google Drive PDFs to AWS S3 cold storage with Slack reports do?

Consolidate and compress project archives for cost optimized cloud storage Description Optimize your cloud storage costs by using this automation to intelligently compress and migrate aging proj...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your File Management use case.