{
  "name": "Batch ID photo converter & enhancer with Google Drive & Nano Banana API",
  "nodes": [
    {
      "id": "1b27c0b9-2433-45a5-b303-96809323537d",
      "name": "Obtain the generated status",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        464,
        -32
      ]
    },
    {
      "id": "7b26f227-aaf0-4942-992d-ba03d124ebd7",
      "name": "Send Image Generation Request to Defapi.org API",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        32,
        -32
      ]
    },
    {
      "id": "00981a5b-1a3e-49d3-93c5-dd2e204f20e2",
      "name": "Wait for Image Processing Completion",
      "type": "n8n-nodes-base.wait",
      "position": [
        240,
        -32
      ]
    },
    {
      "id": "9d2169f3-20a1-42a5-bb02-c75a061e8c06",
      "name": "Check if Image Generation is Complete",
      "type": "n8n-nodes-base.if",
      "position": [
        688,
        -32
      ]
    },
    {
      "id": "1862d1cf-b65e-4839-9947-b70f666bba19",
      "name": "Format and Display Image Results",
      "type": "n8n-nodes-base.set",
      "position": [
        32,
        288
      ]
    },
    {
      "id": "6dba5850-1ab2-4ffb-9160-6c780a779dbe",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -192,
        464
      ],
      "parameters": {
        "width": 528,
        "height": 336,
        "content": "## Google Drive Input Dir\n![Image](https://i.imgur.com/7VcUtl6.jpeg)"
      }
    },
    {
      "id": "59a4c0ca-baad-4378-8ab6-9817f10ddd20",
      "name": "Search files and folders",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        256,
        -384
      ]
    },
    {
      "id": "682a50fc-7d1d-44b2-993f-02c5bd792541",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -400,
        -544
      ],
      "parameters": {
        "width": 352,
        "height": 320,
        "content": "## How to use drive\n- Prepare two folders. \n  - One for input: https://drive.google.com/drive/folders/xxxxxxx\n  - One for output: https://drive.google.com/drive/folders/yyyyyy\n- Maker your folders pub"
      }
    },
    {
      "id": "cf6a8583-dc11-447c-bcd0-6fe365b973af",
      "name": "On form submission",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        32,
        -384
      ]
    },
    {
      "id": "0af17c30-f6fa-49f4-a9f1-44ebb337fe9f",
      "name": "Code in JavaScript",
      "type": "n8n-nodes-base.code",
      "position": [
        480,
        -384
      ]
    },
    {
      "id": "84851efc-02db-4557-8aeb-4a5eb01f2fa4",
      "name": "Upload file",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        480,
        288
      ]
    },
    {
      "id": "7d7326d2-f6e9-4b53-b2e9-896fc2fa88a0",
      "name": "HTTP Request",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        256,
        288
      ]
    },
    {
      "id": "c758902f-a550-4ba7-a94c-72e7cc798233",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        336,
        464
      ],
      "parameters": {
        "width": 528,
        "height": 336,
        "content": "## Google Drive Output Dir\n![Image](https://i.imgur.com/j5mWcqz.jpeg)"
      }
    },
    {
      "id": "e66266e6-b49c-43b5-abfa-04fef281d549",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -32,
        -544
      ],
      "parameters": {
        "width": 672,
        "height": 320,
        "content": "## Load Images From Google Drive Input Dir\n\n1. **On form submission** (Form Trigger) - Collects Google Drive folder URLs and optional prompt\n2. **Search files and folders** (Google Drive) - Retrieves "
      }
    },
    {
      "id": "a012c005-137a-4108-86c1-321a12af4a5e",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        -176
      ],
      "parameters": {
        "width": 880,
        "height": 288,
        "content": "## Send Image to Nano Banana API (Defapi.org)\n4. **Send Image Generation Request to Defapi.org API** (HTTP Request) - Submits generation request for each image\n5. **Wait for Image Processing Completio"
      }
    },
    {
      "id": "1bf5927f-d8d6-4b61-adac-b3868bccdd84",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        160
      ],
      "parameters": {
        "width": 880,
        "height": 288,
        "content": "## Download Images And Upload to Google Drive\n8. **Format and Display Image Results** (Set Node) - Formats result with markdown and image URL\n9. **HTTP Request** (HTTP Request) - Downloads the generat"
      }
    }
  ],
  "connections": {
    "HTTP Request": {
      "main": [
        [
          {
            "node": "Upload file",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code in JavaScript": {
      "main": [
        [
          {
            "node": "Send Image Generation Request to Defapi.org API",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "On form submission": {
      "main": [
        [
          {
            "node": "Search files and folders",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Search files and folders": {
      "main": [
        [
          {
            "node": "Code in JavaScript",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Obtain the generated status": {
      "main": [
        [
          {
            "node": "Check if Image Generation is Complete",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format and Display Image Results": {
      "main": [
        [
          {
            "node": "HTTP Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait for Image Processing Completion": {
      "main": [
        [
          {
            "node": "Obtain the generated status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check if Image Generation is Complete": {
      "main": [
        [
          {
            "node": "Format and Display Image Results",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait for Image Processing Completion",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Image Generation Request to Defapi.org API": {
      "main": [
        [
          {
            "node": "Wait for Image Processing Completion",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}