Automated Background Removal and Resizing for Google Drive Images
detail.loadingPreview
Automatically removes backgrounds from images in a Google Drive folder, resizes them, and uploads the results back to Google Drive.
About This Workflow
This n8n workflow automates the process of enhancing images stored in Google Drive. It triggers when a new image is added to a specified folder, downloads the image, removes its background using the Photoroom API, optionally resizes it, and then uploads the processed image back to a designated Google Drive folder.
Key functionalities include background removal (transparent or colored), padding, and output size control. The workflow is designed to be easily configurable for API keys, Google Drive credentials, input/output folders, and image processing parameters.
Key Features
- Automatic Trigger: Detects new image files created in a specified Google Drive folder.
- Background Removal: Utilizes the Photoroom API to remove image backgrounds, supporting transparent or solid color backgrounds.
- Resizing Options: Allows for flexible output image sizing, either maintaining the original dimensions or resizing to a fixed dimension.
- Padding: Adds specified padding around the image content.
- Google Drive Integration: Seamlessly downloads images from Google Drive and uploads processed images back.
- Configurable Parameters: Easily set API keys, Google Drive output folder, background color, and output size preferences via the 'Config' node.
- Error Handling: The structure implies potential for basic error handling within n8n, though not explicitly defined in the JSON snippet.
How To Use
- Setup Photoroom API Key: Obtain an API key from Photoroom (https://docs.photoroom.com/getting-started/how-can-i-get-my-api-key) and enter it in the 'Config' node under the 'api-key' parameter.
- Configure Google Drive Credentials: Ensure your Google Drive account is authorized within n8n. Select your Google Drive credentials in the 'Watch for new images', 'Upload Picture to Google Drive', and 'Upload Picture to Google Drive1' nodes.
- Specify Input Folder: In the 'Watch for new images' node, configure the
folderToWatchparameter to point to the Google Drive folder where new images will be uploaded. - Specify Output Folder: In the 'Config' node, set the 'OutputDriveFolder' parameter to the URL of the Google Drive folder where processed images should be saved.
- Customize Image Processing: Adjust the following parameters in the 'Config' node:
bg_color: Set the desired background color (e.g.,white,transparent, or a HEX code).padding: Define the padding to be applied to the image (e.g.,5%).keepInputSize: Set totrueto maintain original image dimensions, orfalseto useoutputSize.outputSize: IfkeepInputSizeisfalse, specify the desired output dimensions (e.g.,1600x1600).
- Activate the Workflow: Enable the workflow to start processing new images as they are added to the input folder.
Apps Used
Workflow JSON
{
"id": "f66fbe98-7a62-4ef4-90c3-8f6a7da54935",
"name": "Automated Background Removal and Resizing for Google Drive Images",
"nodes": 29,
"category": "Image Processing",
"status": "active",
"version": "1.0.0"
}Note: This is a sample preview. The full workflow JSON contains node configurations, credentials placeholders, and execution logic.
Get This Workflow
ID: f66fbe98-7a62...
About the Author
SaaS_Connector
Integration Guru
Connecting CRM, Notion, and Slack to automate your life.
Statistics
Related Workflows
Discover more workflows you might like
Universal CSV to JSON API Converter
Effortlessly transform CSV data into structured JSON with this versatile n8n workflow. Integrate it into any application as a custom API endpoint, supporting various input methods including file uploads and raw text.
Automate Local Business Outreach with AI-Powered Yelp Scraper
This workflow automates the process of scraping local business details from Yelp using AI, then leverages that data to send personalized partnership proposals via Gmail. It's perfect for sales and marketing teams looking to streamline lead generation and outreach campaigns.
Automate Getty Images Editorial Search & CMS Integration
This n8n workflow automates searching for editorial images on Getty Images, extracts key details and embed codes, and prepares them for seamless integration into your Content Management System (CMS), streamlining your content creation process.