AutomationFlowsWeb Scraping › Video Background Removal and Image Composition with Google Drive Integration

Video Background Removal and Image Composition with Google Drive Integration

ByPaul Roussel @paul on n8n.io

Automated workflow to remove video backgrounds and composite foreground video on static image backgrounds. Perfect for creating branded content, professional presentations, and consistent visual branding across your videos.

Webhook trigger★★★★☆ complexity25 nodesHTTP RequestGoogle Drive
Web Scraping Trigger: Webhook Nodes: 25 Complexity: ★★★★☆ Added:

This workflow corresponds to n8n.io template #9820 — we link there as the canonical source.

This workflow follows the Google Drive → HTTP Request recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "name": "Remove Video Background & Compose on Custom Image Background with Google Drive",
  "nodes": [
    {
      "id": "sticky-overview",
      "name": "\ud83d\udccb Overview",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1100,
        60
      ],
      "parameters": {
        "width": 520,
        "height": 580,
        "content": "## \ud83c\udfac Video Background Removal & Image Composition\n\n**What it does:**\n- Removes background from ANY video (AI actors, product demos, webcam footage, etc.)\n- Composites foreground onto custom image background\n- Saves final result to Google Drive\n\n**Perfect for:**\n- E-commerce product videos with branded backgrounds\n- Profile videos with professional backgrounds\n- Social media content with custom scenes\n- Presentation videos with company branding\n- AI avatars on static backgrounds\n- Real estate videos with custom overlays\n\n**Processing time:** 3-5 minutes per minute of video\n\n**Setup:** ~7 minutes total\n\n[\ud83d\udcd6 Full Documentation](https://docs.videobgremover.com/)"
      },
      "typeVersion": 1,
      "notesTextSize": "large",
      "notesBackgroundColor": 4
    },
    {
      "id": "sticky-api-key",
      "name": "\ud83d\udd11 API Key Setup",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -480,
        60
      ],
      "parameters": {
        "width": 380,
        "height": 360,
        "content": "## \ud83d\udd11 API Key Setup (Required)\n\n**Step 1:** Get your API key\n- Visit: https://videobgremover.com/api-management\n- Sign up (free tier available)\n- Copy your API key\n\n**Step 2:** Add to n8n environment variables\n- Go to: Settings \u2192 Variables\n- Add new variable:\n  - Name: `VIDEOBGREMOVER_KEY`\n  - Value: your API key\n- Save\n\n**Pricing:** $0.50-$2.00 per minute processed\n\n\u2705 This workflow uses `$vars.VIDEOBGREMOVER_KEY` (secure)"
      },
      "typeVersion": 1
    },
    {
      "id": "sticky-inputs",
      "name": "\ud83d\udce5 Inputs",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1100,
        660
      ],
      "parameters": {
        "width": 380,
        "height": 280,
        "content": "## \ud83d\udce5 Input Required\n\n**Foreground video:** Subject with any background\n- AI actors (HeyGen, Synthesia, D-ID)\n- Product demonstrations\n- Webcam/talking head footage\n- Profile videos\n- Sports/training content\n\n**Background image:** Your custom scene\n- Brand backgrounds (logos, colors)\n- Professional settings (office, studio)\n- Product photos\n- Custom graphics/designs\n\n\u26a0\ufe0f Both must be **publicly accessible URLs**"
      },
      "typeVersion": 1
    },
    {
      "id": "sticky-composition",
      "name": "\ud83c\udfa8 Composition",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -480,
        460
      ],
      "parameters": {
        "width": 380,
        "height": 360,
        "content": "## \ud83c\udfa8 Composition Template\n\n**Template:** `centered`\n- Foreground centered on canvas\n- Maintains aspect ratio\n- Professional look for images\n- Perfect for product demos on branded backgrounds\n\n**Available templates:**\n- `centered` - Center with contain sizing\n- `fullscreen` - Cover entire canvas\n- `picture_in_picture` - Small in corner\n- `ai_ugc_ad` - Bottom-right optimized\n\n**Export:**\n- Format: H.264 (MP4)\n- Preset: Medium (balanced quality/speed)\n\n*Customize in the \"Start Composition\" node*"
      },
      "typeVersion": 1
    },
    {
      "id": "sticky-polling",
      "name": "\ud83d\udd04 Polling",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -60,
        60
      ],
      "parameters": {
        "width": 380,
        "height": 300,
        "content": "## \ud83d\udd04 Processing & Polling\n\n**How it works:**\n1. Job submitted to API\n2. Background removal starts (20-60 sec)\n3. Image composition applied\n4. Status checked every 20 seconds\n5. When complete \u2192 download & upload\n\n**Status flow:**\n- `processing` \u2192 Wait 20s \u2192 Check again\n- `completed` \u2192 Download video\n- `failed` \u2192 Return error details\n\n\u23f1\ufe0f Typical: 3-5 min per min of video"
      },
      "typeVersion": 1
    },
    {
      "id": "sticky-gdrive",
      "name": "\ud83d\udcbe Google Drive",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        540,
        60
      ],
      "parameters": {
        "width": 380,
        "height": 280,
        "content": "## \ud83d\udcbe Google Drive Setup\n\n**Step 1:** Connect Google Drive\n- Click \"Upload to Google Drive\" node\n- Click \"Connect\"\n- Authorize n8n\n\n**Step 2:** Choose folder (optional)\n- Default: Root of \"My Drive\"\n- Or select specific folder\n\n**Output:**\n- Permanent shareable link\n- Direct download URL\n- File metadata\n\n\u23f1\ufe0f Setup time: ~2 minutes"
      },
      "typeVersion": 1
    },
    {
      "id": "sticky-usage",
      "name": "\ud83d\ude80 Usage",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1140,
        60
      ],
      "parameters": {
        "width": 380,
        "height": 340,
        "content": "## \ud83d\ude80 How to Use\n\n**Manual testing:**\n1. Update URLs in \"Sample Inputs (manual)\"\n2. Click \"Execute Workflow\"\n3. Wait for processing (3-5 min per min of video)\n4. Check Google Drive for result\n\n**Webhook automation:**\n1. Activate workflow\n2. Copy webhook URL\n3. POST to webhook:\n```json\n{\n  \"foreground_video_url\": \"https://...\",\n  \"background_image_url\": \"https://...\"\n}\n```\n\n**Batch processing:** Connect to Google Sheets or Airtable for bulk automation"
      },
      "typeVersion": 1
    },
    {
      "id": "webhook-1",
      "name": "Webhook Trigger",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -1040,
        900
      ],
      "parameters": {
        "path": "compose-video-image",
        "options": {
          "responseData": "allEntries"
        },
        "httpMethod": "POST",
        "responseMode": "responseNode"
      },
      "typeVersion": 1.1
    },
    {
      "id": "manual-1",
      "name": "Manual Trigger",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -1040,
        1040
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "set-web-1",
      "name": "Extract Webhook Data",
      "type": "n8n-nodes-base.set",
      "position": [
        -820,
        900
      ],
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "name": "foreground_video_url",
              "type": "string",
              "value": "={{ $json.body?.foreground_video_url ?? $json.foreground_video_url ?? 'https://videos.videobgremover.com/public-videos/assets/ai-actor.mp4' }}"
            },
            {
              "name": "background_image_url",
              "type": "string",
              "value": "={{ $json.body?.background_image_url ?? $json.background_image_url ?? 'https://drive.google.com/uc?id=1DYJxUcuN5n4BT4YZnRKYmXuLNSCs5bPy' }}"
            },
            {
              "name": "source",
              "type": "string",
              "value": "webhook"
            }
          ]
        }
      },
      "typeVersion": 3.3
    },
    {
      "id": "set-manual-1",
      "name": "Sample URLs (Edit Here)",
      "type": "n8n-nodes-base.set",
      "position": [
        -820,
        1040
      ],
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "name": "foreground_video_url",
              "type": "string",
              "value": "https://videos.videobgremover.com/public-videos/assets/ai-actor.mp4"
            },
            {
              "name": "background_image_url",
              "type": "string",
              "value": "https://drive.google.com/uc?id=1DYJxUcuN5n4BT4YZnRKYmXuLNSCs5bPy"
            },
            {
              "name": "source",
              "type": "string",
              "value": "manual"
            }
          ]
        }
      },
      "typeVersion": 3.3
    },
    {
      "id": "merge-1",
      "name": "Merge Triggers",
      "type": "n8n-nodes-base.merge",
      "position": [
        -600,
        970
      ],
      "parameters": {
        "mode": "append",
        "options": {}
      },
      "typeVersion": 2.1
    },
    {
      "id": "http-1",
      "name": "1. Create Job (Upload Foreground)",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -380,
        970
      ],
      "parameters": {
        "url": "https://api.videobgremover.com/api/v1/jobs",
        "method": "POST",
        "options": {
          "response": {
            "response": {
              "neverError": true,
              "responseFormat": "json"
            }
          }
        },
        "jsonBody": "={ \"video_url\": \"{{ $json.foreground_video_url }}\" }",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "headerParameters": {
          "parameters": [
            {
              "name": "X-API-Key",
              "value": "={{ $vars.VIDEOBGREMOVER_KEY }}"
            },
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        }
      },
      "typeVersion": 4.1
    },
    {
      "id": "http-2",
      "name": "2. Start Image Composition",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -140,
        970
      ],
      "parameters": {
        "url": "=https://api.videobgremover.com/api/v1/jobs/{{ $json.id }}/start",
        "method": "POST",
        "options": {
          "response": {
            "response": {
              "neverError": true,
              "responseFormat": "json"
            }
          }
        },
        "jsonBody": "={\n  \"background\": {\n    \"type\": \"composition\",\n    \"composition\": {\n      \"template\": \"centered\",\n      \"background_type\": \"image\",\n      \"background_url\": \"{{ $('Merge Triggers').item.json.background_image_url }}\",\n      \"export_format\": \"h264\",\n      \"export_preset\": \"medium\"\n    }\n  }\n}",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "headerParameters": {
          "parameters": [
            {
              "name": "X-API-Key",
              "value": "={{ $vars.VIDEOBGREMOVER_KEY }}"
            },
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        }
      },
      "typeVersion": 4.1
    },
    {
      "id": "http-3",
      "name": "3. Check Job Status",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        100,
        970
      ],
      "parameters": {
        "url": "=https://api.videobgremover.com/api/v1/jobs/{{ $('1. Create Job (Upload Foreground)').item.json.id }}/status",
        "method": "GET",
        "options": {
          "response": {
            "response": {
              "neverError": true,
              "responseFormat": "json"
            }
          }
        },
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "X-API-Key",
              "value": "={{ $vars.VIDEOBGREMOVER_KEY }}"
            }
          ]
        }
      },
      "typeVersion": 4.1
    },
    {
      "id": "if-complete",
      "name": "Is Complete?",
      "type": "n8n-nodes-base.if",
      "position": [
        300,
        970
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "is_completed_condition",
              "operator": {
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.status }}",
              "rightValue": "completed"
            }
          ]
        }
      },
      "typeVersion": 2
    },
    {
      "id": "download",
      "name": "4. Download Video",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        520,
        830
      ],
      "parameters": {
        "url": "={{ $json.processed_video_url }}",
        "options": {
          "response": {
            "response": {
              "responseFormat": "file"
            }
          }
        }
      },
      "typeVersion": 4.1
    },
    {
      "id": "gdrive",
      "name": "5. Upload to Google Drive",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        740,
        830
      ],
      "parameters": {
        "name": "=composed_video_{{ $('1. Create Job (Upload Foreground)').item.json.id }}_{{ new Date().getTime() }}.mp4",
        "driveId": {
          "__rl": true,
          "mode": "list",
          "value": "My Drive"
        },
        "options": {
          "simplifyOutput": true,
          "googleFileConvert": false
        },
        "folderId": {
          "__rl": true,
          "mode": "list",
          "value": "root"
        },
        "operation": "upload",
        "binaryPropertyName": "data"
      },
      "typeVersion": 3
    },
    {
      "id": "success-set",
      "name": "Build Success Response",
      "type": "n8n-nodes-base.set",
      "position": [
        960,
        830
      ],
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "name": "final_result",
              "type": "object",
              "value": "={{ {\n  success: true,\n  job_id: $('1. Create Job (Upload Foreground)').item.json.id,\n  export_id: $('2. Start Image Composition').item.json.export_id,\n  google_drive_id: $json.id,\n  google_drive_url: $json.webViewLink,\n  download_url: $('3. Check Job Status').item.json.processed_video_url,\n  message: 'Video composed with image background successfully and saved to Google Drive',\n  filename: $json.name,\n  video_length_seconds: $('3. Check Job Status').item.json.length_seconds,\n  source: $('Merge Triggers').item.json.source\n} }}"
            }
          ]
        }
      },
      "typeVersion": 3.3
    },
    {
      "id": "if-failed",
      "name": "Has Failed?",
      "type": "n8n-nodes-base.if",
      "position": [
        500,
        1200
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "is_failed_condition",
              "operator": {
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.status }}",
              "rightValue": "failed"
            }
          ]
        }
      },
      "typeVersion": 2
    },
    {
      "id": "wait-20",
      "name": "Wait 20s",
      "type": "n8n-nodes-base.wait",
      "position": [
        720,
        1340
      ],
      "parameters": {
        "unit": "seconds",
        "amount": 20
      },
      "typeVersion": 1.1
    },
    {
      "id": "error-set",
      "name": "Build Error Response",
      "type": "n8n-nodes-base.set",
      "position": [
        720,
        1200
      ],
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "name": "final_result",
              "type": "object",
              "value": "={{ {\n  success: false,\n  job_id: $('1. Create Job (Upload Foreground)').item.json.id,\n  error: $json.error || 'Video composition with image background failed',\n  status: $json.status,\n  message: 'Failed to compose video with image background',\n  source: $('Merge Triggers').item.json.source\n} }}"
            }
          ]
        }
      },
      "typeVersion": 3.3
    },
    {
      "id": "if-webhook",
      "name": "From Webhook?",
      "type": "n8n-nodes-base.if",
      "position": [
        1180,
        1010
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "is_webhook_condition",
              "operator": {
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.final_result?.source ?? $json.source }}",
              "rightValue": "webhook"
            }
          ]
        }
      },
      "typeVersion": 2
    },
    {
      "id": "respond",
      "name": "Respond to Webhook",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        1400,
        920
      ],
      "parameters": {
        "responseBody": "={{ $json.final_result ?? $json }}",
        "responseCode": 200
      },
      "typeVersion": 1.1
    },
    {
      "id": "end-manual",
      "name": "Manual Test Complete",
      "type": "n8n-nodes-base.set",
      "position": [
        1400,
        1100
      ],
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "name": "final_result",
              "type": "object",
              "value": "={{ $json.final_result ?? $json }}"
            }
          ]
        }
      },
      "typeVersion": 3.3
    }
  ],
  "settings": {
    "executionOrder": "v1"
  },
  "connections": {
    "Wait 20s": {
      "main": [
        [
          {
            "node": "3. Check Job Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Has Failed?": {
      "main": [
        [
          {
            "node": "Build Error Response",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait 20s",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Is Complete?": {
      "main": [
        [
          {
            "node": "4. Download Video",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Has Failed?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "From Webhook?": {
      "main": [
        [
          {
            "node": "Respond to Webhook",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Manual Test Complete",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Manual Trigger": {
      "main": [
        [
          {
            "node": "Sample URLs (Edit Here)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge Triggers": {
      "main": [
        [
          {
            "node": "1. Create Job (Upload Foreground)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook Trigger": {
      "main": [
        [
          {
            "node": "Extract Webhook Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "4. Download Video": {
      "main": [
        [
          {
            "node": "5. Upload to Google Drive",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "3. Check Job Status": {
      "main": [
        [
          {
            "node": "Is Complete?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build Error Response": {
      "main": [
        [
          {
            "node": "From Webhook?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Webhook Data": {
      "main": [
        [
          {
            "node": "Merge Triggers",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build Success Response": {
      "main": [
        [
          {
            "node": "From Webhook?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Sample URLs (Edit Here)": {
      "main": [
        [
          {
            "node": "Merge Triggers",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "5. Upload to Google Drive": {
      "main": [
        [
          {
            "node": "Build Success Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "2. Start Image Composition": {
      "main": [
        [
          {
            "node": "3. Check Job Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "1. Create Job (Upload Foreground)": {
      "main": [
        [
          {
            "node": "2. Start Image Composition",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

Automated workflow to remove video backgrounds and composite foreground video on static image backgrounds. Perfect for creating branded content, professional presentations, and consistent visual branding across your videos.

Source: https://n8n.io/workflows/9820/ — original creator credit. Request a take-down →

More Web Scraping workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

Web Scraping

AI Background Change – VideoBGRemover + Wan2.2 Vace (fal). Uses httpRequest, googleDrive. Webhook trigger; 32 nodes.

HTTP Request, Google Drive
Web Scraping

Remove Video Background & Compose on Custom Background with Google Drive. Uses httpRequest, googleDrive. Webhook trigger; 25 nodes.

HTTP Request, Google Drive
Web Scraping

• Upload foreground video (AI actors, product demos, webcam footage) • Provide custom background video URL • API removes video background with videobgremover.com • Composites foreground onto backgroun

HTTP Request, Google Drive
Web Scraping

A comprehensive n8n workflow template that completely automates the startup pitch deck submission process for accelerators, incubators, VC firms, and startup competitions. This workflow validates foun

Google Drive, Gmail, N8N Nodes Verifiemail +2
Web Scraping

This workflow automates the entire parent consent process for school field trips, replacing manual paper forms with a secure, verified, and legally compliant digital system.

Google Drive, Gmail, N8N Nodes Verifiemail +2