AutomationFlowsData & Sheets › A5_漫画lp_uchino_mofu

A5_漫画lp_uchino_mofu

A5_漫画LP_uchino_mofu. Uses googleSheets, googleDrive, httpRequest. Event-driven trigger; 29 nodes.

Event trigger★★★★☆ complexity29 nodesGoogle SheetsGoogle DriveHTTP Request
Data & Sheets Trigger: Event Nodes: 29 Complexity: ★★★★☆ Added:

This workflow follows the Google Drive → Google Sheets 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": "A5_\u6f2b\u753bLP_uchino_mofu",
  "nodes": [
    {
      "parameters": {},
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        7728,
        1264
      ],
      "id": "07539cd8-951e-457b-a02e-24665e92d73a",
      "name": "\u624b\u52d5\u5b9f\u884c"
    },
    {
      "parameters": {
        "jsCode": "// === drive_link\u304b\u3089Google Drive\u30d5\u30a1\u30a4\u30ebID\u3092\u62bd\u51fa ===\n// URL\u4f8b: https://drive.google.com/uc?export=download&id=1LSuPuhQL4LSq83crVCrFp4qfc3lQ9Us\n// \u62bd\u51fa\u7d50\u679c: 1LSuPuhQL4LSq83crVCrFp4qfc3lQ9Us\n\nconst data = $input.first().json;\nconst driveLink = data.drive_link || '';\n\nlet fileId = '';\nif (driveLink.includes('id=')) {\n  fileId = driveLink.split('id=').pop().split('&')[0];\n} else if (driveLink.includes('/d/')) {\n  // https://drive.google.com/file/d/FILE_ID/view \u5f62\u5f0f\u306b\u3082\u5bfe\u5fdc\n  fileId = driveLink.split('/d/')[1].split('/')[0];\n} else {\n  // drive_link\u81ea\u4f53\u304c\u30d5\u30a1\u30a4\u30ebID\u306e\u5834\u5408\n  fileId = driveLink;\n}\n\nreturn [{ json: { ...data, drive_file_id: fileId } }];"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        8592,
        1264
      ],
      "id": "73b1e9e8-a096-4542-ad82-3a4aecb12960",
      "name": "\u30d5\u30a1\u30a4\u30ebID\u62bd\u51fa"
    },
    {
      "parameters": {
        "jsCode": "// \u2605\u2605\u2605 \u3053\u3053\u306b\u51e6\u7406\u3057\u305f\u3044JAN\u30b3\u30fc\u30c9\u3092\u6307\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044 \u2605\u2605\u2605\n// 1\u4ef6: ['4902397855781']\n// \u8907\u6570: ['4902397855781', '4902397855798', '4902397855804']\n\nconst janList = [\n  '4972468011170'\n];\n\n// 1\u4ef6\u305a\u3064\u30a2\u30a4\u30c6\u30e0\u3068\u3057\u3066\u51fa\u529b\uff08\u5f8c\u7d9a\u3067SS\u691c\u7d22\u2192\u753b\u50cfDL\u2192\u6f2b\u753b\u751f\u6210\u3092\u30eb\u30fc\u30d7\uff09\nreturn janList.map(jan => ({ json: { jan_code: jan } }));"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        8096,
        1264
      ],
      "id": "bbb96c71-4dd4-407a-93f8-15f2eebdd9b6",
      "name": "JAN\u6307\u5b9a1"
    },
    {
      "parameters": {
        "documentId": {
          "__rl": true,
          "value": "1V8qgsEn5OdNZIrSJPxs3ZaKfKpL-oldmPCIyxPIFF6Q",
          "mode": "list",
          "cachedResultName": "\u5546\u54c1\u30fb\u5e97\u8217\u30de\u30b9\u30bf_20260305",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1V8qgsEn5OdNZIrSJPxs3ZaKfKpL-oldmPCIyxPIFF6Q/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": 1655492668,
          "mode": "list",
          "cachedResultName": "\u30c6\u30ad\u30b9\u30c8\u5b8c\u6210\u54c1",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1V8qgsEn5OdNZIrSJPxs3ZaKfKpL-oldmPCIyxPIFF6Q/edit#gid=1655492668"
        },
        "filtersUI": {
          "values": [
            {
              "lookupColumn": "product_id",
              "lookupValue": "={{ $json.jan_code }}"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        8304,
        1264
      ],
      "id": "bd6265bb-d6fa-4ba8-b219-6338f4c5889a",
      "name": "SS-03\u5546\u54c1\u30c7\u30fc\u30bf\u53d6\u5f972",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "operation": "download",
        "fileId": {
          "__rl": true,
          "value": "={{ $json.drive_file_id }}",
          "mode": "id"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleDrive",
      "typeVersion": 3,
      "position": [
        8704,
        1264
      ],
      "id": "3dcbb6f6-d7a6-4577-9354-a79a39b724a1",
      "name": "\u767d\u629c\u304d\u753b\u50cfDL1",
      "credentials": {
        "googleDriveOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "jsCode": "// === SS-01\u30c6\u30ad\u30b9\u30c8\u5b8c\u6210\u54c1 + SS-03 uchino_mofu + \u767d\u629c\u304d\u753b\u50cfBase64 \u3092\u7d71\u5408 ===\n// SS-03\u5546\u54c1\u30c7\u30fc\u30bf\u53d6\u5f97 = SS-01 \u30c6\u30ad\u30b9\u30c8\u5b8c\u6210\u54c1\uff08A2\u30c6\u30ad\u30b9\u30c8\u30c7\u30fc\u30bf\uff09\n// SS-03\u5546\u54c1\u30c7\u30fc\u30bf\u53d6\u5f971 = SS-03 uchino_mofu\uff08drive_link\u7b49\uff09\n\nconst ssTextData = $('SS-03\u5546\u54c1\u30c7\u30fc\u30bf\u53d6\u5f972').first().json;\nconst ssDriveData = $('SS-03\u5546\u54c1\u30c7\u30fc\u30bf\u53d6\u5f973').first().json;\nconst janInput = $('JAN\u6307\u5b9a1').first().json;\n\n// \u767d\u629c\u304d\u753b\u50cf\u3092Base64\u306b\u5909\u63db\uff08binaryMode:separate\u3067\u3082\u52d5\u4f5c\u3059\u308b\u65b9\u6cd5\uff09\nlet packageBase64 = '';\nlet packageMime = 'image/jpeg';\ntry {\n  const binaryBuffer = await this.helpers.getBinaryDataBuffer(0, 'data');\n  packageBase64 = binaryBuffer.toString('base64');\n  packageMime = $input.first().binary?.data?.mimeType || 'image/jpeg';\n} catch(e) {\n  // \u30d5\u30a9\u30fc\u30eb\u30d0\u30c3\u30af: \u76f4\u63a5\u30a2\u30af\u30bb\u30b9\n  const binary = $input.first().binary;\n  if (binary && binary.data && binary.data.data && binary.data.data.length > 100) {\n    packageBase64 = binary.data.data;\n    packageMime = binary.data.mimeType || 'image/jpeg';\n  }\n}\n\n// target_animal\u63a8\u5b9a: product_name\u3084category\u304b\u3089\u5224\u5b9a\nconst name = (ssTextData.product_name || '').toLowerCase();\nconst cat = (ssTextData.category || '').toLowerCase();\nlet targetAnimal = '\u72ac'; // \u30c7\u30d5\u30a9\u30eb\u30c8\nif (name.includes('\u732b') || name.includes('\u30ad\u30e3\u30c3\u30c8') || cat.includes('\u732b') || cat.includes('cat')) {\n  targetAnimal = '\u732b';\n} else if (name.includes('\u9ce5') || name.includes('\u30a4\u30f3\u30b3') || cat.includes('\u9ce5') || cat.includes('bird')) {\n  targetAnimal = '\u9ce5';\n} else if (name.includes('\u30cf\u30e0\u30b9\u30bf\u30fc') || name.includes('\u5c0f\u52d5\u7269') || cat.includes('\u5c0f\u52d5\u7269')) {\n  targetAnimal = '\u5c0f\u52d5\u7269';\n} else if (name.includes('\u9b5a') || name.includes('\u30e1\u30c0\u30ab') || name.includes('\u91d1\u9b5a') || cat.includes('\u9b5a')) {\n  targetAnimal = '\u9b5a';\n} else if (name.includes('\u722c\u866b\u985e') || name.includes('\u30c8\u30ab\u30b2') || name.includes('\u30ab\u30e1') || cat.includes('\u722c\u866b\u985e')) {\n  targetAnimal = '\u722c\u866b\u985e';\n}\n\n// JAN: JAN\u6307\u5b9a\u30ce\u30fc\u30c9\u306e\u5024\u3092\u512a\u5148\nconst jan = janInput.jan_code || ssTextData.product_id || ssTextData.id || '';\n\nreturn [{\n  json: {\n    // \u5546\u54c1\u8b58\u5225\n    id: ssTextData.product_id || jan,\n    jan: jan,\n    product_name: ssTextData.product_name || '',\n    category: ssTextData.category || '',\n    target_animal: targetAnimal,\n    shop: ssDriveData.shop || ssTextData.shop || 'uchino_mofu',\n    // A2\u51fa\u529b\u30c6\u30ad\u30b9\u30c8\uff08SS-01 \u30c6\u30ad\u30b9\u30c8\u5b8c\u6210\u54c1\u304b\u3089\uff09\n    catchcopy: ssTextData.catchcopy || '',\n    problem1: ssTextData.problem1 || '',\n    problem2: ssTextData.problem2 || '',\n    problem3: ssTextData.problem3 || '',\n    feature_short1: ssTextData.feature_short1 || '',\n    feature_short2: ssTextData.feature_short2 || '',\n    feature_short3: ssTextData.feature_short3 || '',\n    rakuten_features1: ssTextData.rakuten_features1 || '',\n    rakuten_features2: ssTextData.rakuten_features2 || '',\n    rakuten_features3: ssTextData.rakuten_features3 || '',\n    // \u30c7\u30b6\u30a4\u30f3\u60c5\u5831\n    main_color: ssTextData.main_color || ssDriveData.main_color || '',\n    background_color: ssTextData.background_color || ssDriveData.background_color || '',\n    // \u767d\u629c\u304d\u753b\u50cf\uff08Base64\uff09\n    package_base64: packageBase64,\n    package_mime: packageMime,\n    // Drive\u60c5\u5831\uff08SS-03 uchino_mofu\u304b\u3089\uff09\n    drive_link: ssDriveData.drive_link || ''\n  }\n}];"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        8912,
        1264
      ],
      "id": "dfe98304-38e8-4a13-a264-001907756d0c",
      "name": "\u30c7\u30fc\u30bf\u7d71\u54081"
    },
    {
      "parameters": {
        "jsCode": "// === A2\u51fa\u529b \u2192 \u6f2b\u753b\u811a\u672c\u5909\u63db\u30d7\u30ed\u30f3\u30d7\u30c8\u7d44\u7acb ===\n// \u30ea\u30c8\u30e9\u30a4\u6642\u306f\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3NG\u7406\u7531 or \u30ea\u30fc\u30ac\u30ebNG\u7406\u7531\u3092\u542b\u3081\u3066\u518d\u751f\u6210\n// \u2605 \u30ea\u30c8\u30e9\u30a4\u6642\u306fDiscord HTTP\u5fdc\u7b54\u304c$input\u306b\u6765\u308b\u305f\u3081\u3001\u5e38\u306b\u30c7\u30fc\u30bf\u7d71\u54081\u304b\u3089\u53d6\u5f97\n\nconst data = $('\u30c7\u30fc\u30bf\u7d71\u54081').first().json;\n\n// === \u30ea\u30c8\u30e9\u30a4\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u53d6\u5f97 ===\nlet retryContext = '';\ntry {\n  const prev = $('3b_\u811a\u672c\u30d1\u30fc\u30b9+\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3').first().json;\n  if (prev) {\n    if (!prev._validation_success && prev._validation_violations) {\n      const v = prev._validation_violations;\n      retryContext += `\\n\\n\u3010\u91cd\u8981\uff1a\u524d\u56de\uff08${prev._total_attempts}\u56de\u76ee\uff09\u306e\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u3067\u4ee5\u4e0b\u306e\u554f\u984c\u304c\u691c\u51fa\u3055\u308c\u307e\u3057\u305f\u3002\u5fc5\u305a\u4fee\u6b63\u3057\u3066\u304f\u3060\u3055\u3044\u3011\\n${v.join('\\n')}\\n`;\n    }\n    try {\n      const legal = $('4b_\u30ea\u30fc\u30ac\u30eb\u7d50\u679c\u30d1\u30fc\u30b9').first().json;\n      if (legal && !legal.legal_ok && legal.legal_issues) {\n        const issues = legal.legal_issues.map(i =>\n          `\u30b3\u30de${i.koma}: \u300c${i.text}\u300d\u2192 NG\u7406\u7531: ${i.reason}\u3001\u4fee\u6b63\u6848: ${i.suggestion}`\n        ).join('\\n');\n        retryContext += `\\n\\n\u3010\u91cd\u8981\uff1a\u524d\u56de\uff08${prev._total_attempts}\u56de\u76ee\uff09\u306e\u30ea\u30fc\u30ac\u30eb\u30c1\u30a7\u30c3\u30af\u3067\u4ee5\u4e0b\u306e\u554f\u984c\u304c\u691c\u51fa\u3055\u308c\u307e\u3057\u305f\u3002\u5fc5\u305a\u4fee\u6b63\u3057\u3066\u304f\u3060\u3055\u3044\u3011\\n${issues}\\n\u4e0a\u8a18\u306e\u8868\u73fe\u306f\u7d76\u5bfe\u306b\u4f7f\u308f\u305a\u3001\u5b89\u5168\u306a\u8868\u73fe\u306b\u8a00\u3044\u63db\u3048\u3066\u304f\u3060\u3055\u3044\u3002\\n`;\n      }\n    } catch(e) {}\n  }\n} catch(e) {}\n\n// === \u5bfe\u8c61\u52d5\u7269\u306b\u5408\u308f\u305b\u30662\u5339\u30da\u30a2\u3092\u8a2d\u5b9a ===\nconst animal = (data.target_animal || '\u72ac').trim();\n\nconst duoChars = {\n  '\u72ac': {\n    char1: { name: '\u3061\u3073\u307e\u308b', breed: '\u30c8\u30a4\u30d7\u30fc\u30c9\u30eb\uff08\u30a2\u30d7\u30ea\u30b3\u30c3\u30c8\u8272\uff09', trait: '\u597d\u5947\u5fc3\u65fa\u76db\u3001\u65b0\u3057\u3044\u3082\u306e\u597d\u304d' },\n    char2: { name: '\u3082\u3053', breed: '\u67f4\u72ac\uff08\u8d64\u6bdb\uff09', trait: '\u614e\u91cd\u6d3e\u3001\u3067\u3082\u7d50\u5c40\u3064\u3089\u308c\u308b' }\n  },\n  '\u732b': {\n    char1: { name: '\u307f\u3051', breed: '\u4e09\u6bdb\u732b\uff08\u767d\u8336\u9ed2\uff09', trait: '\u6c17\u307e\u3050\u308c\u3001\u30b0\u30eb\u30e1' },\n    char2: { name: '\u304f\u308d', breed: '\u9ed2\u732b', trait: '\u7518\u3048\u3093\u574a\u3001\u98df\u3044\u3057\u3093\u574a' }\n  },\n  '\u9ce5': {\n    char1: { name: '\u3074\u30fc\u3061\u3083\u3093', breed: '\u30bb\u30ad\u30bb\u30a4\u30a4\u30f3\u30b3\uff08\u9ec4\u7dd1\uff09', trait: '\u304a\u3057\u3083\u3079\u308a\u3001\u305b\u3063\u304b\u3061' },\n    char2: { name: '\u3053\u3068\u308a', breed: '\u6587\u9ce5\uff08\u767d\uff09', trait: '\u30de\u30a4\u30da\u30fc\u30b9\u3001\u306e\u3093\u3073\u308a' }\n  },\n  '\u9b5a': {\n    char1: { name: '\u304d\u3093\u3061\u3083\u3093', breed: '\u91d1\u9b5a\uff08\u7409\u91d1\uff09', trait: '\u306e\u3093\u3073\u308a\u5c4b' },\n    char2: { name: '\u3059\u3044\u3059\u3044', breed: '\u30e1\u30c0\u30ab', trait: '\u3059\u3070\u3057\u3063\u3053\u3044\u3001\u597d\u5947\u5fc3\u65fa\u76db' }\n  },\n  '\u5c0f\u52d5\u7269': {\n    char1: { name: '\u3082\u3075\u307e\u308b', breed: '\u30cf\u30e0\u30b9\u30bf\u30fc\uff08\u30b4\u30fc\u30eb\u30c7\u30f3\uff09', trait: '\u307b\u3063\u307a\u306b\u8a70\u3081\u8fbc\u3080\u3001\u98df\u3044\u3057\u3093\u574a' },\n    char2: { name: '\u3053\u308d\u3093', breed: '\u30cf\u30e0\u30b9\u30bf\u30fc\uff08\u30b8\u30e3\u30f3\u30ac\u30ea\u30a2\u30f3\uff09', trait: '\u5c0f\u3055\u304f\u3066\u3059\u3070\u3057\u3063\u3053\u3044' }\n  },\n  '\u722c\u866b\u985e': {\n    char1: { name: '\u30ec\u30aa\u304f\u3093', breed: '\u30d2\u30e7\u30a6\u30e2\u30f3\u30c8\u30ab\u30b2\u30e2\u30c9\u30ad', trait: '\u306e\u3093\u3073\u308a\u3001\u307e\u3070\u305f\u304d\u304c\u304b\u308f\u3044\u3044' },\n    char2: { name: '\u30ab\u30e1\u304d\u3061', breed: '\u30ea\u30af\u30ac\u30e1', trait: '\u30de\u30a4\u30da\u30fc\u30b9\u306e\u6975\u307f' }\n  }\n};\n\nconst duo = duoChars[animal] || duoChars['\u72ac'];\nconst c1 = duo.char1;\nconst c2 = duo.char2;\n\nconst prompt = `\u3042\u306a\u305f\u306f\u30da\u30c3\u30c8\u7528\u54c1EC\u30b5\u30a4\u30c8\u300cuchino mofu\u300d\u306e4\u30b3\u30de\u6f2b\u753b\u4f5c\u5bb6\u3067\u3059\u3002\n\u4ee5\u4e0b\u306e\u5546\u54c1\u60c5\u5831\u3092\u3082\u3068\u306b\u3001\u52d5\u7269\u30ad\u30e3\u30e92\u5339\u306e\u639b\u3051\u5408\u3044\u30674\u30b3\u30de\u6f2b\u753b\u306e\u811a\u672c\u30921\u672c\u4f5c\u3063\u3066\u304f\u3060\u3055\u3044\u3002\n\u203b\u4eba\u9593\u306f\u767b\u5834\u3057\u307e\u305b\u3093\u3002\u52d5\u7269\u540c\u58eb\u306e\u4f1a\u8a71\u3067\u9032\u884c\u3057\u307e\u3059\u3002\n\n\u3010\u30ad\u30e3\u30e9\u30af\u30bf\u30fc\uff082\u5339\uff09\u3011\n- ${c1.name}\uff08${c1.breed}\uff09\uff1a${c1.trait}\n- ${c2.name}\uff08${c2.breed}\uff09\uff1a${c2.trait}\n\n\u30102\u5339\u306e\u95a2\u4fc2\u3011\n\u540c\u3058\u5bb6\u3067\u66ae\u3089\u3059\u4ef2\u826f\u3057\u30da\u30a2\u3002\u6027\u683c\u306f\u5bfe\u7167\u7684\u3060\u304c\u3001\u304a\u4e92\u3044\u5927\u597d\u304d\u3002\n\n\u3010\u5546\u54c1\u60c5\u5831\uff08\u30ea\u30fc\u30ac\u30eb\u30c1\u30a7\u30c3\u30af\u6e08\u307f\uff09\u3011\n\u5546\u54c1\u540d\uff1a${data.product_name || ''}\n\u30ab\u30c6\u30b4\u30ea\uff1a${data.category || ''}\n\u5bfe\u8c61\u52d5\u7269\uff1a${animal}\n\u30ad\u30e3\u30c3\u30c1\u30b3\u30d4\u30fc\uff1a${data.catchcopy || ''}\n\u304a\u60a9\u307f1\uff1a${data.problem1 || ''}\n\u304a\u60a9\u307f2\uff1a${data.problem2 || ''}\n\u304a\u60a9\u307f3\uff1a${data.problem3 || ''}\n\u7279\u5fb41\uff1a${data.feature_short1 || ''}\n\u7279\u5fb42\uff1a${data.feature_short2 || ''}\n\u7279\u5fb43\uff1a${data.feature_short3 || ''}\n\u304a\u3059\u3059\u30811\uff1a${data.rakuten_features1 || ''}\n${retryContext}\n\u3010\u811a\u672c\u30eb\u30fc\u30eb\u3011\n- 4\u30b3\u30de\u5f62\u5f0f\uff08\u8d77\u30fb\u627f\u30fb\u8ee2\u30fb\u7d50\uff09\n- \u30bb\u30ea\u30d5\u306f1\u30b3\u30de2\u3064\u307e\u3067\u3002\u52d5\u7269\u540c\u58eb\u306e\u81ea\u7136\u306a\u4f1a\u8a71\n- \u5546\u54c1\u306e\u52b9\u80fd\u30fb\u52b9\u679c\u3092\u65ad\u5b9a\u3057\u306a\u3044\uff08\u30ea\u30fc\u30ac\u30eb\u6e08\u307f\u306e\u8868\u73fe\u3092\u30d9\u30fc\u30b9\u306b\uff09\n- \u300c\u6cbb\u308b\u300d\u300c\u52b9\u304f\u300d\u300c\u6539\u5584\u300d\u300c\u30b5\u30dd\u30fc\u30c8\u300d\u300c\u30b1\u30a2\u300d\u7b49\u306eNG\u30ef\u30fc\u30c9\u306f\u7d76\u5bfe\u4f7f\u308f\u306a\u3044\n- 2\u5339\u306e\u6027\u683c\u5dee\u3092\u6d3b\u304b\u3057\u305f\u639b\u3051\u5408\u3044\uff08\u30dc\u30b1\u3068\u30c4\u30c3\u30b3\u30df\u3001\u7a4d\u6975\u6d3e\u3068\u614e\u91cd\u6d3e\u306a\u3069\uff09\n- \u6700\u5f8c\u306e\u30b3\u30de\u3067\u5546\u54c1\u540d\u307e\u305f\u306f\u30ad\u30e3\u30c3\u30c1\u30b3\u30d4\u30fc\u3092\u5165\u308c\u308b\n- \u6e29\u304b\u304f\u307b\u3063\u3053\u308a\u3057\u305f\u30c8\u30fc\u30f3\n\n\u3010\u51fa\u529b\u5f62\u5f0f\u3011\u5fc5\u305aJSON\u5f62\u5f0f\u306e\u307f\u3067\u8fd4\u3057\u3066\u304f\u3060\u3055\u3044\u3002\n{\n  \"title\": \"4\u30b3\u30de\u306e\u30bf\u30a4\u30c8\u30eb\uff0810\u6587\u5b57\u4ee5\u5185\uff09\",\n  \"char1_name\": \"${c1.name}\",\n  \"char1_breed\": \"${c1.breed}\",\n  \"char2_name\": \"${c2.name}\",\n  \"char2_breed\": \"${c2.breed}\",\n  \"koma\": [\n    {\n      \"num\": 1, \"label\": \"\u8d77\",\n      \"scene\": \"\u5834\u9762\u306e\u8aac\u660e\uff08\u80cc\u666f\u30fb\u72b6\u6cc1\u3092\u5177\u4f53\u7684\u306b\uff09\",\n      \"characters\": \"\u767b\u5834\u30ad\u30e3\u30e9\uff08${c1.name}/${c2.name}/\u4e21\u65b9\uff09\",\n      \"dialog\": [\"${c1.name}\uff1a\u30bb\u30ea\u30d5\", \"${c2.name}\uff1a\u30bb\u30ea\u30d5\"],\n      \"expression\": \"\u8868\u60c5\u30fb\u52d5\u4f5c\u306e\u6307\u793a\"\n    },\n    { \"num\": 2, \"label\": \"\u627f\", \"scene\": \"\", \"characters\": \"\", \"dialog\": [\"\"], \"expression\": \"\" },\n    { \"num\": 3, \"label\": \"\u8ee2\", \"scene\": \"\", \"characters\": \"\", \"dialog\": [\"\"], \"expression\": \"\" },\n    { \"num\": 4, \"label\": \"\u7d50\", \"scene\": \"\", \"characters\": \"\", \"dialog\": [\"\"], \"expression\": \"\" }\n  ]\n}`;\n\nreturn [{\n  json: {\n    ...data,\n    manga_prompt: prompt,\n    char1_name: c1.name,\n    char1_breed: c1.breed,\n    char2_name: c2.name,\n    char2_breed: c2.breed\n  }\n}];"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        9120,
        1264
      ],
      "id": "5ad040a6-6406-4771-a58a-501230e0dd3e",
      "name": "\u6f2b\u753b\u811a\u672c\u30d7\u30ed\u30f3\u30d7\u30c8\u7d44\u7acb"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash:generateContent",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"contents\": [{\n    \"parts\": [{\n      \"text\": {{ JSON.stringify($json.manga_prompt) }}\n    }]\n  }],\n  \"generationConfig\": {\n    \"responseMimeType\": \"application/json\"\n  }\n}",
        "options": {
          "timeout": 30000
        }
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        9296,
        1264
      ],
      "id": "2c7048f2-e698-4b5c-86f3-09584ea4f14c",
      "name": "\u6f2b\u753b\u811a\u672c\u751f\u6210\uff08Gemini Flash\uff09",
      "retryOnFail": true,
      "maxTries": 3,
      "waitBetweenTries": 5000,
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "jsCode": "// === 3b: \u811a\u672cJSON\u30d1\u30fc\u30b9 + \u69cb\u9020\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3 + \u7981\u6b62\u30ef\u30fc\u30c9\u76f4\u63a5\u30c1\u30a7\u30c3\u30af ===\n\nconst response = $input.first().json;\nconst productData = $('\u6f2b\u753b\u811a\u672c\u30d7\u30ed\u30f3\u30d7\u30c8\u7d44\u7acb').first().json;\n\nlet totalAttempts = 0;\ntry {\n  totalAttempts = $('3b_\u811a\u672c\u30d1\u30fc\u30b9+\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3').first().json._total_attempts || 0;\n} catch(e) {}\ntotalAttempts += 1;\n\nconst text = response.candidates?.[0]?.content?.parts?.[0]?.text || '';\nlet script = null;\ntry {\n  script = JSON.parse(text.replace(/```json|```/g, '').trim());\n} catch(e) {\n  const match = text.match(/\\{[\\s\\S]*\\}/);\n  if (match) { try { script = JSON.parse(match[0]); } catch(e2) {} }\n}\n\nconst violations = [];\nconst missing = [];\n\nif (!script || !script.koma) {\n  violations.push('JSON\u30d1\u30fc\u30b9\u5931\u6557\u307e\u305f\u306fkoma\u914d\u5217\u306a\u3057');\n} else {\n  if (!script.title) missing.push('title');\n  if (script.title && script.title.length > 15) violations.push(`\u30bf\u30a4\u30c8\u30eb\u304c\u9577\u3059\u304e: ${script.title.length}\u6587\u5b57\uff0810\u6587\u5b57\u4ee5\u5185\uff09`);\n  if (!Array.isArray(script.koma) || script.koma.length !== 4) {\n    violations.push(`\u30b3\u30de\u6570\u304c\u4e0d\u6b63: ${script.koma ? script.koma.length : 0}\uff084\u3064\u5fc5\u8981\uff09`);\n  } else {\n    for (let i = 0; i < 4; i++) {\n      const k = script.koma[i];\n      if (!k.scene || k.scene.trim() === '') missing.push(`\u30b3\u30de${i+1}.scene`);\n      if (!k.dialog || !Array.isArray(k.dialog) || k.dialog.length === 0) missing.push(`\u30b3\u30de${i+1}.dialog`);\n      if (k.dialog && k.dialog.length > 2) violations.push(`\u30b3\u30de${i+1}: \u30bb\u30ea\u30d5${k.dialog.length}\u500b\uff08\u6700\u59272\u3064\uff09`);\n      if (!k.expression || k.expression.trim() === '') missing.push(`\u30b3\u30de${i+1}.expression`);\n      if (!k.characters || k.characters.trim() === '') missing.push(`\u30b3\u30de${i+1}.characters`);\n    }\n  }\n\n  if (script.koma && script.koma.length === 4) {\n    const allText = script.koma.map(k =>\n      [...(k.dialog || []), k.scene || '', k.expression || ''].join(' ')\n    ).join(' ');\n    const ngWords = [\n      '\u6cbb\u308b','\u6cbb\u3059','\u6cbb\u7642','\u6539\u5584','\u8efd\u6e1b','\u7de9\u548c','\u56de\u5fa9','\u89e3\u6d88','\u52b9\u304f','\u52b9\u80fd','\u4e88\u9632','\u9632\u3050','\u6291\u5236',\n      '\u5065\u5eb7\u7dad\u6301','\u5065\u3084\u304b','\u514d\u75ab','\u30a2\u30ec\u30eb\u30ae\u30fc','\u6d3b\u529b','\u82e5\u3005\u3057\u3044',\n      '\u95a2\u7bc0\u30b1\u30a2','\u6bdb\u4e26\u307f\u30b1\u30a2','\u6bdb\u8276\u30a2\u30c3\u30d7','\u6d88\u5316\u30b5\u30dd\u30fc\u30c8','\u8178\u5185\u74b0\u5883','\u514d\u75ab\u30b5\u30dd\u30fc\u30c8','\u4f53\u91cd\u7ba1\u7406','\u30c7\u30f3\u30bf\u30eb\u30b1\u30a2',\n      '\u6b6f\u57a2','\u6b6f\u77f3','\u53e3\u81ed','\u6b6f\u5468',\n      '\u6804\u990a\u30d0\u30e9\u30f3\u30b9','\u30c0\u30a4\u30a8\u30c3\u30c8','\u6b6f\u78e8\u304d\u52b9\u679c','\u53e3\u81ed\u4e88\u9632','\u6c34\u5206\u88dc\u7d66',\n      '\u65e5\u672c\u4e00','\u4e16\u754c\u4e00','No.1','\u6700\u9ad8','\u6700\u5f37','\u7a76\u6975'\n    ];\n    const found = ngWords.filter(w => allText.includes(w));\n    if (found.length > 0) violations.push(`\u7981\u6b62\u30ef\u30fc\u30c9\u691c\u51fa: ${found.join(', ')}`);\n  }\n}\n\nif (missing.length > 0) violations.push(`\u5fc5\u9808\u30d5\u30a3\u30fc\u30eb\u30c9\u6b20\u843d: ${missing.join(', ')}`);\n\nconst hasViolations = violations.length > 0;\nconst needsRetry = hasViolations && totalAttempts < 9;\n\nreturn [{\n  json: {\n    ...productData,\n    script: script,\n    _total_attempts: totalAttempts,\n    _needs_retry: needsRetry,\n    _validation_success: !hasViolations,\n    _validation_violations: violations,\n    _validation_missing: missing\n  }\n}];"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        9600,
        1264
      ],
      "id": "d0fe1df9-d7e6-4baf-a3ac-788342bd6db8",
      "name": "3b_\u811a\u672c\u30d1\u30fc\u30b9+\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict"
          },
          "conditions": [
            {
              "id": "val-ok",
              "leftValue": "={{ $json._validation_success }}",
              "rightValue": true,
              "operator": {
                "type": "boolean",
                "operation": "equals",
                "singleValue": true
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        9904,
        1264
      ],
      "id": "fa3d152c-6699-4c26-b107-bb7e703928ca",
      "name": "3c_\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3OK?"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://discord.com/api/webhooks/1484433590032011366/vzrpLxqa31qS_GFLTEbsqn2GYzIpBjCrp4zCs0Hz38ki1FvL04uV1edZTSsG99KMWKby",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={{ JSON.stringify({ content: \"\u26a0\ufe0f **\u6f2b\u753b\u811a\u672c\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3NG**\\n\\n\ud83d\udce6 \u5546\u54c1\uff1a\" + ($json.product_name || \"\") + \"\\n\ud83d\udd04 \u8a66\u884c\u56de\u6570\uff1a\" + ($json._total_attempts || 1) + \"\u56de\u76ee\\n\\n\u274c \u554f\u984c\u70b9\uff1a\\n\" + (($json._validation_violations || []).join(\"\\n\")) + \"\\n\\n\" + ($json._needs_retry ? \"\ud83d\udd01 \u81ea\u52d5\u30ea\u30c8\u30e9\u30a4\u3057\u307e\u3059\" : \"\u274c \u30ea\u30c8\u30e9\u30a4\u4e0a\u9650\u3002\u30ea\u30fc\u30ac\u30eb\u30c1\u30a7\u30c3\u30af\u306b\u9032\u307f\u307e\u3059\") }) }}",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        10224,
        1440
      ],
      "id": "3ff9fd13-d955-46b9-963b-fd890a75d2e7",
      "name": "3d_Discord_\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3NG"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict"
          },
          "conditions": [
            {
              "id": "retry-val",
              "leftValue": "={{ $('3b_\u811a\u672c\u30d1\u30fc\u30b9+\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3').first().json._needs_retry }}",
              "rightValue": true,
              "operator": {
                "type": "boolean",
                "operation": "equals",
                "singleValue": true
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        10496,
        1456
      ],
      "id": "5d6c367a-7bd8-4d8f-9218-f069015acf92",
      "name": "3e_\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u30ea\u30c8\u30e9\u30a4?"
    },
    {
      "parameters": {
        "jsCode": "// === 4a: \u30ea\u30fc\u30ac\u30eb\u30c1\u30a7\u30c3\u30af\u6e96\u5099 ===\n// \u2605 3e\u7d4c\u7531(Discord\u5fdc\u7b54)\u3067\u3082\u6b63\u3057\u3044\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3059\u308b\u305f\u3081\u30013b\u304b\u3089\u76f4\u63a5\u53c2\u7167\nconst data = $('3b_\u811a\u672c\u30d1\u30fc\u30b9+\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3').first().json;\nconst script = data.script;\n\nif (!script || !script.koma) {\n  return [{ json: { ...data, legal_prompt: '', _skip_legal: true } }];\n}\n\nconst allTexts = script.koma.map(k => {\n  const dialogs = (k.dialog || []).join('\\n');\n  return `\u3010\u30b3\u30de${k.num} ${k.label}\u3011\\n\u30bb\u30ea\u30d5: ${dialogs}\\n\u5834\u9762: ${k.scene}`;\n}).join('\\n\\n');\n\nconst legalPrompt = `\u4ee5\u4e0b\u306e\u6f2b\u753b\u30bb\u30ea\u30d5\u30fb\u5834\u9762\u8aac\u660e\u3092EC\u6cd5\u898f\uff08\u85ac\u6a5f\u6cd5\u30fb\u666f\u8868\u6cd5\u30fb\u5065\u5897\u6cd5\uff09\u306e\u89b3\u70b9\u3067\u30c1\u30a7\u30c3\u30af\u3057\u3066\u304f\u3060\u3055\u3044\u3002\\n\\n\u3010\u30c1\u30a7\u30c3\u30af\u5bfe\u8c61\u30c6\u30ad\u30b9\u30c8\u3011\\n${allTexts}\\n\\n\u3010\u5373NG\u8868\u73fe\uff08\u30ab\u30c6\u30b4\u30ea\u5225\uff09\u3011\\n(A) \u52b9\u80fd\u52b9\u679c\u306e\u65ad\u5b9a: \u6cbb\u308b\u3001\u6cbb\u3059\u3001\u6cbb\u7642\u3001\u6539\u5584\u3001\u8efd\u6e1b\u3001\u7de9\u548c\u3001\u56de\u5fa9\u3001\u89e3\u6d88\u3001\u52b9\u304f\u3001\u52b9\u80fd\u3001\u4e88\u9632\u3001\u9632\u3050\u3001\u6291\u5236\\n(B) \u5065\u5eb7\u30ef\u30fc\u30c9: \u5065\u5eb7\u3001\u5065\u5eb7\u7dad\u6301\u3001\u5065\u3084\u304b\u3001\u30b5\u30dd\u30fc\u30c8\uff08\u5065\u5eb7\u6587\u8108\uff09\u3001\u5143\u6c17\u3001\u6d3b\u529b\u3001\u82e5\u3005\u3057\u3044\\n(C) \u30da\u30c3\u30c8\u5065\u5eb7\u8868\u73fe: \u95a2\u7bc0\u30b1\u30a2\u3001\u6bdb\u4e26\u307f\u30b1\u30a2\u3001\u6bdb\u8276\u30a2\u30c3\u30d7\u3001\u6d88\u5316\u30b5\u30dd\u30fc\u30c8\u3001\u8178\u5185\u74b0\u5883\u3001\u514d\u75ab\u30b5\u30dd\u30fc\u30c8\u3001\u4f53\u91cd\u7ba1\u7406\u3001\u30c7\u30f3\u30bf\u30eb\u30b1\u30a2\\n(D) \u8eab\u4f53\u90e8\u4f4d+\u52b9\u679c: \u6b6f\u57a2\u3001\u6b6f\u77f3\u3001\u53e3\u81ed\u3001\u6b6f\u5468\u3001\u95a2\u7bc0\u306e\u3001\u88ab\u6bdb\u306e\u3001\u76ae\u819a\u306e\\n(E) \u52b9\u679c\u9023\u60f3: \u6804\u990a\u30d0\u30e9\u30f3\u30b9\u3001\u9ad8\u30bf\u30f3\u30d1\u30af\u3001\u30c0\u30a4\u30a8\u30c3\u30c8\u3001\u6b6f\u78e8\u304d\u52b9\u679c\u3001\u53e3\u81ed\u4e88\u9632\u3001\u6c34\u5206\u88dc\u7d66\\n(F) \u8a87\u5927\u8868\u73fe: \u65e5\u672c\u4e00\u3001\u4e16\u754c\u4e00\u3001No.1\u3001\u6700\u9ad8\u3001\u6700\u5f37\u3001\u7a76\u6975\\n\\n\u3010OK\u8868\u73fe\u3011\\n- \u5473\u308f\u3044\u30fb\u98a8\u5473\u306e\u8a18\u8ff0\u3001\u539f\u6750\u6599\u306e\u4e8b\u5b9f\u3001\u6c17\u5206\u8868\u73fe\uff08\u697d\u3057\u3044\u3001\u5b09\u3057\u3044\u7b49\uff09\u3001\u98df\u3044\u3064\u304d\u304c\u826f\u3044\\n\\n\u3010\u51fa\u529b\u5f62\u5f0f\u3011JSON\u306e\u307f:\\n{\\n  \"judgment\": \"OK \u307e\u305f\u306f NG\",\\n  \"issues\": [\\n    { \"koma\": 1, \"text\": \"\u554f\u984c\u30c6\u30ad\u30b9\u30c8\", \"category\": \"A\u301cF\", \"reason\": \"\u7406\u7531\", \"suggestion\": \"\u4fee\u6b63\u6848\" }\\n  ]\\n}`;\n\nreturn [{ json: { ...data, legal_prompt: legalPrompt } }];"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        10192,
        1056
      ],
      "id": "7bfa0989-d900-456f-9b69-0e5414a34da6",
      "name": "4a_\u30ea\u30fc\u30ac\u30eb\u6e96\u5099"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash:generateContent",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"contents\": [{\n    \"parts\": [{\n      \"text\": {{ JSON.stringify($json.legal_prompt) }}\n    }]\n  }],\n  \"generationConfig\": {\n    \"responseMimeType\": \"application/json\"\n  }\n}",
        "options": {
          "timeout": 30000
        }
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        10496,
        1056
      ],
      "id": "a80491c7-04f9-43a9-b4fe-f45504004381",
      "name": "4_\u30ea\u30fc\u30ac\u30eb\u30c1\u30a7\u30c3\u30af\uff08Gemini Flash\uff09",
      "retryOnFail": true,
      "maxTries": 2,
      "waitBetweenTries": 3000,
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "jsCode": "// === 4b: \u30ea\u30fc\u30ac\u30eb\u7d50\u679c\u30d1\u30fc\u30b9 ===\nconst response = $input.first().json;\nconst prevData = $('4a_\u30ea\u30fc\u30ac\u30eb\u6e96\u5099').first().json;\nconst totalAttempts = prevData._total_attempts || 1;\n\nlet legalResult;\ntry {\n  const text = response.candidates[0].content.parts[0].text;\n  legalResult = JSON.parse(text.replace(/```json|```/g, '').trim());\n} catch(e) {\n  legalResult = { judgment: 'NG', issues: [{ koma: 0, text: '\u30d1\u30fc\u30b9\u5931\u6557', category: '-', reason: e.message, suggestion: '' }] };\n}\n\nconst isOK = (legalResult.judgment || '').toUpperCase() === 'OK';\nconst canRetry = !isOK && totalAttempts < 9;\n\nreturn [{\n  json: {\n    ...prevData,\n    legal_judgment: legalResult.judgment,\n    legal_issues: legalResult.issues || [],\n    legal_ok: isOK,\n    _legal_can_retry: canRetry,\n    _total_attempts: totalAttempts\n  }\n}];"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        10800,
        1056
      ],
      "id": "76e6481a-03bb-4c2f-a1e4-7f27fd7d45b7",
      "name": "4b_\u30ea\u30fc\u30ac\u30eb\u7d50\u679c\u30d1\u30fc\u30b9"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict"
          },
          "conditions": [
            {
              "id": "legal-ok",
              "leftValue": "={{ $json.legal_ok }}",
              "rightValue": true,
              "operator": {
                "type": "boolean",
                "operation": "equals",
                "singleValue": true
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        11104,
        1056
      ],
      "id": "a7d5ed16-fe42-4c6f-b2e3-fe354caf7446",
      "name": "4c_\u30ea\u30fc\u30ac\u30ebOK?"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://discord.com/api/webhooks/1484433796194635860/zyxOWT17KlPrBn4JR-RnQWAr7GTq1Fl3_tLbJyHql9Q7A2mKw-3B7befpBxqB5SMAAKu",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={{ JSON.stringify({ content: \"\u26a0\ufe0f **\u6f2b\u753b\u30bb\u30ea\u30d5 \u30ea\u30fc\u30ac\u30ebNG**\\n\\n\ud83d\udce6 \u5546\u54c1\uff1a\" + ($json.product_name || \"\") + \"\\n\ud83d\udd04 \u8a66\u884c\uff1a\" + ($json._total_attempts || 1) + \"\u56de\u76ee\\n\\n\u554f\u984c\u7b87\u6240\uff1a\\n\" + (($json.legal_issues || []).map(function(i) { return \"\u30b3\u30de\" + i.koma + \" [\" + i.category + \"]: \" + i.text + \" \u2192 \" + i.reason; }).join(\"\\n\")) + \"\\n\\n\u4fee\u6b63\u6848\uff1a\\n\" + (($json.legal_issues || []).map(function(i) { return \"\u2192 \" + i.suggestion; }).join(\"\\n\")) + \"\\n\\n\" + ($json._legal_can_retry ? \"\ud83d\udd01 \u81ea\u52d5\u30ea\u30c8\u30e9\u30a4\" : \"\u274c \u30ea\u30c8\u30e9\u30a4\u4e0a\u9650\") }) }}",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        11392,
        912
      ],
      "id": "88f2924b-731e-4fe5-8510-1d0f7944fe3f",
      "name": "4d_Discord_\u30ea\u30fc\u30ac\u30ebNG"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict"
          },
          "conditions": [
            {
              "id": "retry-legal",
              "leftValue": "={{ $('4b_\u30ea\u30fc\u30ac\u30eb\u7d50\u679c\u30d1\u30fc\u30b9').first().json._legal_can_retry }}",
              "rightValue": true,
              "operator": {
                "type": "boolean",
                "operation": "equals",
                "singleValue": true
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        11696,
        912
      ],
      "id": "aeb1713b-f375-4fc6-bada-5b5db3fca157",
      "name": "4e_\u30ea\u30fc\u30ac\u30eb\u30ea\u30c8\u30e9\u30a4?"
    },
    {
      "parameters": {
        "jsCode": "// === 5: \u66f8\u8fbc\u30c7\u30fc\u30bf\u6574\u5f62\uff08\u5fc5\u8981\u306a18\u5217 + \u753b\u50cf\u751f\u6210\u5224\u5b9a\u7528\u306e\u307f\uff09 ===\n// \u2605 4e\u7d4c\u7531(Discord\u5fdc\u7b54)\u3067\u3082\u6b63\u3057\u3044\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3059\u308b\u305f\u3081\u30014b\u304b\u3089\u76f4\u63a5\u53c2\u7167\nconst data = $('4b_\u30ea\u30fc\u30ac\u30eb\u7d50\u679c\u30d1\u30fc\u30b9').first().json;\nconst script = data.script;\nconst now = new Date().toLocaleString('ja-JP', { timeZone: 'Asia/Tokyo' });\nconst legalStatus = data.legal_ok ? 'OK' : 'NG';\n\nlet koma1_scene='',koma1_dialog='',koma2_scene='',koma2_dialog='';\nlet koma3_scene='',koma3_dialog='',koma4_scene='',koma4_dialog='';\nlet mangaTitle='', char1='', char2='';\n\nif (script && script.koma && script.koma.length === 4) {\n  mangaTitle = script.title || '';\n  char1 = (script.char1_name || data.char1_name || '') + '\uff08' + (script.char1_breed || data.char1_breed || '') + '\uff09';\n  char2 = (script.char2_name || data.char2_name || '') + '\uff08' + (script.char2_breed || data.char2_breed || '') + '\uff09';\n  koma1_scene = script.koma[0].scene || '';\n  koma1_dialog = (script.koma[0].dialog || []).join(' / ');\n  koma2_scene = script.koma[1].scene || '';\n  koma2_dialog = (script.koma[1].dialog || []).join(' / ');\n  koma3_scene = script.koma[2].scene || '';\n  koma3_dialog = (script.koma[2].dialog || []).join(' / ');\n  koma4_scene = script.koma[3].scene || '';\n  koma4_dialog = (script.koma[3].dialog || []).join(' / ');\n}\n\nreturn [{\n  json: {\n    // SS\u4fdd\u5b58\u752818\u5217\n    ss_product_id: data.id || data.product_id || '',\n    ss_jan: data.jan || '',\n    ss_product_name: data.product_name || '',\n    ss_manga_title: mangaTitle,\n    ss_char1: char1,\n    ss_char2: char2,\n    ss_koma1_scene: koma1_scene,\n    ss_koma1_dialog: koma1_dialog,\n    ss_koma2_scene: koma2_scene,\n    ss_koma2_dialog: koma2_dialog,\n    ss_koma3_scene: koma3_scene,\n    ss_koma3_dialog: koma3_dialog,\n    ss_koma4_scene: koma4_scene,\n    ss_koma4_dialog: koma4_dialog,\n    ss_legal_status: legalStatus,\n    ss_attempt_count: data._total_attempts || 1,\n    ss_generated_at: now,\n    ss_script_json: script ? JSON.stringify(script) : '',\n    // \u753b\u50cf\u751f\u6210\u5224\u5b9a\u7528\uff08SS\u306b\u306f\u66f8\u304b\u306a\u3044\uff09\n    legal_ok: data.legal_ok,\n    _total_attempts: data._total_attempts || 1,\n    // \u753b\u50cf\u751f\u6210\u306b\u5fc5\u8981\u306a\u6700\u5c0f\u9650\n    product_name: data.product_name || '',\n    script: script,\n    char1_name: data.char1_name || '',\n    char1_breed: data.char1_breed || '',\n    char2_name: data.char2_name || '',\n    char2_breed: data.char2_breed || '',\n    package_base64: data.package_base64 || '',\n    package_mime: data.package_mime || ''\n  }\n}];"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        11392,
        1264
      ],
      "id": "134ac226-71d8-4574-b5b9-9c7791c42394",
      "name": "5_\u66f8\u8fbc\u30c7\u30fc\u30bf\u6574\u5f62"
    },
    {
      "parameters": {
        "operation": "appendOrUpdate",
        "documentId": {
          "__rl": true,
          "value": "1V8qgsEn5OdNZIrSJPxs3ZaKfKpL-oldmPCIyxPIFF6Q",
          "mode": "list",
          "cachedResultName": "\u5546\u54c1\u30fb\u5e97\u8217\u30de\u30b9\u30bf_20260305",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1V8qgsEn5OdNZIrSJPxs3ZaKfKpL-oldmPCIyxPIFF6Q/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": 455563426,
          "mode": "list",
          "cachedResultName": "\uff14\u30b3\u30de\u5b8c\u6210",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1V8qgsEn5OdNZIrSJPxs3ZaKfKpL-oldmPCIyxPIFF6Q/edit#gid=455563426"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "ss_product_id": "={{ $json.ss_product_id }}",
            "ss_jan": "={{ $json.ss_jan }}",
            "ss_product_name": "={{ $json.ss_product_name }}",
            "ss_manga_title": "={{ $json.ss_manga_title }}",
            "ss_char1": "={{ $json.ss_char1 }}",
            "ss_char2": "={{ $json.ss_char2 }}",
            "ss_koma1_scene": "={{ $json.ss_koma1_scene }}",
            "ss_koma1_dialog": "={{ $json.ss_koma1_dialog }}",
            "ss_koma2_scene": "={{ $json.ss_koma2_scene }}",
            "ss_koma2_dialog": "={{ $json.ss_koma2_dialog }}",
            "ss_koma3_scene": "={{ $json.ss_koma3_scene }}",
            "ss_koma3_dialog": "={{ $json.ss_koma3_dialog }}",
            "ss_koma4_scene": "={{ $json.ss_koma4_scene }}",
            "ss_koma4_dialog": "={{ $json.ss_koma4_dialog }}",
            "ss_legal_status": "={{ $json.ss_legal_status }}",
            "ss_attempt_count": "={{ $json.ss_attempt_count }}",
            "ss_generated_at": "={{ $json.ss_generated_at }}",
            "ss_script_json": "={{ $json.ss_script_json }}"
          },
          "matchingColumns": [
            "ss_product_id"
          ],
          "schema": [
            {
              "id": "ss_product_id",
              "displayName": "ss_product_id",
              "required": false,
              "defaultMatch": true,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "ss_jan",
              "displayName": "ss_jan",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "ss_product_name",
              "displayName": "ss_product_name",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "ss_manga_title",
              "displayName": "ss_manga_title",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "ss_char1",
              "displayName": "ss_char1",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "ss_char2",
              "displayName": "ss_char2",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "ss_koma1_scene",
              "displayName": "ss_koma1_scene",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "ss_koma1_dialog",
              "displayName": "ss_koma1_dialog",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "ss_koma2_scene",
              "displayName": "ss_koma2_scene",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "ss_koma2_dialog",
              "displayName": "ss_koma2_dialog",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "ss_koma3_scene",
              "displayName": "ss_koma3_scene",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "ss_koma3_dialog",
              "displayName": "ss_koma3_dialog",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "ss_koma4_scene",
              "displayName": "ss_koma4_scene",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "ss_koma4_dialog",
              "displayName": "ss_koma4_dialog",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "ss_legal_status",
              "displayName": "ss_legal_status",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "ss_attempt_count",
              "displayName": "ss_attempt_count",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "ss_generated_at",
              "displayName": "ss_generated_at",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "ss_script_json",
              "displayName": "ss_script_json",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        11696,
        1264
      ],
      "id": "00756107-f6dd-4053-81d0-3f23b1bb579d",
      "name": "6_\u6f2b\u753b\u811a\u672cSS\u4fdd\u5b58",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict"
          },
          "conditions": [
            {
              "id": "gen-img",
              "leftValue": "={{ $('5_\u66f8\u8fbc\u30c7\u30fc\u30bf\u6574\u5f62').first().json.legal_ok }}",
              "rightValue": true,
              "operator": {
                "type": "boolean",
                "operation": "equals",
                "singleValue": true
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        12000,
        1264
      ],
      "id": "5a4b42c7-6531-4344-8254-bbfa83e30ac0",
      "name": "\u753b\u50cf\u751f\u6210\u3059\u308b?"
    },
    {
      "parameters": {
        "jsCode": "// === \u753b\u50cf\u751f\u6210\u30d7\u30ed\u30f3\u30d7\u30c8\u7d44\u7acb ===\n// \u767d\u629c\u304d\u753b\u50cf\uff08Base64\uff09\u3092\u53c2\u8003\u753b\u50cf\u3068\u3057\u3066Gemini\u306b\u6e21\u3059\n// \u2605 SS\u4fdd\u5b58\u5f8c\u306f$json\u304c\u30b7\u30fc\u30c8\u5fdc\u7b54\u306b\u5909\u308f\u308b\u305f\u3081\u30015_\u66f8\u8fbc\u30c7\u30fc\u30bf\u6574\u5f62\u304b\u3089\u53d6\u5f97\n\nconst productData = $('5_\u66f8\u8fbc\u30c7\u30fc\u30bf\u6574\u5f62').first().json;\nconst script = productData.script;\n\nconst komaDescriptions = script.koma.map(k =>\n  `\u3010${k.label}\uff08\u30b3\u30de${k.num}\uff09\u3011\\n\u5834\u9762\uff1a${k.scene}\\n\u30ad\u30e3\u30e9\uff1a${k.characters}\\n\u30bb\u30ea\u30d5\uff1a${k.dialog.join(' / ')}\\n\u8868\u60c5\u30fb\u52d5\u4f5c\uff1a${k.expression}`\n).join('\\n\\n');\n\nconst c1Name = script.char1_name || productData.char1_name || '\u3061\u3073\u307e\u308b';\nconst c1Breed = script.char1_breed || productData.char1_breed || '\u30c8\u30a4\u30d7\u30fc\u30c9\u30eb\uff08\u30a2\u30d7\u30ea\u30b3\u30c3\u30c8\u8272\uff09';\nconst c2Name = script.char2_name || productData.char2_name || '\u3082\u3053';\nconst c2Breed = script.char2_breed || productData.char2_breed || '\u67f4\u72ac\uff08\u8d64\u6bdb\uff09';\n\nconst imagePrompt = `\u4ee5\u4e0b\u306e\u811a\u672c\u3092\u3082\u3068\u306b\u3001EC\u30b5\u30a4\u30c8\u7528\u306e4\u30b3\u30de\u6f2b\u753b\u753b\u50cf\u30921\u679a\u4f5c\u6210\u3057\u3066\u304f\u3060\u3055\u3044\u3002\\n\u203b\u4eba\u9593\u306f\u767b\u5834\u3057\u307e\u305b\u3093\u3002\u52d5\u7269\u30ad\u30e3\u30e92\u5339\u3060\u3051\u306e\u6f2b\u753b\u3067\u3059\u3002\\n\\n\u3010\u30bf\u30a4\u30c8\u30eb\u3011${script.title}\\n\\n${komaDescriptions}\\n\\n\u3010\u753b\u50cf\u30ec\u30a4\u30a2\u30a6\u30c8\u3011\\n- \u7e26\u9577\u753b\u50cf\uff083:4\uff09\u306b4\u30b3\u30de\u3092\u4e0a\u304b\u3089\u4e0b\u306b\u5747\u7b49\u914d\u7f6e\\n- \u5404\u30b3\u30de\u306e\u9593\u306b\u7d30\u3044\u67a0\u7dda\\n- \u6700\u4e0a\u90e8\u306b\u30bf\u30a4\u30c8\u30eb\u5e2f\uff08\u300c${script.title}\u300d\uff09\\n- \u5404\u30b3\u30de\u5185\u306b\u5439\u304d\u51fa\u3057\u3067\u30bb\u30ea\u30d5\u3092\u914d\u7f6e\\n\\n\u3010\u30b9\u30bf\u30a4\u30eb\u6307\u5b9a\u3011\\n- \u65e5\u672c\u306e4\u30b3\u30de\u6f2b\u753b\u98a8\u30a4\u30e9\u30b9\u30c8\\n- \u7dda\u753b\uff0b\u30d1\u30b9\u30c6\u30eb\u30ab\u30e9\u30fc\u7740\u8272\\n- \u6e29\u304b\u304f\u89aa\u3057\u307f\u3084\u3059\u3044\u30bf\u30c3\u30c1\\n- \u52b9\u679c\u7dda\u30fb\u30cf\u30fc\u30c8\u30de\u30fc\u30af\u7b49\u306e\u6f2b\u753b\u8868\u73feOK\\n- \u52d5\u7269\u3092\u30c7\u30d5\u30a9\u30eb\u30e1\uff08\u4e8c\u982d\u8eab\u301c\u4e09\u982d\u8eab\uff09\u3067\u63cf\u304f\\n\\n\u3010\u30ad\u30e3\u30e9\u30c7\u30b6\u30a4\u30f3\uff08\u5168\u30b3\u30de\u7d71\u4e00\u30fb\u4eba\u9593\u306a\u3057\uff09\u3011\\n- ${c1Name}\uff1a${c1Breed}\uff08\u30c7\u30d5\u30a9\u30eb\u30e1\u3001\u8868\u60c5\u8c4a\u304b\uff09\\n- ${c2Name}\uff1a${c2Breed}\uff08\u30c7\u30d5\u30a9\u30eb\u30e1\u3001\u8868\u60c5\u8c4a\u304b\uff09\\n\u203b2\u5339\u306e\u4f53\u578b\u3084\u8272\u306e\u9055\u3044\u3092\u306f\u3063\u304d\u308a\u63cf\u304d\u5206\u3051\u3066\u304f\u3060\u3055\u3044\\n\\n\u3010\u91cd\u8981\u306a\u5236\u7d04\u3011\\n- \u8457\u4f5c\u6a29\u306e\u3042\u308b\u30ad\u30e3\u30e9\u30af\u30bf\u30fc\u306f\u4f7f\u7528\u7981\u6b62\\n- \u4eba\u9593\u306f\u4e00\u5207\u63cf\u304b\u306a\u3044\\n- \u6dfb\u4ed8\u306e\u5546\u54c1\u30d1\u30c3\u30b1\u30fc\u30b8\u753b\u50cf\u3092\u53c2\u8003\u306b\u5546\u54c1\u3092\u63cf\u304f\\n- \u30bb\u30ea\u30d5\u306f\u5439\u304d\u51fa\u3057\u5185\u306b\u8aad\u307f\u3084\u3059\u304f\u914d\u7f6e\\n- \u6587\u5b57\u30b5\u30a4\u30ba\uff1a\u30bb\u30ea\u30d5\u306f\u753b\u50cf\u5e45\u306e3%\u76f8\u5f53\u4ee5\u4e0a`;\n\nconst parts = [{ text: imagePrompt }];\n\n// \u767d\u629c\u304d\u753b\u50cf\u3092Base64\u3067\u6dfb\u4ed8\uff08\u5546\u54c1\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u53c2\u8003\u753b\u50cf\uff09\nif (productData.package_base64) {\n  parts.push({\n    inlineData: {\n      mimeType: productData.package_mime || 'image/jpeg',\n      data: productData.package_base64\n    }\n  });\n}\n\nconst apiBody = {\n  contents: [{ parts: parts }],\n  generationConfig: {\n    responseModalities: ['TEXT', 'IMAGE'],\n    imageConfig: { aspectRatio: '3:4', imageSize: '4K' }\n  }\n};\n\nreturn [\n  { json: { ...productData, api_body: apiBody } },\n  { json: { ...productData, api_body: apiBody } },\n  { json: { ...productData, api_body: apiBody } },\n  { json: { ...productData, api_body: apiBody } }\n];"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        12304,
        1152
      ],
      "id": "abe147a3-0cf3-490e-a3e4-0a527c02eb6b",
      "name": "\u6f2b\u753b\u753b\u50cf\u30d7\u30ed\u30f3\u30d7\u30c8\u7d44\u7acb"
    },
    {
      "parameters": {
        "options": {
          "reset": false
        }
      },
      "type": "n8n-nodes-base.splitInBatches",
      "typeVersion": 3,
      "position": [
        12592,
        1152
      ],
      "id": "5639b227-2209-4814-b1c8-02530858259a",
      "name": "\u6f2b\u753b\u753b\u50cf\u30eb\u30fc\u30d7"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://generativelanguage.googleapis.com/v1beta/models/gemini-3-pro-image-preview:generateContent",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={{ JSON.stringify($json.api_body) }}",
        "options": {
          "timeout": 120000
        }
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        12896,
        1152
      ],
      "id": "1ebbea48-90ee-4cdc-b9da-c0e8b60ecee1",
      "name": "\u6f2b\u753b\u753b\u50cf\u751f\u6210\uff08Gemini Pro Image\uff09",
      "retryOnFail": true,
      "maxTries": 3,
      "waitBetweenTries": 10000,
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "jsCode": "// === Gemini\u5fdc\u7b54\u304b\u3089\u753b\u50cf\u3092\u62bd\u51fa\u3057\u3066\u30d5\u30a1\u30a4\u30eb\u5316 ===\nconst response = $input.first().json;\nconst candidates = response.candidates || [];\nif (candidates.length === 0) return [{ json: { error: '\u753b\u50cf\u751f\u6210\u5931\u6557: candidates\u7a7a' } }];\nconst parts = candidates[0].content.parts || [];\nconst imagePart = parts.find(p => p.inlineData);\nif (!imagePart) return [{ json: { error: '\u753b\u50cf\u30c7\u30fc\u30bf\u306a\u3057' } }];\nreturn [{\n  json: { mimeType: imagePart.inlineData.mimeType, hasImage: true },\n  binary: {\n    data: {\n      data: imagePart.inlineData.data,\n      mimeType: imagePart.inlineData.mimeType || 'image/jpeg',\n      fileName: 'manga.jpg'\n    }\n  }\n}];"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        13200,
        1152
      ],
      "id": "4507f937-934c-4cb3-96a3-8b450c7a8e2f",
      "name": "\u753b\u50cf\u30c7\u30fc\u30bf\u62bd\u51fa"
    },
    {
      "parameters": {
        "name": "={{ $('\u30c7\u30fc\u30bf\u7d71\u54081').first().json.jan || $('\u30c7\u30fc\u30bf\u7d71\u54081').first().json.id }}_manga_{{ $runIndex }}.jpg",
        "driveId": {
          "__rl": true,
          "value": "0AHs7vAQdDnKzUk9PVA",
          "mode": "id"
        },
        "folderId": {
          "__rl": true,
          "value": "1MPrva6Zfz8yYvhG2iKV3VO4-CTGMB-na",
          "mode": "id"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleDrive",
      "typeVersion": 3,
      "position": [
        13504,
        1152
      ],
      "id": "cc136506-b661-4868-8f30-e263b1e131c6",
      "name": "Drive\u4fdd\u5b58\uff08\u6f2b\u753b\uff09",
      "credentials": {
        "googleDriveOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://discord.com/api/webhooks/1484433975111057448/E_4lQLpGWGH812vRiMsBhG2GJBivhReBbk_NLhVdAslZrfPDbPeWGn3CPZCN4IIlWIbN",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={{ JSON.stringify({ content: \"\ud83c\udfa8 **\u6f2b\u753bLP\u751f\u6210\u5b8c\u4e86\uff01**\\n\\n\ud83d\udce6 \u5546\u54c1\uff1a\" + ($(\"\u30c7\u30fc\u30bf\u7d71\u54081\").first().json.product_name || \"\") + \"\\n\ud83d\udcd6 \u30bf\u30a4\u30c8\u30eb\uff1a\" + ($(\"5_\u66f8\u8fbc\u30c7\u30fc\u30bf\u6574\u5f62\").first().json.ss_manga_title || \"\") + \"\\n\u2705 \u30ea\u30fc\u30ac\u30eb\uff1aOK\uff08\" + ($(\"5_\u66f8\u8fbc\u30c7\u30fc\u30bf\u6574\u5f62\").first().json._total_attempts || 1) + \"\u56de\u76ee\u3067\u901a\u904e\uff09\\n\ud83d\uddbc\ufe0f \u5019\u88dc\u6570\uff1a4\u679a\\n\ud83d\udcdd \u811a\u672c\u306fSS\u306b\u4fdd\u5b58\u6e08\u307f\" }) }}",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        13792,
        1152
      ],
      "id": "e4d7d2d6-6763-47de-bd1c-4fe147bbc532",
      "name": "7_Discord\u5b8c\u4e86"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://discord.com/api/webhooks/1484433897583411200/l7YQQjr1uzuczEZ-5W2Vpah_oBWdCr9Q8ovQeCQenzHYUw3r_DTYqBs665EobRMA9ema",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={{ JSON.stringify({ content: \"\u274c **\u6f2b\u753bLP \u6700\u7d42NG**\\n\\n\ud83d\udce6 \u5546\u54c1\uff1a\" + ($('5_\u66f8\u8fbc\u30c7\u30fc\u30bf\u6574\u5f62').first().json.product_name || \"\") + \"\\n\ud83d\udd04 \u8a66\u884c\u56de\u6570\uff1a\" + ($('5_\u66f8\u8fbc\u30c7\u30fc\u30bf\u6574\u5f62').first().json._total_attempts || 0) + \"\u56de\\n\ud83d\udcdd NG\u72b6\u614b\u3067SS\u306b\u8a18\u9332\u6e08\u307f\\n\\n\u26a0\ufe0f \u624b\u52d5\u3067\u811a\u672c\u4fee\u6b63\u304b\u5546\u54c1\u60c5\u5831\u898b\u76f4\u3057\u304c\u5fc5\u8981\" }) }}",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        12304,
        1408
      ],
      "id": "b22ea184-a3ba-4710-9fd4-f1ffbf908e3d",
      "name": "Discord_\u6700\u7d42NG"
    },
    {
      "parameters": {
        "documentId": {
          "__rl": true,
          "value": "18kTXbIHID9Fysk1rJdppzaDo7rCZZxfcou83lc6Bypc",
          "mode": "list",
          "cachedResultName": "A4_\u30b5\u30e0\u30cd\u30a4\u30eb\u753b\u50cf-\u30ed\u30b4\u5165\u308c-LP",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/18kTXbIHID9Fysk1rJdppzaDo7rCZZxfcou83lc6Bypc/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": 1591542317,
          "mode": "list",
          "cachedResultName": "uchino_mofu",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/18kTXbIHID9Fysk1rJdppzaDo7rCZZxfcou83lc6Bypc/edit#gid=1591542317"
        },
        "filtersUI": {
          "values": [
            {
              "lookupColumn": "id",
              "lookupValue": "={{ $json.product_id }}"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        8480,
        1456
      ],
      "id": "fad62395-24bd-4a13-9af1-fab95de2f539",
      "name": "SS-03\u5546\u54c1\u30c7\u30fc\u30bf\u53d6\u5f973",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    }
  ],
  "connections": {
    "\u624b\u52d5\u5b9f\u884c": {
      "main": [
        [
          {
            "node": "JAN\u6307\u5b9a1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "\u30d5\u30a1\u30a4\u30ebID\u62bd\u51fa": {
      "main": [
        [
          {
            "node": "\u767d\u629c\u304d\u753b\u50cfDL1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "JAN\u6307\u5b9a1": {
      "main": [
        [
          {
            "node": "SS-03\u5546\u54c1\u30c7\u30fc\u30bf\u53d6\u5f972",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "SS-03\u5546\u54c1\u30c7\u30fc\u30bf\u53d6\u5f972": {
      "main": [
        [
          {
            "node": "SS-03\u5546\u54c1\u30c7\u30fc\u30bf\u53d6\u5f973",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "\u767d\u629c\u304d\u753b\u50cfDL1": {
      "main": [
        [
          {
            "node": "\u30c7\u30fc\u30bf\u7d71\u54081",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "\u30c7\u30fc\u30bf\u7d71\u54081": {
      "main": [
        [
          {
            "node": "\u6f2b\u753b\u811a\u672c\u30d7\u30ed\u30f3\u30d7\u30c8\u7d44\u7acb",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "\u6f2b\u753b\u811a\u672c\u30d7\u30ed\u30f3\u30d7\u30c8\u7d44\u7acb": {
      "main": [
        [
          {
            "node": "\u6f2b\u753b\u811a\u672c\u751f\u6210\uff08Gemini Flash\uff09",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "\u6f2b\u753b\u811a\u672c\u751f\u6210\uff08Gemini Flash\uff09": {
      "main": [
        [
 

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

A5_漫画LP_uchino_mofu. Uses googleSheets, googleDrive, httpRequest. Event-driven trigger; 29 nodes.

Source: https://gist.github.com/takaenterprise/88fbe278e173695ff5302de727a37a6e — 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

PCN. Uses googleSheets, httpRequest, @n-octo-n/n8n-nodes-json-database, itemLists. Event-driven trigger; 60 nodes.

Google Sheets, HTTP Request, @N Octo N/N8N Nodes Json Database +3
Data & Sheets

The workflow automates the process of gathering extensive keyword data for a "Main Keyword." It starts by reading initial parameters from a Google Sheets template, creates a new dedicated Google Sheet

Google Sheets, Google Drive, HTTP Request
Data & Sheets

🔥 March Sale – n8n Community Members Get ideoGener8r for Just $27! (Reg. $47) Use Coupon Code: (Valid until 3/31/2025 for n8n community members)

HTTP Request, Google Drive, Google Sheets
Data & Sheets

📄 Documentation: Notion Guide

Google Sheets, Google Drive, HTTP Request +2
Data & Sheets

💥 AI Image to Professional Video Workflow using NanoBanana Ultra & Kling AI. Uses googleSheets, googleDrive, httpRequest, editImage. Event-driven trigger; 45 nodes.

Google Sheets, Google Drive, HTTP Request +2