Automate WooCommerce Image Product Background Removal using API and Google Sheet
Last edited 39 days ago
This workflow automates the process of removing backgrounds from WooCommerce product images using the BackgroundCut API, and then updates the product images in both WooCommerce and a Google Sheet.
Once set up, the workflow processes product images in bulk, removing backgrounds and updating WooCommerce seamlessly.
This workflow is perfect for online stores that sell:
- Clothing and fashion items
- Jewelry and accessories
- General consumer products
Any product that benefits from clean, background-free images for a professional storefront presentation will see improved visual appeal and potentially higher conversions.
Benefits
- ⏱ Time-saving: Automates what would otherwise be a manual and repetitive task of editing images and updating product listings.
- 🔄 Fully Integrated: Connects Google Sheets, BackgroundCut API, FTP server, and WooCommerce in a seamless loop.
- 📦 Scalable: Supports batch processing, making it suitable for stores with hundreds of products.
- 📁 Organized Tracking: Updates the Google Sheet with the new image and a “DONE” flag for easy monitoring.
- 🔧 Customizable: You can change the image processing API, storage server, or eCommerce platform if needed.
How It Works
-
Data Retrieval:
- The workflow starts by fetching product data (ID and IMAGE URL) from a Google Sheets document.
- Only rows without a "DONE" marker are processed to avoid duplicates.
-
Background Removal:
- Each product image URL is sent to the BackgroundCut API, which removes the background and returns the edited image.
-
File Handling:
- The processed image is uploaded to an FTP server with the original filename preserved.
- A new URL for the edited image is generated and assigned to the product.
-
WooCommerce Update:
- The product in WooCommerce is updated with the new image URL.
-
Sheet Update:
- The Google Sheet is marked as "DONE" for the processed row, and the new image URL is recorded.
-
Batch Processing:
- The workflow loops through all rows in the sheet until all products are processed.
Set Up Steps
-
Prepare the Google Sheet:
- Clone the provided Google Sheet template.
- Fill in the ID (product ID) and IMAGE (original image URL) columns.
-
API & Credentials Setup:
- Get an API key from BackgroundCut.co.
- Configure the HTTP Request node ("Remove from Image URL") with:
- Header Auth:
Authorization
=API_KEY
.
- Header Auth:
- Set up WooCommerce API credentials in the "Update product" node.
-
FTP Configuration:
- Replace
YOUR_FTP_URL
in the "New Image Url" node with your FTP/CDN base URL. - Ensure FTP credentials are correctly set in the FTP node.
- Replace
-
Execution:
- Run the workflow manually via "When clicking ‘Execute workflow’".
- The process automatically handles background removal, file upload, and WooCommerce updates.
Need help customizing?
Contact me for consulting and support or add me on Linkedin.
You may also like
New to n8n?
Need help building new n8n workflows? Process automation for you or your company will save you time and money, and it's completely free!