8
n8n 한국어amn8n.com

이메일 요약

중급

이것은Personal Productivity, AI Summarization분야의자동화 워크플로우로, 11개의 노드를 포함합니다.주로 If, Code, Gmail, Limit, GoogleDocs 등의 노드를 사용하며. GPT-4 요약으로 Google 문서의 매일 이메일 요약

사전 요구사항
  • Google 계정 및 Gmail API 인증 정보
  • OpenAI API Key
워크플로우 미리보기
노드 연결 관계를 시각적으로 표시하며, 확대/축소 및 이동을 지원합니다
워크플로우 내보내기
다음 JSON 구성을 복사하여 n8n에 가져오면 이 워크플로우를 사용할 수 있습니다
{
  "id": "p5e76vbOIDIaf29H",
  "meta": {
    "instanceId": "6304e8877aa0fde3913b14034debe07006963fb497d63f280a91bbd75c6c24e1",
    "templateCredsSetupCompleted": true
  },
  "name": "Email Summary",
  "tags": [
    {
      "id": "TNPHEZ52JXA88tV0",
      "name": "AI",
      "createdAt": "2025-06-28T18:46:13.842Z",
      "updatedAt": "2025-06-28T18:46:13.842Z"
    },
    {
      "id": "pD2RVg49fBlIR8pA",
      "name": "Gmail",
      "createdAt": "2025-06-28T19:24:47.979Z",
      "updatedAt": "2025-06-28T19:24:47.979Z"
    },
    {
      "id": "wZ14hcyo2pYAOVlF",
      "name": "OpenAI",
      "createdAt": "2025-06-28T18:46:13.462Z",
      "updatedAt": "2025-06-28T18:46:13.462Z"
    },
    {
      "id": "M3TlU8Xdj7ZlK0PE",
      "name": "Project Management",
      "createdAt": "2025-06-28T18:46:13.681Z",
      "updatedAt": "2025-06-28T18:46:13.681Z"
    },
    {
      "id": "bpJw62xLnDDElGob",
      "name": "Building blocks",
      "createdAt": "2025-06-28T18:46:13.530Z",
      "updatedAt": "2025-06-28T18:46:13.530Z"
    },
    {
      "id": "3nY5Wk7HNEt9e9gW",
      "name": "DevOps",
      "createdAt": "2025-06-28T18:46:13.916Z",
      "updatedAt": "2025-06-28T18:46:13.916Z"
    },
    {
      "id": "1Z9wnauckk6RWoYl",
      "name": "Email",
      "createdAt": "2025-07-19T17:42:50.746Z",
      "updatedAt": "2025-07-19T17:42:50.746Z"
    }
  ],
  "nodes": [
    {
      "id": "10e1dc39-0561-4bfd-b80f-e60a91af3cb5",
      "name": "스티커 노트",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -80,
        -60
      ],
      "parameters": {
        "width": 1880,
        "height": 460,
        "content": "Telegram Email Summary Workflow"
      },
      "typeVersion": 1
    },
    {
      "id": "ef07131c-2d2c-42ed-a1de-7e5625c8057c",
      "name": "스티커 노트1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -80,
        -720
      ],
      "parameters": {
        "color": 3,
        "width": 580,
        "height": 640,
        "content": "Email Summary Workflow:\n\nThis n8n workflow automatically summarizes the latest email in your inbox and saves the summary to a Google Doc. It's designed as a simple, modular starting point that users can easily expand or customize.\n\nHow It Works\n- Trigger: A Schedule Trigger runs the workflow daily at 8 AM.\n\n- Get Email: The Gmail node fetches the most recent email.\n\n- Limit: Only the most recent email is passed through.\n\n- Check for New Email: An IF node determines whether a new email was found.\n\nIf yes, the email content is cleaned (HTML stripped, base64 decoded).\n\nIf no, a fallback message is created noting there are no new emails.\n\n- Summarization: The content is passed to OpenAI with a detailed prompt to summarize:\n\nSender\nDate\nSubject\nMain points, requests, and action items\n\n- Google Docs Output:\nA new Google Doc titled Email Summary is created (or reused).\nThe summary is inserted into the document for future reference.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "28c3ca0d-9397-41e3-b8b9-13a577e0ca98",
      "name": "일정 트리거",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -40,
        100
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "triggerAtHour": 8
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "da1aaa80-87a6-4d98-b14f-e08e327553bc",
      "name": "제한",
      "type": "n8n-nodes-base.limit",
      "position": [
        340,
        100
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "54653ec9-413f-4656-955c-3dcaacdee6cf",
      "name": "조건문",
      "type": "n8n-nodes-base.if",
      "position": [
        540,
        100
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "621c437c-e857-4e21-9aa6-ed75ae360775",
              "operator": {
                "type": "string",
                "operation": "notEquals"
              },
              "leftValue": "={{ $('Get Gmail').item.json.headers.from }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "f6b7ea0d-b521-459d-856c-f39a26962356",
      "name": "이메일",
      "type": "n8n-nodes-base.code",
      "position": [
        800,
        0
      ],
      "parameters": {
        "jsCode": "// This function will strip out HTML tags to leave only the plain text.\nfunction extractCleanText(html) {\n  if (!html) {\n    return '';\n  }\n  // A regular expression to remove HTML tags and extra whitespace.\n  return html.replace(/<[^>]*>/g, \"\").replace(/\\s+/g, ' ').trim();\n}\n\n// Process each email item passed to the node.\nreturn $input.all().map(item => {\n  const payload = item.json.payload || {};\n  const headers = payload.headers || [];\n  \n  // A helper function to find a specific header's value.\n  const getHeader = (name) => headers.find(h => h.name.toLowerCase() === name.toLowerCase())?.value || 'N/A';\n\n  const from = getHeader('From');\n  const subject = getHeader('Subject');\n  const date = getHeader('Date');\n\n  let bodyData = '';\n  // Check for multipart emails first.\n  if (payload.parts) {\n    // Prefer plain text over HTML for simplicity.\n    const plainPart = payload.parts.find(p => p.mimeType === 'text/plain');\n    const htmlPart = payload.parts.find(p => p.mimeType === 'text/html');\n    \n    // Use the data from the preferred part.\n    if (plainPart && plainPart.body && plainPart.body.data) {\n      bodyData = plainPart.body.data;\n    } else if (htmlPart && htmlPart.body && htmlPart.body.data) {\n      bodyData = htmlPart.body.data;\n    }\n  } else if (payload.body && payload.body.data) {\n    // Fallback for single-part emails.\n    bodyData = payload.body.data;\n  }\n\n  // The body content is Base64 encoded, so it needs to be decoded.\n  const decodedBody = Buffer.from(bodyData, 'base64').toString('utf-8');\n  \n  // Clean the decoded body to remove any lingering HTML.\n  const cleanBody = extractCleanText(decodedBody);\n\n  return {\n    json: {\n      from,\n      subject,\n      date,\n      body: cleanBody\n    }\n  };\n});"
      },
      "typeVersion": 2
    },
    {
      "id": "6967e64d-32ac-4981-969b-76719d0b0377",
      "name": "이메일 없음",
      "type": "n8n-nodes-base.code",
      "position": [
        800,
        240
      ],
      "parameters": {
        "jsCode": "return [\n  {\n    json: {\n      from: \"N/A\",\n      subject: \"No Email Found\",\n      date: new Date().toISOString(),\n      body: \"No new emails were found during this summary check. There is nothing to summarize at this time.\"\n    }\n  }\n];\n"
      },
      "typeVersion": 2
    },
    {
      "id": "a0e30b66-7329-4731-9401-5896855a7a22",
      "name": "Get Gmail",
      "type": "n8n-nodes-base.gmail",
      "position": [
        160,
        100
      ],
      "webhookId": "efcd3ee6-26a7-4c3d-84c2-c1cdef8a8d7c",
      "parameters": {
        "limit": 1,
        "simple": false,
        "filters": {},
        "options": {},
        "operation": "getAll"
      },
      "credentials": {
        "gmailOAuth2": {
          "id": "B0oVer8pX52LHrvw",
          "name": "Gmail account 2"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "a931d85d-40ea-4bde-a0aa-8f9a7ef14c04",
      "name": "이메일 요약 OpenAI",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        1060,
        120
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1",
          "cachedResultName": "GPT-4.1"
        },
        "options": {},
        "messages": {
          "values": [
            {
              "content": "=You are a professional AI assistant tasked with summarizing the most recent email received.\n\nYour goal is to deliver a clear, concise, and accurate summary that saves the user time by eliminating the need to read the full email. The summary should convey all essential details and maintain a professional tone.\n\nPlease include the following in your response:\n\nSender's name and email address: {{ $('Get Gmail').item.json.headers.from }}\n\nDate and time received: {{ $('Get Gmail').item.json.headers.date }}\n\nSubject line (if available): {{ $('Get Gmail').item.json.headers.subject }}\n\nMain purpose or topic of the email\n\nKey points, requests, or required actions\n\nAny additional relevant context that helps the user understand the email at a glance\n\nAvoid unnecessary repetition or filler. The summary should be easy to scan, but detailed enough that the user can fully understand the message without opening the original email.\n\nSummarize the following content:\n\n{{ $('Get Gmail').item.json.text }}"
            }
          ]
        },
        "simplify": false
      },
      "credentials": {
        "openAiApi": {
          "id": "Yks1Eic3YR07Cpm6",
          "name": "OpenAi account"
        }
      },
      "typeVersion": 1.8
    },
    {
      "id": "537c41f8-5cea-46d6-92a9-a2cffdd65bb2",
      "name": "Google Docs 생성",
      "type": "n8n-nodes-base.googleDocs",
      "position": [
        1420,
        120
      ],
      "parameters": {
        "title": "Email Summary",
        "folderId": "1ihoRENubwDmcwMqhFzbdnfuYQdU2YXVR"
      },
      "credentials": {
        "googleDocsOAuth2Api": {
          "id": "dSGiWWxQdhY5ywpg",
          "name": "Google Docs account"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "96ca547a-cb62-4eef-a9dc-765654c13e1d",
      "name": "Google Docs 업데이트",
      "type": "n8n-nodes-base.googleDocs",
      "position": [
        1620,
        120
      ],
      "parameters": {
        "simple": false,
        "actionsUi": {
          "actionFields": [
            {
              "text": "={{ $('Summary Email OpenAI').item.json.choices[0].message.content }}",
              "action": "insert"
            }
          ]
        },
        "operation": "update",
        "documentURL": "={{ $json.id }}"
      },
      "credentials": {
        "googleDocsOAuth2Api": {
          "id": "dSGiWWxQdhY5ywpg",
          "name": "Google Docs account"
        }
      },
      "typeVersion": 2
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "bf63aae4-7580-4cb7-93ab-9631974dc104",
  "connections": {
    "54653ec9-413f-4656-955c-3dcaacdee6cf": {
      "main": [
        [
          {
            "node": "f6b7ea0d-b521-459d-856c-f39a26962356",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "6967e64d-32ac-4981-969b-76719d0b0377",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "f6b7ea0d-b521-459d-856c-f39a26962356": {
      "main": [
        [
          {
            "node": "a931d85d-40ea-4bde-a0aa-8f9a7ef14c04",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "da1aaa80-87a6-4d98-b14f-e08e327553bc": {
      "main": [
        [
          {
            "node": "54653ec9-413f-4656-955c-3dcaacdee6cf",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "6967e64d-32ac-4981-969b-76719d0b0377": {
      "main": [
        [
          {
            "node": "a931d85d-40ea-4bde-a0aa-8f9a7ef14c04",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "a0e30b66-7329-4731-9401-5896855a7a22": {
      "main": [
        [
          {
            "node": "da1aaa80-87a6-4d98-b14f-e08e327553bc",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "28c3ca0d-9397-41e3-b8b9-13a577e0ca98": {
      "main": [
        [
          {
            "node": "a0e30b66-7329-4731-9401-5896855a7a22",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "537c41f8-5cea-46d6-92a9-a2cffdd65bb2": {
      "main": [
        [
          {
            "node": "96ca547a-cb62-4eef-a9dc-765654c13e1d",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "a931d85d-40ea-4bde-a0aa-8f9a7ef14c04": {
      "main": [
        [
          {
            "node": "537c41f8-5cea-46d6-92a9-a2cffdd65bb2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
자주 묻는 질문

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

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

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

중급 - 개인 생산성, AI 요약

유료인가요?

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

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

일정 경험을 가진 사용자를 위한 6-15개 노드의 중간 복잡도 워크플로우

저자
Michael Gullo

Michael Gullo

@drdoom

I’m passionate about using n8n to create realistic workflows that help working class people simplify their daily tasks. My workflows aim to make life easier by eliminating mundane, repetitive responsibilities that take up valuable time. I love turning automation into a tool that lets people focus on what matters most to them.

외부 링크
n8n.io에서 보기

이 워크플로우 공유

카테고리

카테고리: 34