Remove Image Backgrounds with APImage AI: Airtable to Google Drive

AI Background Removal Workflow

This workflow automatically removes backgrounds from images stored in Airtable using the APImage API πŸ‘₯, then downloads and saves the processed images to Google Drive. Perfect for batch processing product photos, portraits, or any images that need clean, transparent backgrounds. The source (Airtable) and the storage (Google Drive) can be changed to any service or database you want/use.

🧩 Nodes Overview

  1. Remove Background (Manual Trigger) This manual trigger starts the background removal process when clicked.

Customization Options: Replace with Schedule Trigger for automatic daily/weekly processing Replace with Webhook Trigger to start via API calls
Replace with File Trigger to process when new files are added

  1. Get a Record (Airtable) Retrieves media files from your Airtable "Creatives Library" database. Connects to the "Media Files" table in your Airtable base Fetches records containing image thumbnails for processing Returns all matching records with their thumbnail URLs and metadata

Required Airtable Structure: Table with image/attachment field (currently expects "Thumbnail" field) Optional fields: File Name, Media Type, Upload Date, File Size

Customization Options: Replace with Google Sheets, Notion, or any database node Add filters to process only specific records Change to different tables with image URLs

  1. Code (JavaScript Processing) Processes Airtable records and prepares thumbnail data for background removal. Extracts thumbnail URLs from each record Chooses best quality thumbnail (large > full > original)
    Creates clean filenames by removing special characters Adds processing metadata and timestamps

Key Features: // Selects best thumbnail quality if (thumbnail.thumbnails?.large?.url) { thumbnailUrl = thumbnail.thumbnails.large.url; }

// Creates clean filename cleanFileName: (record.fields['File Name'] || 'unknown') .replace(//g, '_') .toLowerCase()

Easy Customization for Different Databases: Product Database**: Change field mappings to 'Product Name', 'SKU', 'Category' Portfolio Database**: Use 'Project Name', 'Client', 'Tags'
Employee Database**: Use 'Full Name', 'Department', 'Position'

  1. Split Out Converts the array of thumbnails into individual items for parallel processing. Enables processing multiple images simultaneously Each item contains all thumbnail metadata for downstream nodes

  2. APImage API (HTTP Request) Calls the APImage service to remove backgrounds from images.

API Endpoint: POST https://apimage.org/api/ai-remove-background

Request Configuration: Header**: Authorization: Bearer YOUR_API_KEY Body**: image_url: {{ $json.originalThumbnailUrl }}

βœ… Setup Required: Replace YOUR_API_KEY with your actual API key Get your key from APImage Dashboard πŸ‘₯

  1. Download (HTTP Request) Downloads the processed image from APImage's servers using the returned URL. Fetches the background-removed image file Prepares image data for upload to storage

  2. Upload File (Google Drive) Saves processed images to your Google Drive in a "bg_removal" folder.

Customization Options: Replace with Dropbox, OneDrive, AWS S3, or FTP upload Create date-based folder structures Use dynamic filenames with metadata Upload to multiple destinations simultaneously

✨ How To Get Started

Set up APImage API: Double-click the APImage API node Replace YOUR_API_KEY with your actual API key Keep the Bearer prefix

Configure Airtable: Ensure your Airtable has a table with image attachments Update field names in the Code node if different from defaults

Test the workflow: Click the Remove Background trigger node Verify images are processed and uploaded successfully

πŸ”— Get your API Key πŸ‘₯

πŸ”§ How to Customize

Input Customization (Left Section) Replace the Airtable integration with any data source containing image URLs: Google Sheets** with product catalogs Notion** databases with image galleries
Webhooks** from external systems File system** monitoring for new uploads Database** queries for image records

Output Customization (Right Section)
Modify where processed images are stored: Multiple Storage**: Upload to Google Drive + Dropbox simultaneously Database Updates**: Update original records with processed image URLs Email/Slack**: Send processed images via communication tools Website Integration**: Upload directly to WordPress, Shopify, etc.

Processing Customization Batch Processing**: Limit concurrent API calls Quality Control**: Add image validation before/after processing Format Conversion**: Use Sharp node for resizing or format changes Metadata Preservation**: Extract and maintain EXIF data

πŸ“‹ Workflow Connections Remove Background β†’ Get a Record β†’ Code β†’ Split Out β†’ APImage API β†’ Download β†’ Upload File

🎯 Perfect For

E-commerce**: Batch process product photos for clean, professional listings Marketing Teams**: Remove backgrounds from brand assets and imagery
Photographers**: Automate background removal for portrait sessions Content Creators**: Prepare images for presentations and social media Design Agencies**: Streamline asset preparation workflows

πŸ“š Resources

APImage API Documentation πŸ‘₯ Airtable API Reference πŸ‘₯ n8n Documentation πŸ‘₯

⚑ Processing Speed: Handles multiple images in parallel for fast batch processing
πŸ”’ Secure: API keys stored safely in n8n credentials
πŸ”„ Reliable: Built-in error handling and retry mechanisms

0
Downloads
1
Views
8.31
Quality Score
beginner
Complexity
Author:Gegenfeld(View Original β†’)
Created:8/13/2025
Updated:11/17/2025

πŸ”’ Please log in to import templates to n8n and favorite templates

Workflow Visualization

Loading...

Preparing workflow renderer

Comments (0)

Login to post comments