Automate WooCommerce image product background removal using API and Google Sheet
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_URLin 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.
Automate WooCommerce Product Image Background Removal using an API and Google Sheets
This n8n workflow streamlines the process of preparing product images for WooCommerce by automating background removal. It fetches product data from a Google Sheet, sends the image URLs to a background removal API, and then updates the product images in WooCommerce with the processed versions.
What it does
This workflow performs the following steps:
- Manually Triggers: The workflow is initiated manually.
- Fetches Product Data: Reads product information, including image URLs, from a specified Google Sheet.
- Loops Over Items: Processes each product entry from the Google Sheet individually.
- Removes Image Background: Sends the product image URL to a background removal API (via an HTTP Request node) to get a clean image.
- Edits Fields: Transforms the data received from the background removal API into a format suitable for WooCommerce.
- Uploads Image to FTP: Uploads the processed image to an FTP server.
- Updates WooCommerce Product: Updates the corresponding product in WooCommerce with the new, background-removed image.
Prerequisites/Requirements
To use this workflow, you will need:
- n8n Account: A running instance of n8n.
- Google Sheets Account: A Google Sheet containing your product data, including a column for image URLs.
- Background Removal API Key: Access to a background removal API (e.g., remove.bg, Slazzer, etc.) and its API key. This will be configured in the "HTTP Request" node.
- FTP Server Access: Credentials for an FTP server to store the processed images.
- WooCommerce Store: A WooCommerce store with API access enabled.
- WooCommerce API Credentials: Consumer Key and Consumer Secret for your WooCommerce store.
Setup/Usage
-
Import the Workflow:
- Copy the provided JSON code.
- In your n8n instance, click "New Workflow".
- Go to the "Workflows" menu, click the three dots next to "New Workflow", and select "Import from JSON".
- Paste the JSON and click "Import".
-
Configure Credentials:
- Google Sheets: Click on the "Google Sheets" node and authenticate your Google Sheets account. Select the spreadsheet and sheet name containing your product data.
- HTTP Request (Background Removal API):
- Click on the "HTTP Request" node.
- Configure the URL and headers according to your chosen background removal API's documentation (e.g., API endpoint, API key in headers).
- Ensure the request body correctly sends the image URL from the Google Sheet data.
- FTP: Click on the "FTP" node and configure your FTP server credentials (host, port, username, password). Specify the remote path where images should be uploaded.
- WooCommerce: Click on the "WooCommerce" node and add your WooCommerce API credentials (Consumer Key, Consumer Secret, and your store URL).
-
Customize Nodes:
- Google Sheets: Adjust the "Read Range" if your data is not in the default range.
- Edit Fields: This node is likely used to transform the output from the background removal API into the correct format for WooCommerce and FTP. You might need to adjust the expressions here based on the exact output of your chosen API and the expected input for WooCommerce/FTP.
- FTP: Verify the "Remote Path" and "File Name" expressions to ensure images are uploaded correctly.
- WooCommerce: Ensure the "Resource" is set to "Product" and the "Operation" is set to "Update". Map the product ID and the new image URL (from the FTP upload) to the appropriate fields.
-
Test and Activate:
- Click "Execute Workflow" to run a test with a few items.
- Review the output of each node to ensure data is flowing as expected and images are being processed and uploaded correctly.
- Once satisfied, activate the workflow by toggling the "Active" switch in the top right corner.
This workflow provides a robust solution for automating a tedious but essential task in e-commerce, saving time and ensuring consistent product image quality.
Related Templates
Automate task deadline reminders with Google Sheets and Gmail (Today/3-Day/7-Day)
Task Deadline Reminder Workflow (Today / 3-Day / 7-Day) Task deadline management manually is inefficient and leads to missed deadlines—especially when teams rely on spreadsheets and individual reminders. This workflow automates the entire follow-up process by reading a centralized task sheet in Google Sheets every morning, checking the deadline for each task, and sending automatic email notifications to the responsible person based on urgency. Tasks due today, within three days, or within one week are identified and routed to customized Gmail notifications, ensuring that every team member is aware of upcoming deadlines without manual checking. Who’s it for This workflow is ideal for teams and organizations that manage multiple tasks across departments and need a reliable way to stay on top of deadlines. It is especially useful for: Project managers coordinating many deadlines Back-office teams monitoring routine operational tasks Organizations with distributed members Anyone who relies on spreadsheets but needs automated follow-up By integrating Google Sheets, n8n, and Gmail, you gain a proactive notification system that keeps everyone aligned and reduces the risk of forgotten tasks. How it works Daily trigger The workflow runs every morning at 9:00 using a Schedule Trigger. Load task list from Google Sheets The workflow retrieves all rows from the designated spreadsheet, including task name, deadline, responsible person, and email address. Process tasks individually A loop node evaluates each task one by one. Evaluate deadline conditions Due today: Deadline matches today’s date Due within 3 days: Deadline falls between today and three days ahead Due within 7 days: Deadline falls between today and one week ahead Send notifications Depending on urgency: “本日が締め切りです” for tasks due today “タスク期限が三日前となりました” for tasks due within 3 days “タスクの期限が一週間以内です” for tasks due within 7 days Each email is automatically sent to the responsible person based on the “メールアドレス” field in the sheet. Complete processing The loop continues until all task rows have been checked. How to set up Import the workflow into your n8n instance Authenticate Google Sheets and select the task spreadsheet Authenticate Gmail as the sender account Confirm required columns: タスク, 期限, 担当, メールアドレス Adjust time, message text, or conditions based on your internal rules Requirements Active n8n instance Google Sheets access with permission to read the task list Gmail OAuth connection for email sending Spreadsheet with at least: task name, deadline, responsible person, email address How to customize You can expand and refine this workflow to match your company’s processes: Add Slack, Chatwork, or LINE notifications Add overdue task detection Add task priority sorting (High / Medium / Low) Log notifications back into the spreadsheet Send daily summary reports to managers This workflow provides a flexible foundation for building a complete automated task governance system.
Daily Magento 2 customer sync to Google Contacts & Sheets without duplicates
Automatically sync newly registered Magento 2 customers to Google Contacts and Google Sheets every 24 hours — with full duplication control and seamless automation. This workflow is a plug-and-play customer contact automation system designed for Magento 2 store owners, marketers, and CRM teams. It fetches customer records registered within the last 24 hours (from 00:00:00 to 23:59:59), checks against an existing Google Sheet to avoid reprocessing, and syncs only the new ones into Google Contacts. This ensures your contact list is always fresh and up to date — without clutter or duplicates. ✅ What This Workflow Does: Automates Customer Syncing Every day, it fetches newly registered Magento 2 customers via API based on the exact date range (midnight to midnight). Deduplicates Using Google Sheets A master Google Sheet tracks already-synced emails. Before adding a customer, the workflow checks this list and skips if already present. Creates Google Contacts Automatically For each unique customer, it creates a new contact in your Google Contacts, saving fields like first name, last name, and email. Logs New Entries to Google Sheets In Google Sheets, it even records magento 2 customer group, createdat, websiteid & store_id After syncing, it adds each new email to the tracking sheet, building a cumulative record of synced contacts. Fully Scheduled & Automated Can be scheduled with the Cron node to run daily (e.g., 12:05 AM) with no manual intervention required. 🔧 Modules Used: HTTP Request (Magento 2 API) Date & Time (for filtering registrations) Google Sheets (for reading/writing synced emails) Google Contacts (for contact creation) Set, IF, and Merge nodes (for control logic) Cron (for scheduling the automation) 💼 Use Cases: Keep your email marketing tools synced with Magento 2 customer data. Build a CRM-friendly contact base in Google Contacts without duplicates. Share customer data with sales or support teams through synced Google Sheets. Reduce manual work and human error in data transfer processes. 🔒 Credentials Required Magento 2 Bearer Auth: Set up as a credential in n8n using your Magento 2 API access token. Google API 📂 Category E-commerce → Magento 2 (Adobe Commerce) 💬 Need Help? 💡 Having trouble setting it up or want to customize this workflow further? Feel free to reach out — I’m happy to help with setup, customization, or Magento 2 API integration issues. Contact: Author 👤 Author Kanaka Kishore Kandregula Certified Magento 2 Developer https://gravatar.com/kmyprojects https://www.linkedin.com/in/kanakakishore
Send RSS feed data to webhook
Filters articles based on keywords, checks against MongoDB for unique links, then sends results to different webhooks