Notion 노드 — 지식 관리 자동화
Notion은 문서와 데이터베이스의 경계를 허문 도구다. n8n과 연결하면 RSS 피드, 이메일, API 데이터가 자동으로 Notion에 정리된다.
Notion API 설정
Step 1: Notion Integration 생성
- notion.so/my-integrations 접속
- "새 API 통합" 클릭
- 이름: "n8n Automation", 워크스페이스 선택
- Internal Integration Secret 복사 (
secret_...)
Step 2: 데이터베이스에 통합 연결
Notion에서 자동화할 데이터베이스 페이지를 열고:
1. 우상단 ... → 연결 → "n8n Automation" 추가
Step 3: n8n Credential 등록
n8n → Credentials → Add → "Notion API" → API Key에 Secret 입력
Notion 데이터베이스 CRUD
Create — 아이템 생성
Resource: Database Page
Operation: Create
Database: (연결된 데이터베이스 선택)
Properties:
제목(Title): {{ $json.title }}
태그(Multi-select): {{ $json.tags }}
상태(Select): "신규"
날짜(Date): {{ $now.toISO() }}
URL: {{ $json.url }}
Read — 아이템 조회
Resource: Database Page
Operation: Get Many
Database: (선택)
Filters:
Property: "상태"
Condition: equals
Value: "진행중"
Sort:
Property: "날짜"
Direction: Descending
Limit: 10
Update — 아이템 수정
Resource: Database Page
Operation: Update
Page ID: {{ $json.pageId }}
Properties:
상태(Select): "완료"
완료일(Date): {{ $now.toISO() }}
Page 내용 추가
데이터베이스 아이템의 본문에 내용을 추가:
Resource: Block
Operation: Append
Block ID: {{ $json.pageId }}
Content:
- Heading 2: "AI 요약"
- Paragraph: {{ $json.summary }}
- Bulleted List: {{ $json.keyPoints }}
실전: RSS → AI 요약 → Notion 자동 등록
[Schedule: 매일 오전 8시]
→ [RSS Feed Read: 테크 뉴스]
→ [Filter: 24시간 이내]
→ [HTTP Request: OpenAI API (요약)]
→ [Notion: 데이터베이스에 추가]
RSS Feed Read 설정
URL: https://news.hada.io/rss
Filter 설정
Condition: {{ DateTime.fromISO($json.pubDate).diffNow('hours').hours > -24 }}
OpenAI API로 요약
HTTP Request:
URL: https://api.openai.com/v1/chat/completions
Body: {
"model": "gpt-4o-mini",
"messages": [
{"role": "system", "content": "기사를 3줄로 요약해주세요."},
{"role": "user", "content": "{{ $json.contentSnippet }}"}
]
}
Notion 저장
Properties:
제목: {{ $('RSS Feed Read').item.json.title }}
요약: {{ $json.choices[0].message.content }}
원본 URL: {{ $('RSS Feed Read').item.json.link }}
수집일: {{ $now.toISO() }}
상태: "미읽음"
📝 정리
- [x] Notion Integration: my-integrations에서 API Key 발급 → 데이터베이스에 연결
- [x] CRUD: Create(생성), Get Many(조회+필터), Update(수정)
- [x] Block API: 페이지 본문에 텍스트, 제목, 목록 등 블록 추가
- [x] 실전: RSS 피드 → AI 요약 → Notion 데이터베이스 자동 등록
다음 편 예고
16편: Telegram Bot 노드 — 메신저 자동화
Telegram Bot을 만들어 n8n에 연결한다. 명령어 처리, 자동 응답, 서버 상태 조회 챗봇까지.