๐Ÿ“ ๐Ÿ—œ๏ธ Automate image compression in Google Drive with Tinify API and email reports

โšก 128 views ยท ๐Ÿ“ File Management

Description

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 automate the daily compression of their images stored in a Google Drive folder.

Workflow Overview

This is particularly useful when managing large libraries of product photos, website assets or marketing visuals that need to stay lightweight for SEO, website performance or storage optimisation.

> Test this workflow with the free tier of the API!

๐Ÿ“ฌ For business inquiries, you can find me on LinkedIn

Who is this template for?

This template is designed for:

What does this workflow do?

This workflow acts as an automated image compressor and reporting system using Tinify, Google Drive, and Gmail.

  1. Runs every day at 08:00 using a Schedule Trigger
  2. Fetches all images from the Google Drive Input folder
  3. Downloads each file and sends it to the Tinify API for compression
  4. Downloads the optimised image and saves it to the Compressed folder
  5. Moves the original file to the Original Images archive
  6. Logs: fileName, originalSize, compressedSize, imageId, outputUrl and processingId into a Data Table
  7. After processing, it retrieves all logs for the current batch
  8. Generates a clean HTML report summarising the compression results
  9. Sends the report via Gmail, including total space saved

Here is an example from my personal folder:

Folder Image

Here is the report generated for these images:

Email Screenshot

P.S.: You can customise the report to match your company branding or visual identity.

๐ŸŽฅ Tutorial

A complete tutorial (with explanations of every node) is available on YouTube:

Tutorial + Demo

Next Steps

Before running the workflow, follow the sticky notes and configure the following:

Submitted: 18 November 2025
Template designed with n8n version 1.116.2

๐Ÿ”— Nodes Used

HTTP Request, Google Drive, Gmail, Schedule Trigger, Data table

๐Ÿ“ฅ Import

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

๐Ÿ“– Importing guide ยท ๐Ÿ”‘ Credential setup