8
n8n 한국어amn8n.com

Google Drive와 Nano Banana API를 사용한 대량 증명 사진 변환器및增强器

고급

이것은Content Creation, Multimodal AI분야의자동화 워크플로우로, 16개의 노드를 포함합니다.주로 If, Set, Code, Wait, FormTrigger 등의 노드를 사용하며. Google Drive와 Nano Banana API를 사용한 배치 사진 변환기와 강화기

사전 요구사항
  • Google Drive API 인증 정보
  • 대상 API의 인증 정보가 필요할 수 있음
워크플로우 미리보기
노드 연결 관계를 시각적으로 표시하며, 확대/축소 및 이동을 지원합니다
워크플로우 내보내기
다음 JSON 구성을 복사하여 n8n에 가져오면 이 워크플로우를 사용할 수 있습니다
{
  "id": "1f6e5HSDWrQSzgEt",
  "meta": {
    "instanceId": "8dc97f110c3d1c4c1312bf2ee1e5a9845338284bdb271e93c73c8939c0887ef7",
    "templateCredsSetupCompleted": true
  },
  "name": "Batch ID Photo Converter & Enhancer With Google Drive & Nano Banana API",
  "tags": [],
  "nodes": [
    {
      "id": "1b27c0b9-2433-45a5-b303-96809323537d",
      "name": "생성 상태 확인",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        464,
        -32
      ],
      "parameters": {
        "url": "https://api.defapi.org/api/task/query",
        "options": {},
        "sendQuery": true,
        "sendHeaders": true,
        "authentication": "genericCredentialType",
        "genericAuthType": "httpBearerAuth",
        "queryParameters": {
          "parameters": [
            {
              "name": "task_id",
              "value": "={{$json.data.task_id}}"
            }
          ]
        },
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        }
      },
      "credentials": {
        "httpBearerAuth": {
          "id": "uZqL4UNyrG73Kntx",
          "name": "Defapi account"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "7b26f227-aaf0-4942-992d-ba03d124ebd7",
      "name": "Defapi.org API에 이미지 생성 요청 전송",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        32,
        -32
      ],
      "parameters": {
        "url": "https://api.defapi.org/api/image/gen",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"prompt\": \"{{$json.prompt}}\",\n  \"model\": \"google/nano-banana\",\n  \"images\": [\"{{ $json.image }}\"]\n}",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpBearerAuth",
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        }
      },
      "credentials": {
        "httpBearerAuth": {
          "id": "uZqL4UNyrG73Kntx",
          "name": "Defapi account"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "00981a5b-1a3e-49d3-93c5-dd2e204f20e2",
      "name": "이미지 처리 완료 대기",
      "type": "n8n-nodes-base.wait",
      "position": [
        240,
        -32
      ],
      "webhookId": "bb6c2821-9586-44b7-8606-2ee69a77ed75",
      "parameters": {
        "amount": 10
      },
      "typeVersion": 1.1
    },
    {
      "id": "9d2169f3-20a1-42a5-bb02-c75a061e8c06",
      "name": "이미지 생성 완료 여부 확인",
      "type": "n8n-nodes-base.if",
      "position": [
        688,
        -32
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "loose"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "db9a5dec-997b-4c3f-9582-37c9bbeb19ff",
              "operator": {
                "type": "string",
                "operation": "notEquals"
              },
              "leftValue": "={{ $json.data.status }}",
              "rightValue": "=pending"
            },
            {
              "id": "9352ce97-6628-4135-a8e3-35af03688d5d",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "",
              "rightValue": ""
            }
          ]
        },
        "looseTypeValidation": true
      },
      "typeVersion": 2.2
    },
    {
      "id": "1862d1cf-b65e-4839-9947-b70f666bba19",
      "name": "이미지 결과 형식화 및 표시",
      "type": "n8n-nodes-base.set",
      "position": [
        32,
        288
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "fa5f375f-cddc-4f7b-a018-67c28015d18b",
              "name": "markdown_content",
              "type": "string",
              "value": "=\n- Generation result: {{$json.data?.status}}\n  \n{{$json.data?.result?.[0]?.text}}  \n{{$json.data?.status_reason?.message}}  \n\n![Example Image]({{$json.data?.result?.[0]?.image}})"
            },
            {
              "id": "1d219e61-a59b-4156-b284-42cc42ce6f6d",
              "name": "image",
              "type": "string",
              "value": "={{$json.data?.result?.[0]?.image}}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "6dba5850-1ab2-4ffb-9160-6c780a779dbe",
      "name": "메모2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -192,
        464
      ],
      "parameters": {
        "color": 4,
        "width": 528,
        "height": 336,
        "content": "## Google Drive Input Dir\n![Image](https://i.imgur.com/7VcUtl6.jpeg)"
      },
      "typeVersion": 1
    },
    {
      "id": "59a4c0ca-baad-4378-8ab6-9817f10ddd20",
      "name": "파일 및 폴더 검색",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        256,
        -384
      ],
      "parameters": {
        "filter": {
          "folderId": {
            "__rl": true,
            "mode": "url",
            "value": "={{ $json['Google Drive - Input Folder URL'] }}"
          }
        },
        "options": {
          "fields": "={{ [\"mimeType\",\"name\",\"id\",\"webViewLink\", \"imageMediaMetadata\", \"webContentLink\", \"thumbnailLink\"] }}"
        },
        "resource": "fileFolder",
        "returnAll": true
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "ECFfMtuxT2HgQvFH",
          "name": "Google Drive account"
        }
      },
      "typeVersion": 3
    },
    {
      "id": "682a50fc-7d1d-44b2-993f-02c5bd792541",
      "name": "메모",
      "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 public"
      },
      "typeVersion": 1
    },
    {
      "id": "cf6a8583-dc11-447c-bcd0-6fe365b973af",
      "name": "폼 제출 시",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        32,
        -384
      ],
      "webhookId": "d047f428-e1d7-4b23-bef4-50db362f1d67",
      "parameters": {
        "options": {},
        "formTitle": "Set Google Drive",
        "formFields": {
          "values": [
            {
              "fieldLabel": "Google Drive - Input Folder URL",
              "requiredField": true
            },
            {
              "fieldLabel": "Google Drive - Output Folder URL",
              "requiredField": true
            },
            {
              "fieldType": "textarea",
              "fieldLabel": "Prompt",
              "placeholder": "Create a professional portrait suitable for ID documentation with proper spacing and composition.  Framing: Include the full head, complete shoulder area, and upper torso. Maintain generous margins around the subject without excessive cropping.  Outfit: Transform the existing attire into light business-casual clothing appropriate for the individual's demographics and modern style standards. Ensure the replacement garment appears natural, properly tailored, and complements the subject's overall presentation (such as professional shirt, refined blouse, contemporary blazer, or sophisticated layered separates).  Pose & Gaze: Position shoulders square to the camera, maintaining perfect frontal alignment. Direct the gaze straight ahead into the lens at identical eye height, avoiding any angular deviation in vertical or horizontal planes.  Expression: Display a professional neutral demeanor or subtle closed-lip smile that conveys confidence and authenticity.  Background: Utilize a solid, consistent light gray photographic background (color code: #d9d9d9) without any pattern, texture, or tonal variation.  Lighting & Quality: Apply balanced studio-quality illumination eliminating harsh contrast or reflective artifacts. Deliver maximum resolution imagery with precise focus and accurate natural skin color reproduction."
            }
          ]
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "0af17c30-f6fa-49f4-a9f1-44ebb337fe9f",
      "name": "JavaScript 코드",
      "type": "n8n-nodes-base.code",
      "position": [
        480,
        -384
      ],
      "parameters": {
        "jsCode": "/**\n * Encodes multiple binary files from an n8n input item into Base64 strings.\n *\n * This code assumes it is running in an n8n \"Code\" or \"Function\" node\n * where 'this' refers to the node's context and 'helpers' are available.\n *\n * @returns {object} An object containing an array of file objects,\n * each with a 'path' and 'data' (Base64 string).\n */\nconst results = [];\n\nconsole.log('---- x', $input.all())\n\nfor (const item of $input.all()) {\n  const result = {}\n  result.prompt = $('On form submission').first().json.Prompt || $(\"On form submission\").params.formFields.values[2].placeholder\n  result.image = item.json.webContentLink\n  result.name = item.json.name\n  results.push(result)\n}\n\n\n\n// Return the final object in the expected format for the next node.\nreturn results;\n"
      },
      "typeVersion": 2
    },
    {
      "id": "84851efc-02db-4557-8aeb-4a5eb01f2fa4",
      "name": "파일 업로드",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        480,
        288
      ],
      "parameters": {
        "driveId": {
          "__rl": true,
          "mode": "list",
          "value": "My Drive"
        },
        "options": {},
        "folderId": {
          "__rl": true,
          "mode": "url",
          "value": "={{ $('On form submission').item.json['Google Drive - Output Folder URL'] }}"
        }
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "ECFfMtuxT2HgQvFH",
          "name": "Google Drive account"
        }
      },
      "typeVersion": 3
    },
    {
      "id": "7d7326d2-f6e9-4b53-b2e9-896fc2fa88a0",
      "name": "HTTP 요청",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        256,
        288
      ],
      "parameters": {
        "url": "={{ $json.image }}",
        "options": {
          "response": {
            "response": {
              "responseFormat": "file"
            }
          }
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "c758902f-a550-4ba7-a94c-72e7cc798233",
      "name": "메모3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        336,
        464
      ],
      "parameters": {
        "color": 4,
        "width": 528,
        "height": 336,
        "content": "## Google Drive Output Dir\n![Image](https://i.imgur.com/j5mWcqz.jpeg)"
      },
      "typeVersion": 1
    },
    {
      "id": "e66266e6-b49c-43b5-abfa-04fef281d549",
      "name": "메모1",
      "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 all files from the input folder\n3. **Code in JavaScript** (Code Node) - Prepares image data and prompt for API request"
      },
      "typeVersion": 1
    },
    {
      "id": "a012c005-137a-4108-86c1-321a12af4a5e",
      "name": "메모4",
      "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 Completion** (Wait Node) - Waits 10 seconds before checking status\n6. **Obtain the generated status** (HTTP Request) - Polls API for completion status\n7. **Check if Image Generation is Complete** (IF Node) - Checks if status is not \"pending\""
      },
      "typeVersion": 1
    },
    {
      "id": "1bf5927f-d8d6-4b61-adac-b3868bccdd84",
      "name": "메모5",
      "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 generated image file\n10. **Upload file** (Google Drive) - Uploads the enhanced photo to the output folder"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "92598834-25e9-447c-9eac-6134da030888",
  "connections": {
    "7d7326d2-f6e9-4b53-b2e9-896fc2fa88a0": {
      "main": [
        [
          {
            "node": "84851efc-02db-4557-8aeb-4a5eb01f2fa4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "0af17c30-f6fa-49f4-a9f1-44ebb337fe9f": {
      "main": [
        [
          {
            "node": "7b26f227-aaf0-4942-992d-ba03d124ebd7",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "cf6a8583-dc11-447c-bcd0-6fe365b973af": {
      "main": [
        [
          {
            "node": "59a4c0ca-baad-4378-8ab6-9817f10ddd20",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "59a4c0ca-baad-4378-8ab6-9817f10ddd20": {
      "main": [
        [
          {
            "node": "0af17c30-f6fa-49f4-a9f1-44ebb337fe9f",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "1b27c0b9-2433-45a5-b303-96809323537d": {
      "main": [
        [
          {
            "node": "9d2169f3-20a1-42a5-bb02-c75a061e8c06",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "1862d1cf-b65e-4839-9947-b70f666bba19": {
      "main": [
        [
          {
            "node": "7d7326d2-f6e9-4b53-b2e9-896fc2fa88a0",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "00981a5b-1a3e-49d3-93c5-dd2e204f20e2": {
      "main": [
        [
          {
            "node": "1b27c0b9-2433-45a5-b303-96809323537d",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "9d2169f3-20a1-42a5-bb02-c75a061e8c06": {
      "main": [
        [
          {
            "node": "1862d1cf-b65e-4839-9947-b70f666bba19",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "00981a5b-1a3e-49d3-93c5-dd2e204f20e2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "7b26f227-aaf0-4942-992d-ba03d124ebd7": {
      "main": [
        [
          {
            "node": "00981a5b-1a3e-49d3-93c5-dd2e204f20e2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
자주 묻는 질문

이 워크플로우를 어떻게 사용하나요?

위의 JSON 구성 코드를 복사하여 n8n 인스턴스에서 새 워크플로우를 생성하고 "JSON에서 가져오기"를 선택한 후, 구성을 붙여넣고 필요에 따라 인증 설정을 수정하세요.

이 워크플로우는 어떤 시나리오에 적합한가요?

고급 - 콘텐츠 제작, 멀티모달 AI

유료인가요?

이 워크플로우는 완전히 무료이며 직접 가져와 사용할 수 있습니다. 다만, 워크플로우에서 사용하는 타사 서비스(예: OpenAI API)는 사용자 직접 비용을 지불해야 할 수 있습니다.

워크플로우 정보
난이도
고급
노드 수16
카테고리2
노드 유형8
난이도 설명

고급 사용자를 위한 16+개 노드의 복잡한 워크플로우

외부 링크
n8n.io에서 보기

이 워크플로우 공유

카테고리

카테고리: 34