Automate JPG/PNG to WEBP Image Conversion with n8n & APYHub

This workflow automates converting JPG and PNG images to WEBP format using n8n, APYHub API, Google Sheets, and Google Drive. It solves the problem of manual image conversion and file management, saving time and reducing errors by automating full conversion and upload processes.
baseManualTrigger
baseSet
baseGoogleSheets
+9
Workflow Identifier: 2198
NODES in Use: Manual Trigger, Set, Google Sheets, Code, Switch, HTTP Request, Google Sheets, HTTP Request, HTTP Request, Google Drive, Sticky Note, Sticky Note

Press CTRL+F5 if the workflow didn't load.

Learn how to Build this Workflow with AI:

Visit through Desktop for Best experience

What This Workflow Does

This workflow takes image URLs in JPG, JPEG, or PNG format and changes them into WEBP images automatically.
It gets the URLs from a Google Sheet, converts images using APYHub API, updates the sheet, and uploads results to Google Drive.
This saves time and lowers mistakes doing it by hand. It makes web pages load faster with optimized images.

Who Should Use This Workflow

This is good for people managing many images for websites or projects.
It helps freelancers or teams who get many JPG or PNG images and want to make them smaller and faster to load as WEBP.

Tools and Services Used

  • n8n Automation Platform: Controls the whole workflow and nodes.
  • Google Sheets: Stores original image URLs and updates conversion results.
  • APYHub API: Converts JPG and PNG images to WEBP formats.
  • Google Drive: Saves the converted WEBP images in an organized folder.

Inputs, Processing Steps, and Output

Inputs

  • Image URLs in JPG, JPEG, or PNG format listed in a Google Sheet under “FROM” column.
  • APYHub API Key for authenticating image conversion requests.
  • Google Drive folder ID for storing converted images.

Processing Steps

  • Trigger the workflow manually to start the process.
  • Set the APYHub API Key for use in HTTP requests.
  • Get image URLs from Google Sheet.
  • Extract filename and extension from each URL using a code node.
  • Use a switch node to route images by their extension: JPG/JPEG vs PNG.
  • Send POST requests to APYHub API to convert each image according to its format.
  • Update the Google Sheet with new WEBP image URLs and mark rows done.
  • Download converted WEBP images.
  • Upload WEBP images to Google Drive in the specified folder.

Output

  • Google Sheet updated with converted WEBP URLs and status.
  • WEBP images saved in Google Drive folder.

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

Import Workflow

  1. Download the workflow file from this page using the Download button.
  2. Open the n8n editor where you want to run the workflow.
  3. Use the menu to select Import from File and choose the downloaded workflow file.

Configure Credentials and IDs

  1. Add your APYHub API Key in the Set API KEY node, replace the placeholder string with your actual key.
  2. Connect your Google Sheets and Google Drive accounts in n8n credentials inside the related nodes.
  3. Update the Google Sheets node named Get images with your actual spreadsheet ID and sheet name.
  4. Set the Google Sheets node Update Sheet to point to correct sheet and document.
  5. In the Google Drive node Upload image, put the folder ID where converted images should go.

Test the Workflow

  1. Click the manual trigger Manual Trigger node named “When clicking ‘Test workflow’”.
  2. Press “Execute Workflow” button.
  3. Watch execution results to see if images convert and upload as expected.

Activate for Production

  1. Turn the workflow active using the toggle switch in the top right inside n8n editor.
  2. If automatic runs are needed, replace the manual trigger with a Cron Trigger node.
  3. Save changes and monitor workflow logs inside n8n.

Helpful Links

If self hosting n8n, see self-host n8n for setup tips.


Customizations

  • Change output folder by editing folderId in Upload image Google Drive node.
  • Add more image formats like GIF or TIFF by extending Switch node and adding new HTTP request nodes.
  • Include error handling workflows branching from HTTP nodes to send alerts on failure.
  • Schedule workflow automatically using Cron Trigger node instead of manual trigger.
  • Modify Code node to add metadata fields for better tracking.

Troubleshooting

  • Authentication failure with APYHub API: Check that the API Key is correctly placed in the Set API KEY node.
  • Google Sheets update errors: Make sure row_number is set right and spreadsheet details match.
  • Upload to Google Drive fails: Verify folder ID and refresh Google Drive credentials.
  • Image URL extraction issues: Confirm the URLs match expected format with filename and extension.

Pre-Production Checklist

  • Have active APYHub API Key and set it in the workflow.
  • Confirm Google Sheets document and sheet names match configuration.
  • Fill the “FROM” column with valid JPG/JPEG/PNG URLs.
  • Use correct Google Drive folder ID for uploads.
  • Run manual workflow test to ensure conversions and uploads happen.

Summary

→ Converts JPG and PNG images to WEBP
→ Automates image conversion and updates status in Google Sheet
→ Saves converted images in Google Drive folder
✓ Reduces manual work and errors
✓ Speeds up website image loading
✓ Easy to configure and run inside n8n

Frequently Asked Questions

The workflow gets image URLs from Google Sheets, uses APYHub API to convert formats, updates the sheet, downloads converted images, and uploads them to Google Drive.
Users need an n8n account, Google Sheets with image URLs, Google Drive folder, and a valid APYHub API Key.
Check the API Key set in the “Set API KEY” node and ensure HTTP request headers use the correct “api-token” key name.
Yes. Replace the Manual Trigger node with a Cron Trigger node in n8n to schedule automatic runs.

Promoted by BULDRR AI

Related Workflows

Automate Viral UGC Video Creation Using n8n + Degaus (Beginner-Friendly Guide)

Learn how to automate viral UGC video creation using n8n, AI prompts, and Degaus. This beginner-friendly guide shows how to import, configure, and run the workflow without technical complexity.
Form Trigger
Google Sheets
Gmail
+37
Free

AI SEO Blog Writer Automation Workflows in n8n

A complete beginner guide to building an AI SEO blog writer automation using n8n.
AI Agent
Google Sheets
httpRequest
+5
Free

Automate CrowdStrike Alerts with VirusTotal, Jira & Slack

This workflow automates processing of CrowdStrike detections by enriching threat data via VirusTotal, creating Jira tickets for incident tracking, and notifying teams on Slack for quick response. Save hours daily by transforming complex threat data into actionable alerts effortlessly.
scheduleTrigger
httpRequest
jira
+5
Free

Automate Telegram Invoices to Notion with AI Summaries & Reports

Save hours on financial tracking by automating invoice extraction from Telegram photos to Notion using Google Gemini AI. This workflow extracts data, records transactions, and generates detailed spending reports with charts sent on schedule via Telegram.
lmChatGoogleGemini
telegramTrigger
notion
+9
Free

Automate Email Replies with n8n and AI-Powered Summarization

Save hours managing your inbox with this n8n workflow that uses IMAP email triggers, AI summarization, and vector search to draft concise replies requiring minimal review. Automate business email processing efficiently with AI guidance and Gmail integration.
emailReadImap
vectorStoreQdrant
emailSend
+12
Free

Automate Email Campaigns Using n8n with Gmail & Google Sheets

This n8n workflow automates personalized email outreach campaigns by integrating Gmail and Google Sheets, saving hours of manual follow-up work and reducing errors in email sequences. It ensures timely follow-ups based on previous email interactions, optimizing communication efficiency.
googleSheets
gmail
code
+5
Free