AutomationFlowsData & Sheets › Batch Upscale Portrait Photos with Real-esrgan Ai, Google Drive and Airtable

Batch Upscale Portrait Photos with Real-esrgan Ai, Google Drive and Airtable

ByRobert Schröder @saits on n8n.io

Automated workflow that retrieves portrait photos from Airtable, upscales them using AI, and stores the enhanced images in Google Drive with organized folder structure. Automated Folder Creation: Creates timestamped folders in Google Drive AI-Powered Upscaling: Uses Replicate's…

Event trigger★★★★☆ complexity12 nodesGoogle DriveHTTP RequestAirtable
Data & Sheets Trigger: Event Nodes: 12 Complexity: ★★★★☆ Added:

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

This workflow follows the Airtable → Google Drive 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
{
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "3a204dbb-8945-4fd1-8d09-9980a664128f",
      "name": "When clicking \u2018Execute workflow\u2019",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -1024,
        -848
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "1d9e1318-89b1-436f-abf1-0ea269f35644",
      "name": "Create folder",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        -768,
        -848
      ],
      "parameters": {
        "name": "=< Folder Name >",
        "driveId": {
          "__rl": true,
          "mode": "list",
          "value": ""
        },
        "options": {},
        "folderId": {
          "__rl": true,
          "mode": "list",
          "value": ""
        },
        "resource": "folder"
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 3
    },
    {
      "id": "f44f1434-e002-4478-bbd5-498dff5a8e40",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        -64,
        -848
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "af7d12c5-fd15-4ed3-8bf4-11901dc21f89",
      "name": "Upload to Google Drive",
      "type": "n8n-nodes-base.googleDrive",
      "onError": "continueRegularOutput",
      "position": [
        832,
        -848
      ],
      "parameters": {
        "name": "={{ 'Upscaled_Picture' + $now.format('yyyy-MM-dd_HH-mm-ss') + '.png' }}",
        "driveId": {
          "__rl": true,
          "mode": "list",
          "value": "My Drive"
        },
        "options": {},
        "folderId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $json.gdriveUploadFolderId }}"
        }
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 3
    },
    {
      "id": "6bab8092-e2a1-4640-acf5-07e4e15d656f",
      "name": "Download Upscale",
      "type": "n8n-nodes-base.httpRequest",
      "onError": "continueRegularOutput",
      "position": [
        384,
        -928
      ],
      "parameters": {
        "url": "={{ $json.output }}",
        "options": {
          "response": {
            "response": {
              "responseFormat": "file"
            }
          }
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "444a3467-8416-4dfd-ad89-1be387ea4613",
      "name": "Extract Portrait URLS from Airtable Output",
      "type": "n8n-nodes-base.code",
      "position": [
        -288,
        -848
      ],
      "parameters": {
        "jsCode": "// N8N Code Node - Extract Portrait Photo URLs from Airtable Output\n\n// Input data from Airtable\nconst airtableData = $input.all()[0].json;\n\n// Get Google Drive folder ID from previous node\nconst folderId = $node[\"Create folder\"].json.id;\n\n// Extract URLs from PortraitFotoAuswahl array\nconst portraitUrls = [];\n\nif (airtableData.PortraitFotoAuswahl && Array.isArray(airtableData.PortraitFotoAuswahl)) {\n airtableData.PortraitFotoAuswahl.forEach((item, index) => {\n   if (item.url) {\n     portraitUrls.push({\n       index: index,\n       url: item.url,\n       filename: item.filename || `portrait_${index}`,\n       size: item.size || null,\n       width: item.width || null,\n       height: item.height || null,\n       gdriveUploadFolderId: folderId\n     });\n   }\n });\n}\n\n// Return array of URLs with folder ID\nreturn portraitUrls.map(item => ({\n json: {\n   url: item.url,\n   index: item.index,\n   filename: item.filename,\n   size: item.size,\n   width: item.width,\n   height: item.height,\n   gdriveUploadFolderId: item.gdriveUploadFolderId\n }\n}));"
      },
      "typeVersion": 2
    },
    {
      "id": "5868126e-c299-4574-9170-ce02655a59ad",
      "name": "Replicate Upscaler",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        160,
        -928
      ],
      "parameters": {
        "url": "https://api.replicate.com/v1/predictions",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"version\": \"nightmareai/real-esrgan:f121d640bd286e1fdc67f9799164c1d5be36ff74576ee11c803ae5b665dd46aa\",\n  \"input\": {\n    \"image\": \"{{ $json.url }}\",\n    \"scale\": 2,\n    \"face_enhance\": false\n  }\n} ",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "headerParameters": {
          "parameters": [
            {
              "name": "Prefer",
              "value": "wait"
            }
          ]
        }
      },
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "94532da7-1ca5-4d71-b906-677964f0490f",
      "name": "Set GDrive Upload Folder ID",
      "type": "n8n-nodes-base.code",
      "position": [
        608,
        -928
      ],
      "parameters": {
        "jsCode": "// Set Node JavaScript Code\nconst currentItem = $input.all()[0];\nconst loopData = $node[\"Loop Over Items\"].json;\n\nreturn [{\n  json: {\n    gdriveUploadFolderId: loopData.gdriveUploadFolderId,\n    originalFilename: loopData.filename,\n    originalIndex: loopData.index\n  },\n  binary: currentItem.binary\n}];"
      },
      "typeVersion": 2
    },
    {
      "id": "711fea9d-9b12-48cb-b66f-2fa75b014142",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1568,
        -976
      ],
      "parameters": {
        "color": 4,
        "width": 304,
        "height": 368,
        "content": "## Information\n\nThis Node will Upscale Multiple Pictures from A Dataspace in Airtable \n\n1. it will create A folder in Drive\n2. it will take pictures stored in the airtable Dataspace\n3. It will run over Items to upscale in Replicate the pictures\n4. It will store the pictures in Drive\n\nPlease Upload the Pictures in Airtable in a column: PortraitFotoAuswahl "
      },
      "typeVersion": 1
    },
    {
      "id": "97297413-8022-4966-8117-944edf4736fc",
      "name": "Get Record from Pictures",
      "type": "n8n-nodes-base.airtable",
      "position": [
        -496,
        -848
      ],
      "parameters": {
        "id": "=< enter Record ID >",
        "base": {
          "__rl": true,
          "mode": "id",
          "value": ""
        },
        "table": {
          "__rl": true,
          "mode": "id",
          "value": ""
        },
        "options": {}
      },
      "credentials": {
        "airtableTokenApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "45e45d37-8afc-48a2-ab4b-557b985c9741",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -576,
        -960
      ],
      "parameters": {
        "height": 352,
        "content": "## Enter Record from Stored Data\n"
      },
      "typeVersion": 1
    },
    {
      "id": "73b660f8-f518-42d8-8970-234a956f412a",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -832,
        -960
      ],
      "parameters": {
        "height": 352,
        "content": "##  Add Folder Name"
      },
      "typeVersion": 1
    }
  ],
  "connections": {
    "Create folder": {
      "main": [
        [
          {
            "node": "Get Record from Pictures",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [],
        [
          {
            "node": "Replicate Upscaler",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download Upscale": {
      "main": [
        [
          {
            "node": "Set GDrive Upload Folder ID",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Replicate Upscaler": {
      "main": [
        [
          {
            "node": "Download Upscale",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload to Google Drive": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Record from Pictures": {
      "main": [
        [
          {
            "node": "Extract Portrait URLS from Airtable Output",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set GDrive Upload Folder ID": {
      "main": [
        [
          {
            "node": "Upload to Google Drive",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking \u2018Execute workflow\u2019": {
      "main": [
        [
          {
            "node": "Create folder",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Portrait URLS from Airtable Output": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

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

About this workflow

Automated workflow that retrieves portrait photos from Airtable, upscales them using AI, and stores the enhanced images in Google Drive with organized folder structure. Automated Folder Creation: Creates timestamped folders in Google Drive AI-Powered Upscaling: Uses Replicate's…

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

More Data & Sheets workflows → · Browse all categories →

Related workflows

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

Data & Sheets

I prepared a comprehensive guide detailing how to automate the parsing of invoices using n8n and LlamaParse, seamlessly capturing and storing vital billing information.

Google Drive, HTTP Request, Google Drive Trigger +1
Data & Sheets

Gemini - Video Analysis. Uses googleDrive, googleDriveTrigger, executeWorkflowTrigger, httpRequest. Event-driven trigger; 17 nodes.

Google Drive, Google Drive Trigger, Execute Workflow Trigger +2
Data & Sheets

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 prod

Airtable, HTTP Request, Google Drive
Data & Sheets

Lmchatopenai Workflow. Uses noOp, stickyNote, executeWorkflowTrigger, airtable. Event-driven trigger; 41 nodes.

Execute Workflow Trigger, Airtable, HTTP Request
Data & Sheets

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Airtable, HTTP Request, Google Drive +1