RECIPE 006
구글 폼 제출 → 담당자 자동 배정 알림
- ▸OpenWeatherMap API를 HTTP Request로 호출할 수 있다
- ▸날씨 코드를 이모지로 변환하는 Code 노드를 작성할 수 있다
- ▸Slack 또는 Gmail로 아침 날씨 브리핑을 자동 발송할 수 있다
✅사전 준비
- □OpenWeatherMap API 키 발급 (무료 플랜 가능, https://openweathermap.org/api)
- □Slack 또는 Gmail 자격증명 연결 완료
- □Schedule Trigger: 평일 오전 7시 30분 (Cron: 30 7 * * 1-5)
OpenWeatherMap API — HTTP Request URL
URL: https://api.openweathermap.org/data/2.5/weather
Query Parameters:
q: Seoul,KR
appid: YOUR_API_KEY
units: metric
lang: kr날씨 코드 → 이모지 변환 — Code 노드
const weather = $input.first().json;
const id = weather.weather[0].id;
let emoji = "🌤️";
if (id >= 200 && id < 300) emoji = "⛈️";
else if (id >= 300 && id < 400) emoji = "🌦️";
else if (id >= 500 && id < 600) emoji = "🌧️";
else if (id >= 600 && id < 700) emoji = "❄️";
else if (id >= 700 && id < 800) emoji = "🌫️";
else if (id === 800) emoji = "☀️";
else if (id > 800) emoji = "☁️";
return [{
json: {
emoji,
description: weather.weather[0].description,
temp: Math.round(weather.main.temp),
feels_like: Math.round(weather.main.feels_like),
humidity: weather.main.humidity,
city: weather.name,
}
}];Slack 메시지 포맷
{{ $json.emoji }} 오늘 {{ $json.city }} 날씨
기온: {{ $json.temp }}°C (체감 {{ $json.feels_like }}°C)
날씨: {{ $json.description }}
습도: {{ $json.humidity }}%⚡
워크플로우 JSON
아래 JSON을 복사해 n8n에 바로 임포트하세요
📥 n8n 임포트 방법
n8n 화면 우측 상단 메뉴 (⋮) → Import from JSON → 아래 JSON 전체 복사 후 붙여넣기 → Import 클릭
n8n 화면 우측 상단 메뉴 (⋮) → Import from JSON → 아래 JSON 전체 복사 후 붙여넣기 → Import 클릭
{
"name": "recipe006_form_submit_assign_notify",
"nodes": [
{
"parameters": {
"pollTimes": {
"item": [
{
"mode": "everyMinute",
"value": 5
}
]
},
"documentId": {
"__rl": true,
"mode": "id",
"value": "={{ $env.FORM_RESPONSE_SHEET_ID }}"
},
"sheetName": {
"__rl": true,
"mode": "name",
"value": "응답"
},
"event": "rowAdded",
"options": {}
},
"id": "sheets-trig-006-01",
"name": "구글 폼 새 응답 감지",
"type": "n8n-nodes-base.googleSheetsTrigger",
"typeVersion": 4.5,
"position": [
200,
400
]
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": false,
"leftValue": "",
"typeValidation": "strict"
},
"conditions": [
{
"id": "cond-type",
"leftValue": "={{ $json['문의 유형'] }}",
"rightValue": "기술 지원",
"operator": {
"type": "string",
"operation": "equals"
}
}
],
"combinator": "and"
}
},
"id": "if-006-02",
"name": "기술 지원 여부 확인",
"type": "n8n-nodes-base.if",
"typeVersion": 2,
"position": [
420,
400
]
},
{
"parameters": {
"resource": "message",
"operation": "post",
"channel": "#team-tech",
"text": "={{ '🔧 *기술 지원 문의 접수!*\\n\\n*제출자:* ' + $json['이름'] + '\\n*이메일:* ' + $json['이메일'] + '\\n*문의 내용:* ' + $json['문의 내용'] + '\\n\\n빠른 처리 부탁드려요!' }}",
"otherOptions": {}
},
"id": "slack-006-03",
"name": "기술팀 Slack 알림",
"type": "n8n-nodes-base.slack",
"typeVersion": 2.2,
"position": [
640,
280
]
},
{
"parameters": {
"resource": "message",
"operation": "post",
"channel": "#team-sales",
"text": "={{ '📋 *계약 관련 문의 접수!*\\n\\n*제출자:* ' + $json['이름'] + '\\n*이메일:* ' + $json['이메일'] + '\\n*문의 내용:* ' + $json['문의 내용'] + '\\n\\n빠른 확인 부탁드려요!' }}",
"otherOptions": {}
},
"id": "slack-006-04",
"name": "영업팀 Slack 알림",
"type": "n8n-nodes-base.slack",
"typeVersion": 2.2,
"position": [
640,
560
]
},
{
"parameters": {
"resource": "message",
"operation": "send",
"toEmail": "={{ $json['이메일'] }}",
"subject": "문의가 접수되었습니다",
"message": "={{ '안녕하세요, ' + $json['이름'] + '님!\\n\\n문의가 정상적으로 접수되었습니다.\\n담당자가 영업일 기준 1~2일 이내에 연락드리겠습니다.\\n\\n감사합니다.' }}",
"options": {}
},
"id": "gmail-006-05",
"name": "접수 확인 자동 답장",
"type": "n8n-nodes-base.gmail",
"typeVersion": 2.1,
"position": [
860,
400
]
}
],
"connections": {
"구글 폼 새 응답 감지": {
"main": [
[
{
"node": "기술 지원 여부 확인",
"type": "main",
"index": 0
}
]
]
},
"기술 지원 여부 확인": {
"main": [
[
{
"node": "기술팀 Slack 알림",
"type": "main",
"index": 0
},
{
"node": "접수 확인 자동 답장",
"type": "main",
"index": 0
}
],
[
{
"node": "영업팀 Slack 알림",
"type": "main",
"index": 0
},
{
"node": "접수 확인 자동 답장",
"type": "main",
"index": 0
}
]
]
}
},
"settings": {
"timezone": "Asia/Seoul"
},
"meta": {
"chapter": 1,
"recipe": "006",
"title": "구글 폼 제출 → 담당자 자동 배정 알림",
"difficulty": "⭐⭐",
"estimatedTime": "25분",
"apps": [
"Google Forms",
"Google Sheets",
"Slack",
"Gmail"
],
"workflowUrl": "www.koreaaitimes.com/books/n8n-vol2/recipe006"
}
}