GoogleシートからGoogleドキュメントへ自動領収書ジェネレーター

中級

これはDocument Extraction分野の自動化ワークフローで、11個のノードを含みます。主にMerge, GoogleDocs, GoogleSheets, ManualTriggerなどのノードを使用。 Google Sheets から Google Docs へ自動請求書ジェネレーター

前提条件
  • Google Sheets API認証情報

カテゴリー

ワークフロープレビュー
ノード接続関係を可視化、ズームとパンをサポート
ワークフローをエクスポート
以下のJSON設定をn8nにインポートして、このワークフローを使用できます
{
  "meta": {
    "instanceId": "efb474b59b0341d7791932605bd9ff04a6c7ed9941fdd53dc4a2e4b99a6f9439",
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "ede2cb2e-bb56-4870-94a4-c27c78509124",
      "name": "ワークフロー実行時",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -420,
        560
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "85ff7b59-2c72-4846-953a-46ab1f50fee8",
      "name": "Google Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -240,
        880
      ],
      "parameters": {
        "options": {},
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1MHVZRVo5aPs5VqRXk7lBNPVlZ2gilKqZ8J9yeg4taW4/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1MHVZRVo5aPs5VqRXk7lBNPVlZ2gilKqZ8J9yeg4taW4",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1MHVZRVo5aPs5VqRXk7lBNPVlZ2gilKqZ8J9yeg4taW4/edit?usp=drivesdk",
          "cachedResultName": "Invoices"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "WsgMg14OYooIdvn7",
          "name": "Google Sheets account"
        }
      },
      "typeVersion": 4.6
    },
    {
      "id": "e92eee15-18b1-4851-92ae-985d666b1857",
      "name": "マージ",
      "type": "n8n-nodes-base.merge",
      "position": [
        320,
        880
      ],
      "parameters": {
        "mode": "combine",
        "options": {},
        "combineBy": "combineAll"
      },
      "typeVersion": 3.2
    },
    {
      "id": "736b3314-daf7-4bd2-82e0-9e23018091b5",
      "name": "請求書テンプレート取得",
      "type": "n8n-nodes-base.googleDocs",
      "position": [
        100,
        800
      ],
      "parameters": {
        "operation": "get",
        "documentURL": "18n0HTqabDldi7fVbhbI1aG12qbFWsjyTXdduwDDOUu8"
      },
      "credentials": {
        "googleDocsOAuth2Api": {
          "id": "iOuZirVwbwI3E51t",
          "name": "Google Docs account"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "97b2ea4d-4904-49f5-bb1e-ae7e71156640",
      "name": "新規Doc作成",
      "type": "n8n-nodes-base.googleDocs",
      "position": [
        120,
        980
      ],
      "parameters": {
        "title": "=Invoice:  {{ $json.Invoice }}",
        "folderId": "1TnDibwPPPUm3VbmETiqWDVhtaUTLJ6mn"
      },
      "credentials": {
        "googleDocsOAuth2Api": {
          "id": "iOuZirVwbwI3E51t",
          "name": "Google Docs account"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "86fb16bb-484b-44df-b4f5-25fde65a6c7f",
      "name": "Docへのコンテンツ挿入",
      "type": "n8n-nodes-base.googleDocs",
      "position": [
        600,
        540
      ],
      "parameters": {
        "actionsUi": {
          "actionFields": [
            {
              "text": "={{ $json.content }}",
              "action": "insert"
            }
          ]
        },
        "operation": "update",
        "documentURL": "={{ $json.id }}"
      },
      "credentials": {
        "googleDocsOAuth2Api": {
          "id": "iOuZirVwbwI3E51t",
          "name": "Google Docs account"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "89810e9d-685e-4007-be83-0686ea779163",
      "name": "請求書詳細入力",
      "type": "n8n-nodes-base.googleDocs",
      "position": [
        800,
        940
      ],
      "parameters": {
        "actionsUi": {
          "actionFields": [
            {
              "text": "=FromCompany#",
              "action": "replaceAll",
              "replaceText": "={{ $('Google Sheets').item.json['Company From'] }}"
            },
            {
              "text": "ToCompany#",
              "action": "replaceAll",
              "replaceText": "={{ $('Google Sheets').item.json['Company To'] }}"
            },
            {
              "text": "Terms#",
              "action": "replaceAll",
              "replaceText": "={{ $('Google Sheets').item.json.Terms }}"
            },
            {
              "text": "Invoice#",
              "action": "replaceAll",
              "replaceText": "={{ $('Google Sheets').item.json.Invoice }}"
            },
            {
              "text": "Description#",
              "action": "replaceAll",
              "replaceText": "={{ $('Google Sheets').item.json.Description }}"
            },
            {
              "text": "Amount#",
              "action": "replaceAll",
              "replaceText": "={{ $('Google Sheets').item.json.Amount }}\n"
            }
          ]
        },
        "operation": "update",
        "documentURL": "={{ $('Merge').item.json.id }}"
      },
      "credentials": {
        "googleDocsOAuth2Api": {
          "id": "iOuZirVwbwI3E51t",
          "name": "Google Docs account"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "d9d22f6b-bd25-4af5-b460-c76e9a9c527b",
      "name": "付箋",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -460,
        -60
      ],
      "parameters": {
        "color": 3,
        "width": 480,
        "height": 1220,
        "content": "### Step 1: **Manual Trigger**\n- Node: `When clicking ‘Execute workflow’`\n- Use this to manually execute the workflow during testing or on-demand runs.\n\n---\n\n### Step 2: **Google Sheets — Load Invoice Data**\n- Node: `Google Sheets`\n- Pulls rows from this [Google Sheet](https://docs.google.com/spreadsheets/d/1MHVZRVo5aPs5VqRXk7lBNPVlZ2gilKqZ8J9yeg4taW4/edit#gid=0)  \n- **Sheet Expectations**:\n  - Columns: `Company From`, `Company To`, `Terms`, `Invoice`, `Description`, `Amount`\n\n**Required Credentials**:\n- **Google Sheets OAuth2**  \n  Follow these steps:\n  1. Go to [Google Cloud Console](https://console.cloud.google.com/)\n  2. Enable the **Google Sheets API**\n  3. Create OAuth 2.0 credentials\n  4. Add redirect URI:  \n     ```\n     https://api.n8n.cloud/oauth2-credential/callback\n     ```"
      },
      "typeVersion": 1
    },
    {
      "id": "ad368f70-57a1-4693-9763-d7d2b8980efe",
      "name": "付箋1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        40,
        -60
      ],
      "parameters": {
        "color": 4,
        "width": 460,
        "height": 1220,
        "content": "### ### Step 3: `Get Invoice Template` — Load Google Doc  \nLoads a static Google Docs template containing placeholder values.\n\n- 🧾 **Template URL**: [Copy This Template](https://docs.google.com/document/d/18n0HTqabDldi7fVbhbI1aG12qbFWsjyTXdduwDDOUu8/edit)\n- **Required Placeholders** in the document:\n  ```\n  FromCompany#\n  ToCompany#\n  Terms#\n  Invoice#\n  Description#\n  Amount#\n  ```\n\n> 🔑 **Credentials Required**:  \n> Connect to **Google Docs OAuth2 API** in n8n.\n\n---\n\n### ### Step 4: `Create New Doc` — Make Invoice File  \nCreates a new Google Doc by duplicating the invoice template.\n\n- **Title Format**: `Invoice: {{ $json.Invoice }}`\n- **Destination Folder ID**: `1TnDibwPPPUm3VbmETiqWDVhtaUTLJ6mn`  \n  *(You can change this to your own Google Drive folder)*\n\n> 🔐 Make sure your Google Docs credential has write access to this folder.\n\n---\n\n### ### Step 5: `Merge` — Combine Data  \nMerges the loaded document and spreadsheet row together for downstream updates.\n\n---"
      },
      "typeVersion": 1
    },
    {
      "id": "a17e1690-a974-4552-88d2-5d87b89f5045",
      "name": "付箋2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        520,
        -60
      ],
      "parameters": {
        "color": 5,
        "width": 480,
        "height": 1220,
        "content": "### ### Step 7: `Input Invoice Details` — Replace Fields  \nUses Google Docs API to replace all placeholders from the original template with the actual values.\n\n**Replacements:**\n\n| Placeholder    | Replaced With                |\n|----------------|------------------------------|\n| FromCompany#   | `Company From` from sheet     |\n| ToCompany#     | `Company To` from sheet       |\n| Terms#         | `Terms` from sheet            |\n| Invoice#       | `Invoice` number              |\n| Description#   | `Description` of service      |\n| Amount#        | `Amount` of invoice           |\n\n---\n\n## 📤 Final Output\n\nEach row from the Google Sheet results in a completed, branded Google Doc invoice stored in your Drive.\n\n---"
      },
      "typeVersion": 1
    },
    {
      "id": "9a875848-3be3-4763-8c08-05c2db7d4601",
      "name": "付箋3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -460,
        -180
      ],
      "parameters": {
        "width": 1460,
        "height": 100,
        "content": "## 💬 Need Help?\n📧 rbreen@ynteractive.com\n🔗 [LinkedIn](https://www.linkedin.com/in/robert-breen-29429625/)"
      },
      "typeVersion": 1
    }
  ],
  "pinData": {},
  "connections": {
    "e92eee15-18b1-4851-92ae-985d666b1857": {
      "main": [
        [
          {
            "node": "86fb16bb-484b-44df-b4f5-25fde65a6c7f",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "85ff7b59-2c72-4846-953a-46ab1f50fee8": {
      "main": [
        [
          {
            "node": "97b2ea4d-4904-49f5-bb1e-ae7e71156640",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "97b2ea4d-4904-49f5-bb1e-ae7e71156640": {
      "main": [
        [
          {
            "node": "e92eee15-18b1-4851-92ae-985d666b1857",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "736b3314-daf7-4bd2-82e0-9e23018091b5": {
      "main": [
        [
          {
            "node": "e92eee15-18b1-4851-92ae-985d666b1857",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "86fb16bb-484b-44df-b4f5-25fde65a6c7f": {
      "main": [
        [
          {
            "node": "89810e9d-685e-4007-be83-0686ea779163",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ede2cb2e-bb56-4870-94a4-c27c78509124": {
      "main": [
        [
          {
            "node": "736b3314-daf7-4bd2-82e0-9e23018091b5",
            "type": "main",
            "index": 0
          },
          {
            "node": "85ff7b59-2c72-4846-953a-46ab1f50fee8",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
よくある質問

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

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

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

中級 - 文書抽出

有料ですか?

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

関連ワークフロー

Google SheetsでカスタムパイヴォットテーブルとVLOOKUPを用いてマーケティング支出データを集約
GoogleスプレッドシートでカスタムパイバットテーブルとVLOOKUPでマーケティングの支出データを集約
Merge
Summarize
Google Sheets
+
Merge
Summarize
Google Sheets
10 ノードRobert Breen
文書抽出
マーケティング業績メールレポートの自動化
Google Sheets と Outlook を使ってマーケティングパフォーマンスのメールレポートを自動生成する
Merge
Summarize
Google Sheets
+
Merge
Summarize
Google Sheets
13 ノードRobert Breen
文書抽出
初学者データ分析:GPT-4oを使ってGoogleシートで結合・フィルタリング・サマリー
初心者のデータ分析:GPT-4o を使用して Google スプレッドシートで結合、フィルタリング、集計
If
Set
Code
+
If
Set
Code
21 ノードRobert Breen
文書抽出
Google Drive と Sheets を連携して複数のデータセットから複数ワークシートの Excel ワークブックを作成
データセットを統合してGoogle DriveとSheetsでマルチスプシートExcelブックを作成
Code
Merge
Google Drive
+
Code
Merge
Google Drive
12 ノードRobert Breen
文書抽出
GPT-4の洞察とPDF.coを使用してGoogle Sheetsからマーケティングレポートを生成
GPT-4の洞察とPDF.coを使用してGoogle Sheetsからマーケティングレポートを生成する
Code
Merge
Aggregate
+
Code
Merge
Aggregate
15 ノードRobert Breen
文書抽出
ポッドキャストのノート記録器
GPTとGeminiを使用してパフォーマンスデータと結合して、高転化率のMeta広告スクリプトを作成
Set
Code
Merge
+
Set
Code
Merge
24 ノードRobert Breen
文書抽出
ワークフロー情報
難易度
中級
ノード数11
カテゴリー1
ノードタイプ5
難易度説明

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

作成者
Robert Breen

Robert Breen

@rbreen

Professional services consultant with over 10 years of experience solving complex business problems across industries. I specialize in n8n and process automation—designing custom workflows that integrate tools like Google Calendar, Airtable, GPT, and internal systems. Whether you need to automate scheduling, sync data, or streamline operations, I build solutions that save time and drive results.

外部リンク
n8n.ioで表示

このワークフローを共有

カテゴリー

カテゴリー: 34