Remove Google Drive photo backgrounds and log results to Google Sheets with LassoCut
Quick overview
Description
Quick overview This workflow monitors a Google Drive folder for new images, removes their backgrounds using LassoCut, saves the cut-outs back to Drive, and logs processing details (including errors and credits used) to a Google Sheets log. How it works Triggers every minute when a new file is created in a specified Google Drive folder, or runs manually to process all files already in that folder. Lists files in the input folder (for manual runs) and filters to JPEG/PNG/WebP images that are 22 MB or smaller. Processes images one at a time by downloading each file from Google Drive and sending it to LassoCut to remove the background. Uploads the cut-out image to a Google Drive output folder using a "-cutout" filename and moves the original file to a done folder. If downloading, background removal, or uploading fails, moves the original file to a failed folder and captures the error details. Appends one row per image to Google Sheets with links, dimensions, detected type, credits charged, and a processed/failed status. Builds a run summary that counts processed and failed images and totals the credits used. Setup Install the community node package n8n-nodes-lassocut and create a LassoCut API credential with your LassoCut API key. Add Google Drive OAuth2 credentials for the Google Drive trigger and Drive actions, and a Google Sheets OAuth2 credential for the Google Sheets append step. Create four Google Drive folders (input, output, done, failed) and paste their IDs/URLs into the workflow settings, then select the same input folder in the Google Drive trigger. Create a Google Sheets spreadsheet (with a tab name matching the configured sheet name, such as "Log") and paste its ID/URL into the workflow settings. Requirements A LassoCut account (free accounts get 50 previews a month, up to 10 a day; a full-size image costs 1 credit) A Google account with Google Drive and Google Sheets Customization Set a background colour (for example ffffff for white) in the Settings node to get JPG cut-outs on a solid colour Switch size to "preview" in Settings to test for free before processing full-size images Add a Slack or Gmail node after "Build run summary" to get a report after each run Additional info Built by the founder of LassoCut, who maintains the verified n8n-nodes-lassocut node. An n8n automation workflow template by LassoCut.
Community Metrics
Author
LassoCut
Platform
web
Pricing model
free
Categories
- Automation
Tags
- n8n
- workflow
- google-sheets
- google-drive
- code
Capabilities
- 3 nodes