발행일: 2026-10-06(화) 11:44
← 목차로 돌아가기|하루 30분 n8n 시리즈 ② 실무 자동화 레시피 100
RECIPE 004

파일 업로드 완료 → 팀원 자동 알림

  • ▸GitHub Trigger로 이슈 이벤트를 감지할 수 있다
  • ▸Notion 노드로 데이터베이스에 새 페이지를 자동 생성할 수 있다
  • ▸GitHub 이슈 데이터를 Notion 필드에 매핑할 수 있다

✅사전 준비

  • □GitHub 자격증명(Personal Access Token) 연결 완료
  • □Notion 자격증명(Integration Token) 연결 완료
  • □Notion에 이슈 트래킹용 데이터베이스 생성 (제목 / 상태 / URL / 담당자 / 생성일 컬럼)
  • □GitHub Webhook을 받을 수 있도록 n8n이 외부에서 접근 가능한 환경인지 확인

GitHub Trigger 설정값

Events: Issues
→ opened, edited, closed, assigned 중 필요한 것 선택

Repository: 본인의 repo (예: username/repo-name)

Notion 노드 — 필드 매핑 표현식

제목(Title):   {{ $json.issue.title }}
상태(Select):  {{ $json.action === "closed" ? "완료" : "진행중" }}
URL(URL):      {{ $json.issue.html_url }}
담당자(Text):  {{ $json.issue.user.login }}
생성일(Date):  {{ $json.issue.created_at }}
💡 TIPGitHub Trigger 대신 Schedule Trigger + GitHub 노드(List Issues)를 조합하면 Webhook 없이도 구현할 수 있어요. n8n이 외부 접근이 안 되는 환경이라면 이 방식을 쓰세요.
⚡

워크플로우 JSON

아래 JSON을 복사해 n8n에 바로 임포트하세요

📥 n8n 임포트 방법
n8n 화면 우측 상단 메뉴 (⋮) → Import from JSON → 아래 JSON 전체 복사 후 붙여넣기 → Import 클릭
{
  "name": "recipe004_drive_upload_slack_notify",
  "nodes": [
    {
      "parameters": {
        "triggerOn": "specificFolder",
        "folderToWatch": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $env.WATCH_FOLDER_ID }}"
        },
        "event": "fileCreated",
        "options": {}
      },
      "id": "gdrive-trig-004-01",
      "name": "구글 드라이브 파일 업로드 감지",
      "type": "n8n-nodes-base.googleDriveTrigger",
      "typeVersion": 1,
      "position": [
        200,
        400
      ]
    },
    {
      "parameters": {
        "jsCode": "const fileName = $json.name || '파일명 없음';\nconst mimeType = $json.mimeType || '';\nconst fileLink = $json.webViewLink || '';\nconst uploadTime = $now.setLocale('ko').toFormat('M월 d일 HH:mm');\n\nconst mimeEmoji = (() => {\n  if (mimeType.includes('image')) return '🖼';\n  if (mimeType.includes('pdf')) return '📄';\n  if (mimeType.includes('spreadsheet') || mimeType.includes('excel')) return '📊';\n  if (mimeType.includes('presentation') || mimeType.includes('powerpoint')) return '📊';\n  if (mimeType.includes('document') || mimeType.includes('word')) return '📝';\n  return '📎';\n})();\n\nreturn [{\n  json: {\n    message: `${mimeEmoji} *새 파일이 업로드됐어요!*\\n\\n*파일명:* ${fileName}\\n*업로드 시간:* ${uploadTime}\\n*바로 열기:* ${fileLink}`\n  }\n}];"
      },
      "id": "code-004-02",
      "name": "알림 메시지 포맷",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        420,
        400
      ]
    },
    {
      "parameters": {
        "resource": "message",
        "operation": "post",
        "channel": "#file-updates",
        "text": "={{ $json.message }}",
        "otherOptions": {}
      },
      "id": "slack-004-03",
      "name": "Slack 파일 업로드 알림",
      "type": "n8n-nodes-base.slack",
      "typeVersion": 2.2,
      "position": [
        640,
        400
      ]
    }
  ],
  "connections": {
    "구글 드라이브 파일 업로드 감지": {
      "main": [
        [
          {
            "node": "알림 메시지 포맷",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "알림 메시지 포맷": {
      "main": [
        [
          {
            "node": "Slack 파일 업로드 알림",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "timezone": "Asia/Seoul"
  },
  "meta": {
    "chapter": 1,
    "recipe": "004",
    "title": "파일 업로드 완료 → 팀원 자동 알림",
    "difficulty": "⭐",
    "estimatedTime": "15분",
    "apps": [
      "Google Drive",
      "Slack"
    ],
    "workflowUrl": "www.koreaaitimes.com/books/n8n-vol2/recipe004"
  }
}
← 이전 레시피☰ 목차다음 레시피 →