Skip to main content

Automatic background removal for images in Google Drive

Workflow preview

Workflow preview
100%
Automatic background removal for images in Google Drive preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

This n8n workflow simplifies the process of removing backgrounds from images stored in Google Drive. By leveraging the PhotoRoom API, this template enables automatic background removal, padding adj...

Best for

  • Content Creation automation workflows
  • Multimodal AI automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.set, n8n-nodes-base.httprequest, n8n-nodes-base.splitout, n8n-nodes-base.googledrive, n8n-nodes-base.merge, n8n-nodes-base.editimage, n8n-nodes-base.stickynote, n8n-nodes-base.googledrivetrigger

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Simon.

Original n8n.io source

1.1 Workflow description

Title
Automatic background removal for images in Google Drive
Workflow name
Automatic background removal for images in Google Drive

This n8n workflow simplifies the process of removing backgrounds from images stored in Google Drive. By leveraging the PhotoRoom API, this template enables automatic background removal, padding adjustments, and output formatting, all while storing the updated images back in a designated Google Drive folder.

This workflow is very useful for companies or individuals that are spending a lot of time into removing the background from product images.

How it Works

The workflow begins with a Google Drive Trigger node that monitors a specific folder for new image uploads.
Upon detecting a new image, the workflow downloads the file and extracts essential metadata, such as the file size.
Configurations are set for background color, padding, output size, and more, which are all customizable to match specific requirements.
The PhotoRoom API is called to process the image by removing its background and adding padding based on the settings.
The processed image is saved back to Google Drive in the specified output folder with an updated name indicating the background has been removed.

Requirements

PhotoRoom API Key
Google Drive API Access

Customizing the Workflow

Easily adjust the background color, padding, and output size using the configuration node.
Modify the output folder path in Google Drive or replace Google Drive with another storage service if needed.
For advanced use cases, integrate further image processing steps, such as adding captions or analyzing content using AI.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Config

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 2 - remove background

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.1

Block 3 - Split Out

Type / Role
n8n-nodes-base.splitOut - splitOut
Config choices
Version 1

Block 4 - Upload Picture to Google Drive

Type / Role
n8n-nodes-base.googleDrive - googleDrive
Config choices
Version 3

Block 5 - remove background fixed size

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.1

Block 6 - Merge

Type / Role
n8n-nodes-base.merge - merge
Config choices
Version 3

Block 7 - Upload Picture to Google Drive1

Type / Role
n8n-nodes-base.googleDrive - googleDrive
Config choices
Version 3

Block 8 - Download Image

Type / Role
n8n-nodes-base.googleDrive - googleDrive
Config choices
Version 3

Block 9 - Get Image Size

Type / Role
n8n-nodes-base.editImage - editImage
Config choices
Version 1

Block 10 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 11 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 12 - Watch for new images

Type / Role
n8n-nodes-base.googleDriveTrigger - googleDriveTrigger
Config choices
Version 1

Block 13 - Sticky Note3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 14 - Sticky Note4

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 15 - check which output size method is used

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 16 - loop all over your images

Type / Role
n8n-nodes-base.splitInBatches - splitInBatches
Config choices
Version 3

3. Summary Table

Workflow Automatic background removal for images in Google Drive
Complexity advanced
Nodes 16
Categories Content Creation, Multimodal AI
Author Simon
Published 05 Nov 2024

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/2529/2529.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Automatic background removal for images in Google Drive do?

This n8n workflow simplifies the process of removing backgrounds from images stored in Google Drive. By leveraging the PhotoRoom API, this template enables automatic background removal, padding adj...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Content Creation, Multimodal AI use case.