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
Automate JPG to WEBP with n8n and Google

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

Learn how to Build this Workflow with AI:

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

Automate JPG to WEBP with n8n and Google

Visit through Desktop to Interact with the Workflow.

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.
Author
Written By
Vikash Kumar
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

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.

Automate Ideogram Image Generation with Google Sheets & Gmail

This workflow automates graphic design image generation via Ideogram AI, storing image data in Google Sheets and Google Drive, with email alerts via Gmail. It saves designers hours by automating image creation, remixing, review, and record-keeping.

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.

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.

Automate Gumroad to Beehiiv Subscriber Sync with n8n

Learn how to automatically add new Gumroad sales customers as Beehiiv newsletter subscribers using n8n automation. This workflow saves time by syncing sales data to Google Sheets CRM and notifying your Telegram channel instantly.

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.
1:1 Free Strategy Session
Your competitors are already automating. Are you still paying for it manually?

Do you want to adopt AI Automation?

Every hour your team does repetitive work, you're burning real money.
While you wait, faster businesses are cutting costs and moving quicker.
AI and automations aren't the future anymore — they're the present.

Book a live 1-on-1 session where we show you exactly which of your daily tasks can be automated — and what it’s costing you not to.