What This Workflow Does
This automation solves the growing problem of expensive cloud storage costs by intelligently managing your inactive PDF documents. Many businesses accumulate thousands of old project files, contracts, and reports in Google Drive that are rarely accessed but continue to incur storage fees.
The workflow automatically identifies PDFs that haven't been accessed for a specified period (typically 6-12 months), compresses them to reduce file size, moves them to AWS S3's cost-effective cold storage tiers, and sends a detailed Slack notification to your team about the archival action. This maintains document accessibility while significantly reducing your monthly cloud storage expenses.
How It Works
1. Identify inactive PDFs in Google Drive
The workflow scans your specified Google Drive folders for PDF files that haven't been accessed within your defined timeframe (configurable from 3-24 months). It uses Google Drive's API to check last access dates and file types.
2. Compress identified files
Each qualifying PDF is processed through a compression algorithm that reduces file size by 30-70% without compromising text readability. The original file remains intact until verification completes.
3. Transfer to AWS S3 cold storage
Compressed files are securely transferred to your AWS S3 bucket configured with lifecycle rules for automatic transition to Glacier or other cold storage tiers. The workflow maintains all original metadata and folder structures.
4. Generate Slack reports
A detailed Slack message is sent to your designated channel listing all archived files, original vs. compressed sizes, total storage savings, and links to access the files in AWS if needed.
5. Cleanup original files (optional)
After successful transfer and verification, the workflow can optionally delete the original uncompressed files from Google Drive (configurable based on your retention policies).
Pro tip: Set different age thresholds for different folders. Legal documents might need longer retention than temporary project files.
Who This Is For
This automation is ideal for businesses with:
- Growing Google Drive storage costs from accumulated PDFs
- Compliance requirements to retain old documents
- Teams that need visibility into document archival actions
- AWS infrastructure already in place for cost-effective storage
- Monthly cloud storage bills exceeding $500/month
What You'll Need
- n8n instance (self-hosted or cloud)
- Google Workspace account with API access
- AWS account with S3 bucket configured
- Slack workspace with webhook permissions
- Basic understanding of AWS S3 storage classes
Quick Setup Guide
- Download the JSON template file
- Import into your n8n instance
- Configure Google Drive connection with folder paths
- Set up AWS S3 credentials and bucket details
- Add your Slack webhook URL
- Adjust file age threshold (default 180 days)
- Test with a small folder first
- Schedule to run monthly or quarterly
Key Benefits
Reduce Google Drive costs by 40-70% by moving inactive files to AWS S3 cold storage tiers that cost pennies per GB compared to active storage.
Save 5-10 hours monthly that would otherwise be spent manually identifying, compressing, and moving old files while maintaining access logs.
Improve compliance visibility with automated Slack reports that document every archival action, creating an audit trail for retention policies.
Maintain quick access to archived files when needed through AWS S3's retrieval options, without cluttering your active Google Drive.
Automatically compress files before archival to maximize storage savings while preserving document integrity and searchability.