πŸ“ Compress and archive old Google Drive PDFs to AWS S3 cold storage with Slack reports

⚑ 3 views Β· πŸ“ File Management

Description

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

πŸ“¦ 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.

πŸ”— Nodes Used

Slack, Google Drive, S3, Schedule Trigger

πŸ“₯ Import

Download workflow.json and import into n8n: Workflow menu β†’ Import from File

πŸ“– Importing guide Β· πŸ”‘ Credential setup