RECIPE 031
명함 정보 → CRM 자동 입력
- ▸Gmail Trigger로 수신 이메일을 자동으로 감지할 수 있다
- ▸이메일 내용을 Notion 페이지로 자동 변환해 저장할 수 있다
- ▸발신자/제목/날짜 기준으로 Notion 데이터베이스에 분류 저장할 수 있다
✅사전 준비
- □Gmail 자격증명 연결 완료
- □Notion 자격증명 연결 완료
- □Notion에 받은편지함 데이터베이스 생성 (제목/발신자/날짜/태그/본문 컬럼)
- □Gmail에서 아카이빙할 레이블 생성 (예: n8n-archive)
Gmail Trigger 설정값
Poll Every: 5 Minutes
Simplify: OFF (본문 포함을 위해 반드시 OFF)
Read Status: Unread Only
Label: INBOXNotion 페이지 생성 — 필드 매핑
Resource: Database Page
Operation: Create
Database ID: YOUR_NOTION_DB_ID
속성 매핑:
제목(Title): {{ $json.subject }}
발신자(Text): {{ $json.from }}
날짜(Date): {{ $json.date }}
태그(Select): {{ $json.from.includes('newsletter') ? '뉴스레터' : '일반' }}본문 블록 추가 — Notion Append Block
Operation: Append Block Children
Page ID: {{ $json.pageId }} (이전 노드에서 생성된 Notion 페이지 ID)
Block:
Type: paragraph
Content: {{ $json.text?.slice(0, 2000) }} (Notion 블록 2000자 제한)💡 TIPGmail 본문이 HTML인 경우 태그가 그대로 Notion에 저장됩니다. Code 노드에서 html.replace(/<[^>]*>/g, '') 로 태그를 제거한 뒤 저장하면 깔끔하게 읽힙니다.
⚡
워크플로우 JSON
아래 JSON을 복사해 n8n에 바로 임포트하세요
📥 n8n 임포트 방법
n8n 화면 우측 상단 메뉴 (⋮) → Import from JSON → 아래 JSON 전체 복사 후 붙여넣기 → Import 클릭
n8n 화면 우측 상단 메뉴 (⋮) → Import from JSON → 아래 JSON 전체 복사 후 붙여넣기 → Import 클릭
{
"recipeId": "recipe031",
"title": "명함 정보 → CRM 자동 입력",
"chapter": 3,
"category": "영업 & 리드 관리 자동화",
"difficulty": "⭐⭐",
"estimatedTime": "40분",
"description": "명함 사진을 이메일로 전송하면 Gmail Trigger가 감지하고, OpenAI Vision으로 이름·직함·연락처·이메일을 추출하여 HubSpot에 새 Contact를 자동 생성합니다.",
"apps": [
"Gmail",
"OpenAI",
"HubSpot"
],
"nodes": [
{
"id": "trigger_gmail",
"type": "trigger",
"name": "Gmail Trigger - 명함 이메일 감지",
"service": "gmail",
"config": {
"event": "newEmail",
"filter": {
"subject": "명함"
}
}
},
{
"id": "openai_vision",
"type": "action",
"name": "OpenAI Vision - 명함 정보 추출",
"service": "openai",
"config": {
"model": "gpt-4o",
"prompt": "이 명함 이미지에서 이름, 직함, 회사명, 연락처, 이메일 주소를 추출해서 JSON 형태로 반환해줘. 형식: {\"name\": \"\", \"title\": \"\", \"company\": \"\", \"phone\": \"\", \"email\": \"\"}",
"imageSource": "={{ $json[\"attachments\"][0][\"data\"] }}"
}
},
{
"id": "hubspot_contact",
"type": "action",
"name": "HubSpot - Contact 자동 생성",
"service": "hubspot",
"config": {
"operation": "upsert",
"contactFields": {
"firstname": "={{ $json[\"name\"].split(\" \")[0] }}",
"lastname": "={{ $json[\"name\"].split(\" \")[1] }}",
"jobtitle": "={{ $json[\"title\"] }}",
"company": "={{ $json[\"company\"] }}",
"phone": "={{ $json[\"phone\"] }}",
"email": "={{ $json[\"email\"] }}"
}
}
}
],
"connections": [
{
"from": "trigger_gmail",
"to": "openai_vision"
},
{
"from": "openai_vision",
"to": "hubspot_contact"
}
],
"envVars": [],
"qrCodeUrl": "https://www.koreaaitimes.com/books/n8n-vol2/recipe031"
}