{
  "name": "[공무원] 1일차 04 이메일 자동 발송",
  "nodes": [
    {
      "parameters": {},
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [0, 0],
      "id": "d1-trigger",
      "name": "수동 실행"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "s1",
              "name": "이름",
              "value": "김기태",
              "type": "string"
            },
            {
              "id": "s2",
              "name": "연락처",
              "value": "010-1111-2222",
              "type": "string"
            },
            {
              "id": "s3",
              "name": "이메일",
              "value": "본인이메일@example.com",
              "type": "string"
            },
            {
              "id": "s4",
              "name": "종류",
              "value": "생활",
              "type": "string"
            },
            {
              "id": "s5",
              "name": "상세설명",
              "value": "집 앞에 쓰레기가 무단 투기되어 있습니다.",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [220, 0],
      "id": "d1-sample",
      "name": "샘플 민원"
    },
    {
      "parameters": {
        "operation": "append",
        "documentId": {
          "__rl": true,
          "mode": "id",
          "value": "여기에_본인_시트_ID"
        },
        "sheetName": {
          "__rl": true,
          "mode": "name",
          "value": "시트1"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "이름": "={{ $json.이름 }}",
            "연락처": "={{ $json.연락처 }}",
            "이메일": "={{ $json.이메일 }}",
            "종류": "={{ $json.종류 }}",
            "상세설명": "={{ $json.상세설명 }}",
            "등록일": "={{ $now.format('yyyy-MM-dd') }}"
          },
          "schema": [
            { "id": "이름", "displayName": "이름", "type": "string", "display": true, "required": false, "defaultMatch": false, "canBeUsedToMatch": true },
            { "id": "연락처", "displayName": "연락처", "type": "string", "display": true, "required": false, "defaultMatch": false, "canBeUsedToMatch": true },
            { "id": "이메일", "displayName": "이메일", "type": "string", "display": true, "required": false, "defaultMatch": false, "canBeUsedToMatch": true },
            { "id": "종류", "displayName": "종류", "type": "string", "display": true, "required": false, "defaultMatch": false, "canBeUsedToMatch": true },
            { "id": "상세설명", "displayName": "상세설명", "type": "string", "display": true, "required": false, "defaultMatch": false, "canBeUsedToMatch": true },
            { "id": "등록일", "displayName": "등록일", "type": "string", "display": true, "required": false, "defaultMatch": false, "canBeUsedToMatch": true }
          ],
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.7,
      "position": [460, -300],
      "id": "d1-sheets",
      "name": "시트에 기록"
    },
    {
      "parameters": {
        "sendTo": "={{ $json.이메일 }}",
        "subject": "민원 접수",
        "emailType": "text",
        "message": "=담당팀께,\n\n아래와 같이 민원이 접수되었습니다.\n\n- 접수자명: {{ $json.이름 }}\n- 연락처: {{ $json.연락처 }}\n- 이메일: {{ $json.이메일 }}\n- 민원 종류: {{ $json.종류 }}\n- 상세 설명: {{ $json.상세설명 }}\n- 등록일: {{ $now.format('yyyy년 MM월 dd일 HH시 mm분') }}\n\n내용 확인 후 신속한 처리 바랍니다.\n\n감사합니다.",
        "options": {}
      },
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 2.2,
      "position": [460, -150],
      "id": "d1-gmail-send",
      "name": "접수 메일 보내기"
    }
  ],
  "connections": {
    "수동 실행": {
      "main": [[{ "node": "샘플 민원", "type": "main", "index": 0 }]]
    },
    "샘플 민원": {
      "main": [
        [
          { "node": "시트에 기록", "type": "main", "index": 0 },
          { "node": "접수 메일 보내기", "type": "main", "index": 0 }
        ]
      ]
    }
  },
  "settings": { "executionOrder": "v1" }
}
