콘텐츠로 이동

This n8n AI Agent Will Manage Your Email Inbox (100% Automatic)

원본 영상: This n8n AI Agent Will Manage Your Email Inbox (100% Automatic)

n8n + GPT-4o mini로 Gmail 수신함을 완전 자동화 — 분류부터 회신·전달까지 카테고리별 액션을 무인 실행.

  1. Gmail 트리거 설정 — “On Message Received” 트리거로 새 이메일 감지. 폴링 간격을 cron 표현식으로 5분마다 설정(기본 1분이면 월 1,440+ 오퍼레이션 소모).
  2. Text Classifier로 분류 — subject + snippet(본문)을 GPT-4o mini에 넘겨 카테고리 판별. 분류 항목: Promotions / Social / Personal / Sales / Recruitment / Receipts / Miscellaneous.
  3. Gmail 라벨 추가 — 분류 결과에 따라 해당 메시지에 커스텀 라벨 자동 부착.
  4. 카테고리별 후속 액션 분기:
    • Promotions → 읽음 취소(Mark as Read) 또는 별도 처리
    • Social → OpenAI로 요약 → Google Sheets에 행 추가
    • Personal → GPT로 초안 생성 → Gmail Draft 저장
    • Sales → GPT로 회신문 생성 → 해당 스레드에 즉시 Reply
    • Receipts → 담당자(회계팀) 이메일로 Forward
    • Miscellaneous → Telegram/Twilio 알림 등 자유 확장
카테고리액션비고
PromotionsMark as Read자동 처리, 별도 응답 불필요
Social요약 → Google Sheets 기록컬럼: ID, 날짜, 제목, 요약, snippet
PersonalGPT 초안 → Gmail Draft스레드 ID 연결해 해당 대화에 draft 생성
SalesGPT 회신 → Reply to Threaddraft 없이 즉시 발송
ReceiptsForward to accountant email원본 subject·HTML body 그대로 전달
MiscellaneousTelegram/Twilio 알림 (선택)catchall
  • GPT system message에 서명 지정: "Please sign off on all emails as: Best, [이름]"
  • OpenAI 응답 포맷: JSON (subject_line, email_body 키)으로 요청해야 이후 노드에서 드래그 앤 드롭 매핑 가능
  • n8n 이메일 발송 시 “Append n8n attribution” 옵션 비활성화 필수
  • 폴링 1분 간격 시 월 최대 1,440 오퍼레이션 소모 (n8n 입문 플랜 2,500 오퍼레이션 기준 약 2일치 소진) — 본인 계산
  • OpenAI API 최소 충전액 $5 필요

사용 도구: n8n, Gmail (OAuth), OpenAI GPT-4o mini, Google Sheets

워크플로 흐름:

Gmail Trigger (5분 폴링)
→ Text Classifier (GPT-4o mini)
→ [분기 6개]
Promotions → Gmail: Mark as Read
Social → OpenAI: Summarize → Google Sheets: Append Row
Personal → OpenAI: Draft Reply (JSON) → Gmail: Create Draft
Sales → OpenAI: Reply (JSON) → Gmail: Reply to Thread
Receipts → Gmail: Send (Forward to accountant)
Misc → Telegram / Twilio (선택)

프롬프트 패턴:

  • System: "You are an intelligent bot at summarizing/replying to emails. Please sign off as: Best, [Name]"
  • User: subject: {{subject}}\nbody: {{snippet}}\nfrom: {{from}}
  • Assistant(출력 포맷 지정): "Please format the response as JSON: { subject_line: ..., email_body: ... }"