Automatic background removal for images in Google Drive
Ready for 3.0What this workflow does
This workflow has 12 nodes and runs on Google Drive events (file created). Along the way it connects Google Drive. It also calls image-api.photoroom.com over HTTP.
How it runs
Trigger: On Google Drive events (file created).
- Download Image (Google Drive): download
- Config (Edit Fields (Set)): sets 7 fields: bg_color, padding, keepInputSize…
- Get Image Size (Edit Image): information
- Merge: merges the data from its input branches
- Split Out: splits a list into separate items
- loop all over your images (Loop Over Items (Split in Batches)): loops over the items in batches
- check which output size method is used (If): checks a condition and branches into true / false
- remove background fixed size (HTTP Request): calls image-api.photoroom.com (POST)
- remove background (HTTP Request): calls image-api.photoroom.com (POST)
- Upload Picture to Google Drive (Google Drive): uses Google Drive
…plus 1 more step. See the full node list below.
Services it uses
HTTP calls to: image-api.photoroom.com
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 (9)
- Edit Fields (Set)
n8n-nodes-base.set - HTTP Request
n8n-nodes-base.httpRequest - Split Out
n8n-nodes-base.splitOut - Google Drive
n8n-nodes-base.googleDrive - Merge
n8n-nodes-base.merge - Edit Image
n8n-nodes-base.editImage - Google Drive Trigger
n8n-nodes-base.googleDriveTrigger - If
n8n-nodes-base.if - Loop Over Items (Split in Batches)
n8n-nodes-base.splitInBatches
From the author
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…