Google Sheetsコピー作業フロー

中級

これはAI, IT Ops分野の自動化ワークフローで、15個のノードを含みます。主にCode, HttpRequest, GoogleSheets, ManualTrigger, SplitInBatchesなどのノードを使用、AI技術を活用したスマート自動化を実現。 Google Sheetsの複製と自動リッチ化

前提条件
  • ターゲットAPIの認証情報が必要な場合あり
  • Google Sheets API認証情報

カテゴリー

ワークフロープレビュー
ノード接続関係を可視化、ズームとパンをサポート
ワークフローをエクスポート
以下のJSON設定をn8nにインポートして、このワークフローを使用できます
{
  "meta": {
    "instanceId": "YOUR_INSTANCE_ID"
  },
  "name": "Google Sheets Duplication Workflow",
  "tags": [],
  "nodes": [
    {
      "id": "workflow-overview-sheets",
      "name": "ワークフロー概要",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1450,
        -50
      ],
      "parameters": {
        "color": 2,
        "width": 350,
        "height": 320,
        "content": "# 📊 Google Sheets Duplication Workflow\n\n**Purpose:** Duplicate sheets from master spreadsheet to new spreadsheet\n\n**Process Overview:**\n1. Create new spreadsheet\n2. Get all sheets from master\n3. Loop through each sheet\n4. Create sheet in new spreadsheet\n5. Copy data from master to new\n\n**Required Setup:**\n- Google Sheets OAuth credentials\n- Master spreadsheet ID\n- Proper API permissions"
      },
      "typeVersion": 1
    },
    {
      "id": "start-create-note",
      "name": "開始と作成",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1100,
        -50
      ],
      "parameters": {
        "color": 3,
        "width": 280,
        "height": 200,
        "content": "## 🚀 Start & Create\n\n**Manual Trigger:**\n- Click to start workflow\n- No scheduling needed\n\n**Create New Spreadsheet:**\n- Creates destination spreadsheet\n- Update title as needed\n- Stores ID for later use"
      },
      "typeVersion": 1
    },
    {
      "id": "discovery-note",
      "name": "シート検出",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -660,
        -50
      ],
      "parameters": {
        "color": 1,
        "width": 280,
        "height": 200,
        "content": "## 🔍 Sheet Discovery\n\n**HTTP Request:**\n- Gets spreadsheet metadata\n- Lists all sheets\n- Uses Google Sheets API v4\n\n**Code Node:**\n- Extracts sheet names\n- Formats for processing\n- Creates sheet array"
      },
      "typeVersion": 1
    },
    {
      "id": "loop-note",
      "name": "ループ処理",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -220,
        -50
      ],
      "parameters": {
        "color": 5,
        "width": 280,
        "height": 200,
        "content": "## 🔄 Loop Processing\n\n**Split In Batches:**\n- Processes one sheet at a time\n- Prevents API overload\n- Maintains order\n\n**Two outputs:**\n1. Done - Removes default Sheet1\n2. Loop - Creates & copies sheets"
      },
      "typeVersion": 1
    },
    {
      "id": "operations-note",
      "name": "シート操作",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        220,
        -50
      ],
      "parameters": {
        "color": 4,
        "width": 280,
        "height": 200,
        "content": "## 📝 Sheet Operations\n\n**Create Sheets:**\n- Creates new sheet in destination\n- Uses original sheet names\n\n**Read & Write:**\n- Reads from master sheet\n- Writes to new sheet\n- Preserves all columns"
      },
      "typeVersion": 1
    },
    {
      "id": "important-notes",
      "name": "重要な注意点",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -220,
        420
      ],
      "parameters": {
        "color": 6,
        "width": 300,
        "height": 150,
        "content": "⚠️ **Important Notes:**\n\n1. Replace spreadsheet ID in HTTP Request\n2. Update credentials for all nodes\n3. Default 'Sheet1' is removed after all sheets are created\n4. Column structure must match between sheets"
      },
      "typeVersion": 1
    },
    {
      "id": "21b7267c-eac9-4f90-b345-614bd6d5a276",
      "name": "'ワークフローをテスト'クリック時",
      "type": "n8n-nodes-base.manualTrigger",
      "notes": "Manual trigger - click to start the spreadsheet duplication process",
      "position": [
        -1100,
        200
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "26e0f233-e990-4b98-8184-599583a64498",
      "name": "HTTP リクエスト",
      "type": "n8n-nodes-base.httpRequest",
      "notes": "Gets spreadsheet metadata - replace YOUR_MASTER_SPREADSHEET_ID with actual ID",
      "position": [
        -660,
        200
      ],
      "parameters": {
        "url": "https://sheets.googleapis.com/v4/spreadsheets/YOUR_MASTER_SPREADSHEET_ID",
        "options": {},
        "sendHeaders": true,
        "authentication": "predefinedCredentialType",
        "headerParameters": {
          "parameters": [
            {
              "name": "Accept",
              "value": "application/json"
            }
          ]
        },
        "nodeCredentialType": "googleSheetsOAuth2Api"
      },
      "credentials": {
        "httpHeaderAuth": {
          "id": "HTTP_HEADER_CREDENTIAL_ID",
          "name": "API Header Auth"
        },
        "googleSheetsOAuth2Api": {
          "id": "GOOGLE_SHEETS_CREDENTIAL_ID",
          "name": "Google Sheets Account"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "d8a02c3f-8b31-4bb1-9052-33963c09da16",
      "name": "コード",
      "type": "n8n-nodes-base.code",
      "notes": "Extracts sheet names and IDs from API response",
      "position": [
        -440,
        200
      ],
      "parameters": {
        "jsCode": "const spreadsheet = $input.first().json;\nconst sheets = spreadsheet.sheets;\n\n// Create array of sheet names\nconst sheetList = sheets.map(sheet => ({\n  json: {\n    sheetName: sheet.properties.title,\n    sheetId: sheet.properties.sheetId,\n    index: sheet.properties.index\n  }\n}));\n\nreturn sheetList;"
      },
      "typeVersion": 2
    },
    {
      "id": "d45b8f9a-47ad-4280-ba95-d8b10b0351a2",
      "name": "アイテムのループ処理",
      "type": "n8n-nodes-base.splitInBatches",
      "notes": "Processes sheets one by one - output 1 when done, output 2 for each iteration",
      "position": [
        -220,
        200
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "aaff5289-8658-4f5c-b3de-15630e25c537",
      "name": "シート作成",
      "type": "n8n-nodes-base.googleSheets",
      "notes": "Creates new sheet in destination spreadsheet with original name",
      "position": [
        0,
        200
      ],
      "parameters": {
        "title": "={{ $('Loop Over Items').item.json.sheetName }}",
        "options": {},
        "operation": "create",
        "documentId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $('Create New Spreadsheet').item.json.spreadsheetId }}"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "GOOGLE_SHEETS_CREDENTIAL_ID",
          "name": "Google Sheets Account"
        }
      },
      "typeVersion": 4.5
    },
    {
      "id": "e33a1701-8a90-4e71-8f1a-f517d26894be",
      "name": "シート書き込み",
      "type": "n8n-nodes-base.googleSheets",
      "notes": "Writes data to new sheet - preserves all columns from master",
      "position": [
        440,
        275
      ],
      "parameters": {
        "columns": {
          "value": {},
          "schema": [
            {
              "id": "Column1",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Column 1",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Column2",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Column 2",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Column3",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Column 3",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Column4",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Column 4",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Column5",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Column 5",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Column6",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Column 6",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Column7",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Column 7",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Column8",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Column 8",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Column9",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Column 9",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "appendOrUpdate",
        "sheetName": {
          "__rl": true,
          "mode": "name",
          "value": "={{ $('Loop Over Items').item.json.sheetName }}"
        },
        "documentId": {
          "__rl": true,
          "mode": "url",
          "value": "={{ $('Create New Spreadsheet').item.json.spreadsheetUrl }}"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "GOOGLE_SHEETS_CREDENTIAL_ID",
          "name": "Google Sheets Account"
        }
      },
      "typeVersion": 4.5
    },
    {
      "id": "a46aad80-34cf-4f19-aec6-1896296b40d3",
      "name": "Google Sheets2",
      "type": "n8n-nodes-base.googleSheets",
      "notes": "Removes default 'Sheet1' after all sheets are created",
      "position": [
        0,
        0
      ],
      "parameters": {
        "operation": "remove",
        "sheetName": {
          "__rl": true,
          "mode": "name",
          "value": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "url",
          "value": "={{ $('Create New Spreadsheet').item.json.spreadsheetUrl }}"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "GOOGLE_SHEETS_CREDENTIAL_ID",
          "name": "Google Sheets Account"
        }
      },
      "typeVersion": 4.5
    },
    {
      "id": "c8439289-b353-4ac5-a0f2-601e66ddf6fb",
      "name": "スプレッドシート1読み取り",
      "type": "n8n-nodes-base.googleSheets",
      "notes": "Reads data from master spreadsheet - one sheet at a time",
      "position": [
        220,
        200
      ],
      "parameters": {
        "options": {},
        "sheetName": {
          "__rl": true,
          "mode": "name",
          "value": "={{ $('Loop Over Items').item.json.sheetName }}"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "YOUR_MASTER_SPREADSHEET_ID",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_MASTER_SPREADSHEET_ID/edit",
          "cachedResultName": "Master Spreadsheet"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "GOOGLE_SHEETS_CREDENTIAL_ID",
          "name": "Google Sheets Account"
        }
      },
      "typeVersion": 4.5
    },
    {
      "id": "2de35627-e071-4f39-9ea7-2e1fa0d56f7c",
      "name": "新規スプレッドシート作成",
      "type": "n8n-nodes-base.googleSheets",
      "notes": "Creates new destination spreadsheet - update title as needed",
      "position": [
        -880,
        200
      ],
      "parameters": {
        "title": "Copy of Master Spreadsheet",
        "options": {},
        "resource": "spreadsheet"
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "GOOGLE_SHEETS_CREDENTIAL_ID",
          "name": "Google Sheets Account"
        }
      },
      "typeVersion": 4.5
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "YOUR_VERSION_ID",
  "connections": {
    "d8a02c3f-8b31-4bb1-9052-33963c09da16": {
      "main": [
        [
          {
            "node": "d45b8f9a-47ad-4280-ba95-d8b10b0351a2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "e33a1701-8a90-4e71-8f1a-f517d26894be": {
      "main": [
        [
          {
            "node": "d45b8f9a-47ad-4280-ba95-d8b10b0351a2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "26e0f233-e990-4b98-8184-599583a64498": {
      "main": [
        [
          {
            "node": "d8a02c3f-8b31-4bb1-9052-33963c09da16",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "aaff5289-8658-4f5c-b3de-15630e25c537": {
      "main": [
        [
          {
            "node": "c8439289-b353-4ac5-a0f2-601e66ddf6fb",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "d45b8f9a-47ad-4280-ba95-d8b10b0351a2": {
      "main": [
        [
          {
            "node": "a46aad80-34cf-4f19-aec6-1896296b40d3",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "aaff5289-8658-4f5c-b3de-15630e25c537",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "c8439289-b353-4ac5-a0f2-601e66ddf6fb": {
      "main": [
        [
          {
            "node": "e33a1701-8a90-4e71-8f1a-f517d26894be",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "2de35627-e071-4f39-9ea7-2e1fa0d56f7c": {
      "main": [
        [
          {
            "node": "26e0f233-e990-4b98-8184-599583a64498",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "21b7267c-eac9-4f90-b345-614bd6d5a276": {
      "main": [
        [
          {
            "node": "2de35627-e071-4f39-9ea7-2e1fa0d56f7c",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
よくある質問

このワークフローの使い方は?

上記のJSON設定コードをコピーし、n8nインスタンスで新しいワークフローを作成して「JSONからインポート」を選択、設定を貼り付けて認証情報を必要に応じて変更してください。

このワークフローはどんな場面に適していますか?

中級 - 人工知能, IT運用

有料ですか?

このワークフローは完全無料です。ただし、ワークフローで使用するサードパーティサービス(OpenAI APIなど)は別途料金が発生する場合があります。

ワークフロー情報
難易度
中級
ノード数15
カテゴリー2
ノードタイプ6
難易度説明

経験者向け、6-15ノードの中程度の複雑さのワークフロー

作成者
Amit Mehta

Amit Mehta

@amitswba

I'm a workflow automation expert with 15+ years in IT industry. I build smart, scalable n8n workflows for AI automation, marketing, CRM, and SaaS integrations. My focus is on simplifying business processes with tools like OpenAI, WhatsApp, Gmail, and Airtable. I help teams and solopreneurs automate smarter, reduce manual tasks, and grow faster—one workflow at a time.

外部リンク
n8n.ioで表示

このワークフローを共有

カテゴリー

カテゴリー: 34