8
n8n 한국어amn8n.com

일일 이메일 요약 및 집계 봇

중급

이것은자동화 워크플로우로, 14개의 노드를 포함합니다.주로 If, Code, Gmail, Slack, Aggregate 등의 노드를 사용하며. Gmail에서 Slack으로의 GPT-4o 요약이 포함된 자동화된 이메일 요약

사전 요구사항
  • Google 계정 및 Gmail API 인증 정보
  • Slack Bot Token 또는 Webhook URL

카테고리

-
워크플로우 미리보기
노드 연결 관계를 시각적으로 표시하며, 확대/축소 및 이동을 지원합니다
워크플로우 내보내기
다음 JSON 구성을 복사하여 n8n에 가져오면 이 워크플로우를 사용할 수 있습니다
{
  "id": "pjLIqJYyE8diFDeq",
  "meta": {
    "instanceId": "7036f994fcf077f382ea0edc134b49e1ce0556fa914b12051651961e7fbc3600",
    "templateCredsSetupCompleted": true
  },
  "name": "Daily Email Digest and Summary Bot",
  "tags": [],
  "nodes": [
    {
      "id": "b098a164-6c8a-4d51-9876-cfbde2e5da76",
      "name": "일정 트리거",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -32,
        272
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "cronExpression",
              "expression": "0 0 8 * * *"
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "2aa30690-0b1b-49eb-bae4-eb3c48bc840c",
      "name": "메모",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -96,
        -80
      ],
      "parameters": {
        "height": 304,
        "content": "## Daily Email Digest Workflow\nThis workflow runs daily at 8 AM to analyze yesterday's emails and send a summary to Slack.\n\n**Setup Required:**\n- Configure Gmail credentials\n- Configure Slack credentials\n- Adjust schedule time if needed"
      },
      "typeVersion": 1
    },
    {
      "id": "90dcdae6-5d2b-496f-8774-ee8d377bbd5a",
      "name": "Gmail - Get Yesterday's Emails",
      "type": "n8n-nodes-base.gmail",
      "position": [
        192,
        272
      ],
      "webhookId": "98420742-a7f3-4dde-8070-95c939a516a2",
      "parameters": {
        "filters": {
          "receivedAfter": "={{ $now.minus({days: 1}).startOf('day').toISO() }}",
          "receivedBefore": "={{ $now.startOf('day').toISO() }}"
        },
        "operation": "getAll"
      },
      "typeVersion": 2.1
    },
    {
      "id": "96501595-c231-4d53-b028-cbe0915b0a5c",
      "name": "메모1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        128,
        464
      ],
      "parameters": {
        "color": 7,
        "height": 256,
        "content": "## Gmail Configuration\nRetrieves all emails from the previous day (midnight to midnight).\n\n**Credentials needed:**\n- Gmail OAuth2 connection\n- Grant necessary permissions for reading emails"
      },
      "typeVersion": 1
    },
    {
      "id": "5fa53f71-b724-489b-8492-767fdd972a26",
      "name": "AI 에이전트 - Analyze Emails",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        864,
        176
      ],
      "parameters": {
        "text": "=Analyze these emails from yesterday and create a concise daily digest summary:\n\nEmails to analyze:\n{{ JSON.stringify($json) }}\n\nCreate a structured summary that includes:\n1. Total number of emails received\n2. Important/urgent emails (if any)\n3. Key messages grouped by sender or topic\n4. Action items or requests that need attention\n5. Brief overview of main topics discussed\n\nFormat the output as a clean, readable summary suitable for Slack.",
        "options": {
          "systemMessage": "You are an intelligent email assistant that analyzes emails and creates concise, well-organized daily digest summaries. Focus on extracting the most important information, action items, and key messages. Group related emails together and highlight urgent matters. Keep the summary concise but comprehensive."
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 2
    },
    {
      "id": "888291d6-3791-4a85-bfba-39d00acced61",
      "name": "OpenRouter Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "position": [
        864,
        400
      ],
      "parameters": {
        "model": "openai/gpt-4o-mini",
        "options": {
          "maxTokens": 2000,
          "temperature": 0.3
        }
      },
      "typeVersion": 1
    },
    {
      "id": "23577fe9-3338-4167-9edf-0acc4a77c5a0",
      "name": "구조화된 출력 파서",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        1008,
        400
      ],
      "parameters": {
        "schemaType": "manual",
        "inputSchema": "{\n  \"type\": \"object\",\n  \"properties\": {\n    \"summary\": {\n      \"type\": \"string\",\n      \"description\": \"The complete daily email digest summary formatted for Slack\"\n    },\n    \"emailCount\": {\n      \"type\": \"number\",\n      \"description\": \"Total number of emails analyzed\"\n    },\n    \"urgentItems\": {\n      \"type\": \"array\",\n      \"description\": \"List of urgent or important items\",\n      \"items\": {\n        \"type\": \"string\"\n      }\n    },\n    \"actionItems\": {\n      \"type\": \"array\",\n      \"description\": \"List of action items or tasks\",\n      \"items\": {\n        \"type\": \"string\"\n      }\n    }\n  },\n  \"required\": [\"summary\", \"emailCount\"]\n}"
      },
      "typeVersion": 1.2
    },
    {
      "id": "d0ad860d-14d4-47f2-afef-4922e3bdf53e",
      "name": "메모2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        864,
        560
      ],
      "parameters": {
        "color": 7,
        "height": 240,
        "content": "## AI Processing\nThe AI Agent analyzes all emails from yesterday and creates a structured summary.\n\n**OpenRouter Credentials needed:**\n- API key from OpenRouter\n- Model: GPT-4o-mini for cost efficiency"
      },
      "typeVersion": 1
    },
    {
      "id": "ec852ebf-1b9a-43a5-90c1-9f972bc101ad",
      "name": "Format for Slack",
      "type": "n8n-nodes-base.code",
      "position": [
        1216,
        176
      ],
      "parameters": {
        "jsCode": "// Format the AI summary for Slack\nconst output = $input.first().json.output;\nconst today = new Date().toLocaleDateString('en-US', { \n  weekday: 'long', \n  year: 'numeric', \n  month: 'long', \n  day: 'numeric' \n});\n\nlet slackMessage = `:email: *Daily Email Digest for ${today}*\\n\\n`;\nslackMessage += `*Total Emails Analyzed:* ${output.emailCount}\\n\\n`;\n\nif (output.urgentItems && output.urgentItems.length > 0) {\n  slackMessage += `:warning: *Urgent Items:*\\n`;\n  output.urgentItems.forEach(item => {\n    slackMessage += `• ${item}\\n`;\n  });\n  slackMessage += `\\n`;\n}\n\nif (output.actionItems && output.actionItems.length > 0) {\n  slackMessage += `:clipboard: *Action Items:*\\n`;\n  output.actionItems.forEach(item => {\n    slackMessage += `• ${item}\\n`;\n  });\n  slackMessage += `\\n`;\n}\n\nslackMessage += `:memo: *Summary:*\\n${output.summary}`;\n\nreturn {\n  message: slackMessage,\n  emailCount: output.emailCount\n};"
      },
      "typeVersion": 2
    },
    {
      "id": "1e20a30b-a265-47ac-850a-1b4ff962e271",
      "name": "Slack - Send Summary",
      "type": "n8n-nodes-base.slack",
      "position": [
        1440,
        176
      ],
      "webhookId": "970ab742-56bc-451d-9e29-85971c4d5328",
      "parameters": {
        "text": "={{ $json.message }}",
        "select": "channel",
        "channelId": {
          "__rl": true,
          "mode": "list",
          "value": "C09L12N8F45",
          "cachedResultName": "test"
        },
        "otherOptions": {},
        "authentication": "oAuth2"
      },
      "typeVersion": 2.2
    },
    {
      "id": "4f1132de-0ac8-49e1-a0c5-a4dbff364a08",
      "name": "메모3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1376,
        336
      ],
      "parameters": {
        "color": 7,
        "height": 352,
        "content": "## Slack Configuration\nSends the formatted daily digest to your Slack channel.\n\n**Setup Required:**\n1. Configure Slack OAuth2 credentials\n2. Select the target channel (default: #general)\n3. Grant bot permissions to post messages\n\n**Note:** Adjust the channel name to your preference"
      },
      "typeVersion": 1
    },
    {
      "id": "b116a4a7-eb4d-43c7-99ef-f0f55d985273",
      "name": "항목 목록",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        640,
        176
      ],
      "parameters": {
        "options": {},
        "aggregate": "aggregateAllItemData"
      },
      "typeVersion": 1
    },
    {
      "id": "ccf5813b-4e0c-476c-99df-fae172256d3c",
      "name": "If",
      "type": "n8n-nodes-base.if",
      "position": [
        416,
        272
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "ee3a0b33-70b2-482a-9d3b-3dfe751952e8",
              "operator": {
                "type": "number",
                "operation": "gt"
              },
              "leftValue": "={{ $items().length }}",
              "rightValue": 0
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "eb88744e-7214-4c49-975e-525d0bf3614b",
      "name": "Slack - No Emails",
      "type": "n8n-nodes-base.slack",
      "position": [
        640,
        368
      ],
      "webhookId": "4f76c067-fbbd-4527-956c-72778225a4a7",
      "parameters": {
        "text": "=*:email: Daily Email Digest — No emails*\nTarget date (JST): {{$now.setZone('Asia/Tokyo').minus({days:1}).toFormat('yyyy-LL-dd (ccc)')}}\nNo emails were found for yesterday. The next digest will run as scheduled.",
        "select": "channel",
        "channelId": {
          "__rl": true,
          "mode": "list",
          "value": "C09L12N8F45",
          "cachedResultName": "test"
        },
        "otherOptions": {},
        "authentication": "oAuth2"
      },
      "typeVersion": 2.3
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "callerPolicy": "workflowsFromSameOwner",
    "errorWorkflow": "E2fdCmZVIRZ1HURh",
    "executionOrder": "v1"
  },
  "versionId": "3509e277-92f9-4748-8272-2ff915f900c6",
  "connections": {
    "ccf5813b-4e0c-476c-99df-fae172256d3c": {
      "main": [
        [
          {
            "node": "Item Lists",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "eb88744e-7214-4c49-975e-525d0bf3614b",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Item Lists": {
      "main": [
        [
          {
            "node": "AI Agent - Analyze Emails",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ec852ebf-1b9a-43a5-90c1-9f972bc101ad": {
      "main": [
        [
          {
            "node": "1e20a30b-a265-47ac-850a-1b4ff962e271",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "90dcdae6-5d2b-496f-8774-ee8d377bbd5a",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "888291d6-3791-4a85-bfba-39d00acced61": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent - Analyze Emails",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "AI Agent - Analyze Emails",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent - Analyze Emails": {
      "main": [
        [
          {
            "node": "ec852ebf-1b9a-43a5-90c1-9f972bc101ad",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "90dcdae6-5d2b-496f-8774-ee8d377bbd5a": {
      "main": [
        [
          {
            "node": "ccf5813b-4e0c-476c-99df-fae172256d3c",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
자주 묻는 질문

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

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

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

중급

유료인가요?

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

워크플로우 정보
난이도
중급
노드 수14
카테고리-
노드 유형10
난이도 설명

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

외부 링크
n8n.io에서 보기

이 워크플로우 공유

카테고리

카테고리: 34