Background Removal Automation with n8n & Google Drive

This workflow automates background removal from images uploaded to Google Drive using Photoroom API. It saves time by processing images automatically with customized settings and re-uploading them to Drive.
set
httpRequest
googleDrive
+7
Workflow Identifier: 1682
NODES in Use: Set, HTTP Request, Split Out, Google Drive Trigger, Google Drive, Edit Image, Split In Batches, If, Merge, Sticky Note
Automate background removal with n8n and Google Drive

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

Learn how to Build this Workflow with AI:

What this workflow does

This workflow watches a Google Drive folder for new images, removes the backgrounds using the Photoroom API, and uploads clean images back to Google Drive automatically.

It solves the problem of spending too much time manually editing product photos to remove backgrounds and resize images.

The result is ready-to-use, consistent product images without manual work or delays.


How the workflow works: Inputs, Process, and Output

Inputs

  • New image files uploaded into a specific Google Drive input folder.
  • Photoroom API key for background removal.
  • Configuration settings like background color, padding, and output size.

Processing Steps

  • Google Drive Trigger detects new files in the chosen folder.
  • Google Drive node downloads each image with metadata.
  • Edit Image node reads the original image size.
  • Split Out splits size data for further use.
  • Set node defines parameters: background color, padding, output size, API key, and output folder.
  • Split In Batches processes multiple images in batches.
  • If node checks whether to keep input size or use fixed output size.
  • HTTP Request nodes send images to Photoroom API, passing size, padding, background color, and API key.
  • Google Drive upload nodes save processed PNG images in the output folder with prefixed filenames.

Output

Processed images with removed backgrounds, consistent sizes or padding as specified, uploaded back to Google Drive.


Who should use this workflow

This is for ecommerce managers or small business owners who get many product images that need background removal.

Also good for anyone wanting to save time by automating repetitive photo editing tasks.


Tools and services used


Beginner step-by-step: How to use this workflow in n8n

Step 1: Import Workflow

Download the workflow file using the Download button on this page.

In the n8n editor, click “Import from File” and select the downloaded workflow.

Step 2: Add Credentials

Add your Google Drive OAuth2 credentials to the Google Drive nodes.

In the Set node, enter your Photoroom API key.

Step 3: Update Folder IDs

In the Google Drive Trigger node, make sure the input folder to watch is correct.

In the Set node, update the output folder URL where processed images go.

Step 4: Configure Image Settings

Adjust background color, padding, keepInputSize boolean, and outputSize as needed inside the Set node.

Step 5: Test the Workflow

Upload one or more images to the Google Drive input folder.

Check if the workflow triggers, processes, and uploads images correctly.

Step 6: Activate for Production

Toggle the workflow to Active in n8n.

It will now automatically check for new images every minute and process them.

If using self hosting or VPS setup for n8n, learn more about self-host n8n.


Common customizations

  • Change background color by updating bg_color in the Set node.
  • Adjust image padding percentage in the Set node.
  • Toggle between keeping original image size or resizing by changing the keepInputSize boolean.
  • Change where processed files go by editing OutputDriveFolder in the Set node.
  • Rename output files by modifying filename patterns in the Google Drive upload nodes.

What happens if something goes wrong (Edge cases and failures)

  • If the workflow does not start when images upload, check the folder path in the Google Drive Trigger and reconnect Google credentials.
  • If the Photoroom API returns errors or no result, verify the API key in the Set node.
  • If images upload with no background removed, confirm the HTTP Request nodes use POST with “multipart-form-data” and correct headers.

Result you get after running this workflow

✓ Images uploaded to the chosen Google Drive folder have backgrounds automatically removed.

✓ Images are saved with consistent sizes and padding as defined.

✓ Manual photo editing time greatly reduced.

✓ Product images have a uniform, professional look ready for ecommerce.


Summary

→ A workflow that watches a cloud folder, removes image backgrounds, and uploads clean photos automatically.

→ Saves time and reduces errors in preparing images for online stores.

→ Uses Google Drive for file management and Photoroom API for editing.

→ Can be updated easily for padding, background color, or size.

Automate background removal with n8n and Google Drive

Visit through Desktop to Interact with the Workflow.

Frequently Asked Questions

Yes, but the HTTP Request nodes need to be updated with the new API’s URL, headers, and parameters.
It uses normal file read and write operations, which usually stay within free limits unless processing very high image volumes.
Check the folder path set in the Google Drive Trigger node and ensure Google Drive credentials are authorized correctly.
Yes, the API keys and credentials are stored securely inside n8n credential nodes and not exposed.

Promoted by BULDRR AI

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.