BULDRR AI Vikash KumarSchedule a Call
Updated Workflow #1763

Automate Image Optimization in Google Drive with n8n

Save hours managing large image files by automating image optimization in your Google Drive folders with n8n and TinyPNG. This workflow automatically detects new images, optimizes them, and reuploads the compressed versions to a designated folder, reducing file size and improving workflow efficiency.

Automate Image Optimization in Google Drive with n8n
CONNECTS
Google Drive Trigger, Google Drive, HTTP Request, Sticky Note
Learn it with AI
✦ SEE IT BEFORE YOU DOWNLOAD

The canvas, and the 4 nodes behind it.

Preview of the Automate Image Optimization in Google Drive with n8n workflow canvas in n8n
✦ NODE BY NODE

What runs inside this workflow

Automate Image Optimization in Google Drive with n8n is built from these n8n nodes: Google Drive Trigger, Google Drive, HTTP Request, Sticky Note.

    ✦ LEARN HOW TO BUILD THIS WORKFLOW WITH AI
    Send this workflow to your assistant and have it taught to you.

    Each button opens the assistant with the prompt already written — asking it to explain this exact workflow step by step, as if teaching a complete beginner.

    Using our workflows often?
    Mark BULDRR AI as a preferred source and our templates surface higher in your own Google results.
    Add as a preferred source

    What This Automation Does

    This workflow watches a Google Drive folder for new images.


    When a new image is added, it downloads the file and sends it to TinyPNG for compression.


    After TinyPNG makes the image smaller, the workflow downloads the compressed image and uploads it to another Google Drive folder.


    This process runs automatically every minute to keep images optimized without manual steps.



    Tools and Services Used


    Inputs, Processing, and Outputs

    Inputs

    Processing Steps

    • Trigger detects new image file in Google Drive.

    • Download the image file’s binary data.

    • Send image binary data to TinyPNG API with tiny image compression request.

    • Receive a link from TinyPNG to download the optimized image.

    • Download optimized image from TinyPNG.

    • Upload the optimized image to a separate Google Drive folder with "-optimised" added to the file name.

    Outputs


    Beginner Step-by-Step: How to Use This Workflow in n8n

    Import Workflow

    1. Click the "Download" button on this page to save the workflow file.

    2. Open the n8n editor where you want to run the automation.

    3. Use the "Import from File" option in n8n to import the downloaded workflow.

    Configure Credentials and Settings

    1. Add your Google OAuth2 credentials to access Google Drive.

    2. Enter your TinyPNG API Key in the HTTP Request node’s Authorization header.

    3. Check and update any folder IDs for the Google Drive Trigger and Upload nodes to point to the correct folders.

    Test and Activate

    1. Upload a small test image to the monitored Google Drive folder and check if the workflow runs automatically.

    2. If successful, verify that the optimized image appears in the target folder with the "-optimised" suffix.

    3. Activate the workflow inside n8n by toggling the switch on the workflow editor screen.

    This lets the workflow run all the time and process new images as they come in.



    Customizations and Tips

    • Change the Google Drive folder monitored by the trigger node to fit your needs.

    • Filter image types (PNG, JPG, JPEG) by adding simple checks inside the workflow.

    • Use dynamic folder names based on date or client name to organize optimized images better.

    • Adjust file naming patterns in the upload node for branding or version control.


    Troubleshooting Common Problems

    Problem: TinyPNG HTTP Request returns 401 Unauthorized

    Cause: API Key not correct or missing Base64 encoding.


    Fix: Confirm correct API Key, use online Base64 encoding tool to encode "api:key", then update Authorization header.


    Problem: Google Drive Trigger does not detect new files

    Cause: Folder ID may be wrong or Google OAuth permission issues.


    Fix: Verify Google Drive folder ID matches watched folder and credentials allow file read access.



    Pre-Production Checklist

    • Make sure Google OAuth credentials are active and connected in n8n.

    • Test TinyPNG API Key with a request and check it works.

    • Upload a small image to the watched Google Drive folder to trigger the workflow.

    • Look at each node’s log output to confirm data moves as expected.

    • Check optimized images save correctly in the target Google Drive folder.


    Deployment Guide

    After testing, turn on the workflow switch in the n8n editor to start automation.


    The workflow then runs every minute, optimizing new images automatically.


    You can check the execution logs anytime to see the status or find errors early.


    For users hosting the automation themselves, consider self-host n8n to run workflows on a private server.



    Summary

    ✓ Automatically watches Google Drive for new images.


    ✓ Compresses images using TinyPNG API to save space and speed sharing.


    ✓ Uploads smaller images back to a separate folder with clear naming.


    → Saves hours by removing manual compression work.


    → Keeps images ready quickly for clients or collaborators.



    Frequently Asked Questions

    How to fix 401 Unauthorized error in TinyPNG HTTP Request node?

    Check that the API Key is correct and properly Base64 encoded. Update the Authorization header with the encoded key.

    Why does the Google Drive Trigger not detect new files?

    Ensure the trigger watches the correct folder ID and the Google OAuth credentials have permission to read files.

    Can different image optimization services replace TinyPNG in this workflow?

    Yes, replace the HTTP Request nodes with ones calling other APIs like ImageOptim or Kraken.io and adjust parameters accordingly.

    How to run the workflow continuously in production?

    Import the workflow in the n8n editor, set credentials and folder IDs, test once, and then activate the workflow switch to run automatically.

    Vikash Kumar
    WRITTEN BY
    Vikash Kumar
    Founder, BULDRR AI
    Building AI agents, n8n workflows and end-to-end automation for 30+ Brands across India, the US, Europe, Dubai & Australia. 7+ years of Experience saving founders real hours every week - no code required.

    Related workflows.

    All 10,467+ templates →
    FREE Automate Twist Channel Creation and Messaging with n8n This workflow automates creating and updating a channel in Twist and sending a personalized message to specific users. It eliminates manual setup errors and saves time managing Twist communications. Open template → FREE Automate IT Support with Slack and OpenAI in n8n Streamline IT support by automating Slack message handling using n8n and OpenAI. This workflow handles Slack DMs, filters bots, queries a Confluence knowledge base, and delivers AI-generated responses, improving support efficiency and response time. Open template → FREE Automate Crypto Analysis with CoinMarketCap & n8n AI Agent Discover how this unique n8n workflow leverages CoinMarketCap's multi-agent AI to deliver precise, real-time cryptocurrency insights directly via Telegram. Manage crypto data analysis efficiently with automated multi-source API integration. Open template → FREE Generate On-Brand Blog Articles Using n8n and OpenAI This workflow automates the creation of on-brand blog articles by analyzing existing company content using n8n and OpenAI. It extracts article structures and brand voice to produce consistent draft articles, saving significant content creation time. Open template → FREE Automate Archiving Spotify Discover Weekly with n8n This automation workflow solves the hassle of manually archiving your Spotify Discover Weekly playlist by automatically comparing and adding only unique tracks to an archive playlist every Monday. It saves time, avoids duplicates, and keeps your archived music collection organized effortlessly using n8n. Open template → FREE Automate Analyzing Sales Call Transcripts with n8n & AI Agents This n8n workflow automates the extraction of structured insights from sales call transcripts using AI agents focused on sales, marketing, and product teams. It streamlines data processing, enabling faster decision-making and team alignment. Open template → FREE Automated SSL Expiry Alert System with n8n & Google Sheets This n8n workflow automates SSL certificate expiry monitoring by fetching URLs from Google Sheets, checking their SSL status via SSL-Checker.io, updating the sheet with results, and sending targeted email and Telegram alerts for certificates that are invalid or near expiry. Open template → FREE Automate Task Creation in ClickUp with n8n Struggling to manually create tasks in ClickUp? This beginner-friendly n8n workflow automates task creation, saving you time and reducing errors. Learn how to create tasks automatically with a simple trigger and ClickUp integration. Open template → FREE Automate Todoist Task Snoozing with n8n Workflow Struggling to manage and snooze your Todoist tasks efficiently? This detailed n8n workflow automates moving tasks between Inbox and Snoozed projects based on due dates, saving you hours of manual task juggling and ensuring timely task returns. Open template → FREE Build OpenAI Assistant with Google Drive Using n8n Automation This workflow automates creating and updating an OpenAI-powered Travel Assistant using a Google Drive file for accurate, specific user replies. It saves time by streamlining assistant updates and chat interactions seamlessly. Open template → FREE Automate WooCommerce Product Announcements on Twitter & Telegram Save time and boost your WooCommerce store's visibility by automatically posting new product announcements on Twitter and Telegram with this n8n workflow. Avoid manual posting errors and reach your audience instantly when new products go live. Open template → FREE Automate Zendesk to Asana Task Creation with n8n This detailed guide shows how to automate task creation in Asana from new Zendesk tickets using n8n. It solves the common challenge of manually duplicating support requests into project management, saving time and reducing errors. Open template → FREE Automate Image Alt Text Auditing & Enhancement with n8n & OpenAI Discover how this n8n workflow automates auditing and enhancing image alt text from any webpage using OpenAI GPT-4. It helps fix poor or missing alt attributes quickly and accurately, saving hours of manual work and improving web accessibility. Open template → FREE Create OpenAI Citation Workflow in n8n for File Retrieval This n8n workflow automates citation and source retrieval from OpenAI's vector store files, ensuring accurate content referencing and formatted output. It solves the problem of incomplete or strange citation text generated by AI, providing reliable markdown or HTML-ready citations for file-based AI assistance. Open template → FREE Automate Squarespace Order Fulfillment with n8n Workflow This n8n workflow automates order fulfillment for Squarespace Commerce by fetching pending orders and fulfilling them automatically, saving hours of manual work. It ensures timely fulfillment and customer notifications with seamless API integration. Open template → FREE Phishing Analysis Automation with n8n, URLScan.io & VirusTotal Automate phishing URL analysis with n8n using URLScan.io and VirusTotal. This workflow extracts URLs from unread Outlook emails, scans for threats, and reports via Slack, saving hours on threat detection. Open template → FREE Automate Image Analysis with Local Ollama Vision Models in n8n Struggling to extract detailed insights from images for business or research? This n8n workflow automates exhaustive image analysis using multiple local Ollama Vision Models, delivering structured, markdown-formatted results saved directly to Google Docs for collaboration and ease of use. Open template → FREE Automate Website Change Alerts N8N Telegram — Complete Guide [2026] Learn how to automate website change alerts n8n telegram with this step-by-step guide. Includes workflow examples, tips, and best practices for 2026. Open template → FREE Automate Text-to-Speech with Elevenlabs & n8n Webhook Save hours in your content creation by automating text-to-speech generation using n8n's webhook and Elevenlabs API. This workflow ensures seamless audio generation from text inputs, eliminating manual conversion errors and delays. Open template → FREE Automate Jira Notifications to Telegram with n8n Workflow This detailed guide shows how to automate Jira issue notifications to Telegram using n8n. Save hours by instantly sending updates, creation alerts, and assignment notifications to the right Telegram users, improving team communication and tracking. Open template → FREE Automate Daily Berlin Weather Updates to LINE with n8n Save time and stay informed by automatically sending daily weather updates for Berlin via LINE using n8n automation. This workflow fetches weather data every morning and messages you directly, eliminating manual checking and keeping you updated efficiently. Open template → FREE n8n Twitter Thread Generator 2026: AI Writes & Posts Threads From Any Content This n8n workflow uses AI to automatically convert any content — blog posts, videos, articles — into ready-to-post Twitter/X threads, complete with hooks and formatting. Open template → FREE Backup n8n Workflows to Bitbucket with Rate Limit Handling Automate daily backups of your n8n workflows directly to Bitbucket, intelligently managing API rate limits to avoid errors. This workflow ensures your automation definitions are safely versioned with minimal manual effort. Open template → FREE Automate Member and Activity Sync from Google Sheets to Orbit This blog explains how to automate moving community member data and their activities from Google Sheets into Orbit using n8n, solving tedious manual updates and ensuring accurate data syncing. Open template → FREE Sync Outlook Calendar with Notion via n8n Automation This workflow automates syncing Microsoft Outlook Calendar events into a Notion database. It solves the problem of manual calendar updates, saving time and reducing errors by automatically creating or updating Notion pages for your events. Open template →
    ✦ WANT THIS RUNNING IN YOUR BUSINESS?

    We’ll set it up for you.

    Tell us what you want it to do. We’ll wire the workflow, connect the credentials, and hand it over running.

    Keep exploring.