Automated image optimizer: convert JPG/PNG to WebP with APYHub and Google Drive
Ready for 3.0What this workflow does
This workflow has 10 nodes and runs manually, when you click “Execute workflow”. Along the way it connects Google Sheets and Google Drive.
How it runs
Trigger: Manually, when you click “Execute workflow”.
- Set API KEY (Edit Fields (Set)): sets 1 field: apikey
- Get images (Google Sheets): uses Google Sheets
- Get extension (Code): runs custom JavaScript code
- JPG or PNG? (Switch): routes items into 3 branches
- From JPG to WEBP (HTTP Request): calls an HTTP API (POST)
- PNG to WEBP (HTTP Request): calls an HTTP API (POST)
- Update Sheet (Google Sheets): update
- Get file image (HTTP Request): calls an HTTP API
- Upload image (Google Drive): uses Google Drive
Services it uses
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 (7)
- Manual Trigger
n8n-nodes-base.manualTrigger - Edit Fields (Set)
n8n-nodes-base.set - Google Sheets
n8n-nodes-base.googleSheets - Code
n8n-nodes-base.code - Switch
n8n-nodes-base.switch - HTTP Request
n8n-nodes-base.httpRequest - Google Drive
n8n-nodes-base.googleDrive
From the author
This workflow automates the process of converting images from JPG/PNG format to WEBP using the APYHub API. It retrieves image URLs from a Google Sheet, converts the images, and uploads the converted files to Google Drive. This workflow is a powerful tool for…