新しいGmailメールをGoogle Sheetsに自動記録

中級

これはCRM, Multimodal AI分野の自動化ワークフローで、11個のノードを含みます。主にCode, Gmail, Merge, Summarize, GoogleSheetsなどのノードを使用。 新しいGmailメールを自動のにGoogle Sheetsに記録

前提条件
  • Googleアカウント + Gmail API認証情報
  • Google Sheets API認証情報
ワークフロープレビュー
ノード接続関係を可視化、ズームとパンをサポート
ワークフローをエクスポート
以下のJSON設定をn8nにインポートして、このワークフローを使用できます
{
  "meta": {
    "instanceId": "ad0113c344ee237399e44e9f11798b05baeb83a6196d514a9ae9d2ad71c3b5c9",
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "ab1b7d2d-7eac-45eb-9e0a-36f14c56df14",
      "name": "ワークフロー実行時",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -592,
        -944
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "be31a0f1-8b41-48ea-b80b-cf3de29df733",
      "name": "付箋4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1088,
        -1536
      ],
      "parameters": {
        "width": 400,
        "height": 1056,
        "content": "\n## ⚙️ Setup Instructions\n\n### 1️⃣ Connect Gmail\n1. In **n8n → Credentials → New → Gmail OAuth2**  \n2. Log in with your Gmail account & approve access  \n3. Attach this credential to the **Get new messages** node in the workflow  \n\n---\n\n### 2️⃣ Connect Google Sheets\n1. Copy this [Google Sheet template](https://docs.google.com/spreadsheets/d/1t5VXtbo9g7SvGDPmeZok4HG1K-WI1PS0DNBylzmhVwg/edit?usp=drivesdk) into your own Drive  \n2. In **n8n → Credentials → New → Google Sheets (OAuth2)** → log in with your Google account & save  \n3. In the workflow, select your Spreadsheet ID and Worksheet (Sheet1 by default) in the **Google Sheets nodes**  \n\n---\n\n## 📬 Contact\nNeed help customizing this (e.g., filter by sender, auto-reply, or Slack notifications)?  \n\n📧 **robert@ynteractive.com**  \n🔗 **[Robert Breen](https://www.linkedin.com/in/robert-breen-29429625/)**  \n🌐 **[ynteractive.com](https://ynteractive.com)**\n"
      },
      "typeVersion": 1
    },
    {
      "id": "1d6e32b0-92fe-4473-a207-e895e66b79e2",
      "name": "付箋52",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -480,
        -1296
      ],
      "parameters": {
        "color": 3,
        "width": 224,
        "height": 336,
        "content": "### 1️⃣ Connect Gmail\n1. In **n8n → Credentials → New → Gmail OAuth2**  \n2. Log in with your Gmail account & approve access  \n3. Attach this credential to the **Get new messages** node in the workflow  "
      },
      "typeVersion": 1
    },
    {
      "id": "4f9c9dd4-6a32-4175-bde4-59224486c5ac",
      "name": "付箋50",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -640,
        -1536
      ],
      "parameters": {
        "color": 7,
        "width": 1392,
        "height": 1056,
        "content": "# 📋 Track Gmail Messages in Google Sheets with Automated Logging\n\nThis workflow automatically **fetches new Gmail messages since the last run** and appends them into a **Google Sheet** with their ID, snippet, and timestamp.  \nUse it to keep an ongoing log of emails, create lightweight CRMs, or power downstream automations.\n\n---"
      },
      "typeVersion": 1
    },
    {
      "id": "0ba209c5-f532-4a98-a60d-2c3867b7890f",
      "name": "付箋54",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        432,
        -992
      ],
      "parameters": {
        "color": 3,
        "width": 288,
        "height": 368,
        "content": "\n### 2️⃣ Connect Google Sheets\n1. Copy this [Google Sheet template](https://docs.google.com/spreadsheets/d/1t5VXtbo9g7SvGDPmeZok4HG1K-WI1PS0DNBylzmhVwg/edit?usp=drivesdk) into your own Drive  \n2. In **n8n → Credentials → New → Google Sheets (OAuth2)** → log in with your Google account & save  \n3. In the workflow, select your Spreadsheet ID and Worksheet (Sheet1 by default) in the **Google Sheets nodes**  \n"
      },
      "typeVersion": 1
    },
    {
      "id": "89e5ccfd-b798-427d-a3fb-e1c71e408076",
      "name": "メールをシートに追加",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        544,
        -752
      ],
      "parameters": {
        "columns": {
          "value": {
            "id": "={{ $json.id }}",
            "snippet": "={{ $('Get Current Emails').item.json.snippet }}",
            "datetime": "={{ $('Get Todays Date').item.json.date }}"
          },
          "schema": [
            {
              "id": "id",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "id",
              "defaultMatch": true,
              "canBeUsedToMatch": true
            },
            {
              "id": "snippet",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "snippet",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "datetime",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "datetime",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "id"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "appendOrUpdate",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1t5VXtbo9g7SvGDPmeZok4HG1K-WI1PS0DNBylzmhVwg/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1t5VXtbo9g7SvGDPmeZok4HG1K-WI1PS0DNBylzmhVwg",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1t5VXtbo9g7SvGDPmeZok4HG1K-WI1PS0DNBylzmhVwg/edit?usp=drivesdk",
          "cachedResultName": "Emails"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "HlBW2puZbuCCq8jJ",
          "name": "Google Sheets account 3"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "7fed2ca3-3b0e-4cd9-89e1-364e21e1e67d",
      "name": "本日の日付を取得",
      "type": "n8n-nodes-base.code",
      "position": [
        -176,
        -848
      ],
      "parameters": {
        "jsCode": "// n8n Code node (JavaScript) - ISO UTC format\nconst now = new Date();\n\n// Output as ISO string (e.g., 2025-08-25T21:07:22Z)\nconst formatted = now.toISOString().replace(/\\.\\d{3}Z$/, 'Z');\n\nreturn [{ date: formatted }];\n"
      },
      "typeVersion": 2
    },
    {
      "id": "57a1dc13-b00a-496c-b121-1b56444fc878",
      "name": "現在のメールを取得",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -416,
        -1104
      ],
      "parameters": {
        "options": {},
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1t5VXtbo9g7SvGDPmeZok4HG1K-WI1PS0DNBylzmhVwg/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1t5VXtbo9g7SvGDPmeZok4HG1K-WI1PS0DNBylzmhVwg",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1t5VXtbo9g7SvGDPmeZok4HG1K-WI1PS0DNBylzmhVwg/edit?usp=drivesdk",
          "cachedResultName": "Emails"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "HlBW2puZbuCCq8jJ",
          "name": "Google Sheets account 3"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "7a474f8f-7ca2-4c91-aff3-b69ecce19677",
      "name": "最新日付を取得",
      "type": "n8n-nodes-base.summarize",
      "position": [
        -96,
        -1216
      ],
      "parameters": {
        "options": {},
        "fieldsToSummarize": {
          "values": [
            {
              "field": "datetime",
              "aggregation": "max"
            }
          ]
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "0a1d33af-d580-4753-af4c-aba65f7c623f",
      "name": "結合",
      "type": "n8n-nodes-base.merge",
      "position": [
        272,
        -1264
      ],
      "parameters": {
        "mode": "combine",
        "options": {},
        "combineBy": "combineAll"
      },
      "typeVersion": 3.2
    },
    {
      "id": "2bc48807-0c03-4cac-ad18-60b99e7dc6aa",
      "name": "新規メッセージを取得",
      "type": "n8n-nodes-base.gmail",
      "position": [
        272,
        -976
      ],
      "webhookId": "65ed2723-9363-4e24-a4a6-f3aba4e2c69d",
      "parameters": {
        "simple": false,
        "filters": {
          "receivedAfter": "={{ $json.max_datetime }}"
        },
        "options": {},
        "operation": "getAll",
        "returnAll": true
      },
      "credentials": {
        "gmailOAuth2": {
          "id": "Kk42lZeRBQx5U4HR",
          "name": "Gmail account"
        }
      },
      "typeVersion": 2.1
    }
  ],
  "pinData": {},
  "connections": {
    "0a1d33af-d580-4753-af4c-aba65f7c623f": {
      "main": [
        [
          {
            "node": "2bc48807-0c03-4cac-ad18-60b99e7dc6aa",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "7a474f8f-7ca2-4c91-aff3-b69ecce19677": {
      "main": [
        [
          {
            "node": "0a1d33af-d580-4753-af4c-aba65f7c623f",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "7fed2ca3-3b0e-4cd9-89e1-364e21e1e67d": {
      "main": [
        [
          {
            "node": "0a1d33af-d580-4753-af4c-aba65f7c623f",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "2bc48807-0c03-4cac-ad18-60b99e7dc6aa": {
      "main": [
        [
          {
            "node": "89e5ccfd-b798-427d-a3fb-e1c71e408076",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "57a1dc13-b00a-496c-b121-1b56444fc878": {
      "main": [
        [
          {
            "node": "7a474f8f-7ca2-4c91-aff3-b69ecce19677",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "89e5ccfd-b798-427d-a3fb-e1c71e408076": {
      "main": [
        []
      ]
    },
    "ab1b7d2d-7eac-45eb-9e0a-36f14c56df14": {
      "main": [
        [
          {
            "node": "7fed2ca3-3b0e-4cd9-89e1-364e21e1e67d",
            "type": "main",
            "index": 0
          },
          {
            "node": "57a1dc13-b00a-496c-b121-1b56444fc878",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
よくある質問

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

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

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

中級 - 顧客管理, マルチモーダルAI

有料ですか?

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

関連ワークフロー

Marketing ROIリポートの生成にGoogle Sheets、GPT-4o、Eメールを使用
Google Sheets、GPT-4o、メールを使用してマーケティング活動のROIレポートを生成する
Code
Merge
Aggregate
+
Code
Merge
Aggregate
16 ノードRobert Breen
AI要約
GPT-4の洞察とPDF.coを使用してGoogle Sheetsからマーケティングレポートを生成
GPT-4の洞察とPDF.coを使用してGoogle Sheetsからマーケティングレポートを生成する
Code
Merge
Aggregate
+
Code
Merge
Aggregate
15 ノードRobert Breen
文書抽出
AI生成LinkedIn投稿(人間による承認付き)
GPT-4、GoToHuman、Blotatoを使用したAI生成LinkedIn投稿(人間による承認付き)
Code
Merge
Filter
+
Code
Merge
Filter
19 ノードRobert Breen
ソーシャルメディア
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
文書抽出
Google Drive と Sheets を連携して複数のデータセットから複数ワークシートの Excel ワークブックを作成
データセットを統合してGoogle DriveとSheetsでマルチスプシートExcelブックを作成
Code
Merge
Google Drive
+
Code
Merge
Google Drive
12 ノードRobert Breen
文書抽出
ワークフロー情報
難易度
中級
ノード数11
カテゴリー2
ノードタイプ7
難易度説明

経験者向け、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