🗜️ Automate image compression in Google Drive with Tinify API and email reports
Ready for 3.0What this workflow does
This workflow has 14 nodes and runs on a schedule (every day at 08:00). Along the way it connects Google Drive and Gmail. It also calls api.tinify.com over HTTP.
How it runs
Trigger: On a schedule (every day at 08:00).
- Generate Processing Id (Edit Fields (Set)): sets 1 field: processing_id
- Get all files (Google Drive): work with file folder
- Collect Logs (Data table): get
- Loop Over Original Files (Loop Over Items (Split in Batches)): loops over the items in batches
- Loop Over Processed Files (Loop Over Items (Split in Batches)): loops over the items in batches
- Generate Report (Code): runs custom JavaScript code
- Load Raw Image (Google Drive): download
- Move Files to the Folder /Original (Google Drive): move
- Send Report (Gmail): uses Gmail
- Tiny URL API Call (HTTP Request): calls api.tinify.com (POST)
…plus 3 more steps. See the full node list below.
Services it uses
HTTP calls to: api.tinify.com
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (8)
- Google Drive
n8n-nodes-base.googleDrive - Schedule Trigger
n8n-nodes-base.scheduleTrigger - HTTP Request
n8n-nodes-base.httpRequest - Loop Over Items (Split in Batches)
n8n-nodes-base.splitInBatches - Edit Fields (Set)
n8n-nodes-base.set - Data table
n8n-nodes-base.dataTable - Code
n8n-nodes-base.code - Gmail
n8n-nodes-base.gmail
From the author
Tags: Image Compression, Tinify API, TinyPNG, SEO Optimisation, E-commerce, Marketing Context Hi! I’m Samir Saci, Supply Chain Engineer, Data Scientist based in Paris, and founder of LogiGreen. I built this workflow for an agency specialising in e-commerce to…