Notion & Airtable Integration
Notion và Airtable là 2 tools phổ biến nhất cho project management và data management. Bài này dạy bạn tự động hóa chúng với n8n.
🎯 Mục tiêu bài học
🎯 Mục tiêu
- CRUD operations với Notion databases
- CRUD operations với Airtable bases
- Sync data giữa Notion ↔ Airtable
- Build project management automations
Checkpoint
CRUD là gì? Tại sao Notion và Airtable là 2 tools phổ biến cho project management?
📝 Notion Integration
1. Notion Integration
1.1 Setup Notion Connection
- Go to notion.so/my-integrations
- Click New integration
- Name: "n8n Automation"
- Chọn workspace
- Copy Internal Integration Token
- Trong Notion, share database với integration
1.2 Notion Node Operations
| Operation | Mô tả |
|---|---|
| Get Database | Lấy danh sách pages trong database |
| Create Page | Tạo page/row mới |
| Update Page | Cập nhật properties |
| Get Page | Lấy chi tiết 1 page |
| Search | Tìm kiếm pages |
| Append Block | Thêm content vào page |
1.3 Read Database
1Notion node:2- Resource: Database Page3- Operation: Get Many4- Database: [Select your database]5- Return All: toggle on (or set limit)Output format:
1{2 "id": "page-id-123",3 "properties": {4 "Name": {"title": [{"text": {"content": "Task ABC"}}]},5 "Status": {"select": {"name": "In Progress"}},6 "Due Date": {"date": {"start": "2026-01-15"}},7 "Priority": {"select": {"name": "High"}}8 }9}1.4 Create Page
1Notion node:2- Resource: Database Page3- Operation: Create4- Database: [Select]5- Properties:6 - Name (title): "New Task from n8n"7 - Status (select): "To Do"8 - Due Date (date): "2026-02-01"9 - Priority (select): "Medium"1.5 Update Page
1Notion node:2- Resource: Database Page3- Operation: Update4- Page ID: {{ $json.id }}5- Properties:6 - Status: "Done"7 - Completed Date: {{ $now.format('yyyy-MM-dd') }}1.6 Notion Automation Patterns
Pattern 1: Auto-assign tasks
1Schedule (daily) → Notion Get (unassigned tasks) 2→ Round-robin assign → Notion Update → Slack notifyPattern 2: Status change notification
1Notion Trigger (page updated) → IF Status = "Done"2→ Slack post → Google Sheets logPattern 3: Meeting notes → Tasks
1Webhook (meeting notes) → AI Extract action items2→ Loop → Notion Create (1 page per task)Checkpoint
Để kết nối Notion với n8n, cần thực hiện những bước nào? Internal Integration Token là gì?
📊 Airtable Integration
2. Airtable Integration
2.1 Setup Airtable Connection
- Go to airtable.com/account → Generate API key (or Personal Access Token)
- In n8n: Add Airtable credentials
- Paste API key/token
2.2 Airtable Node Operations
| Operation | Mô tả |
|---|---|
| List | Lấy records từ table |
| Create | Tạo record mới |
| Update | Cập nhật record |
| Delete | Xóa record |
| Get | Lấy 1 record by ID |
2.3 Read Records
1Airtable node:2- Operation: List3- Base: [Select base]4- Table: "Projects"5- Return All: true6- Filter: Status = "Active"2.4 Create Record
1Airtable node:2- Operation: Create3- Base: [Select]4- Table: "Leads"5- Fields:6 - Name: {{ $json.name }}7 - Email: {{ $json.email }}8 - Source: "Website"9 - Created: {{ $now }}2.5 Update Record
1Airtable node:2- Operation: Update3- Record ID: {{ $json.id }}4- Fields:5 - Status: "Contacted"6 - Last Contact: {{ $now.format('yyyy-MM-dd') }}2.6 Airtable Automation Patterns
Pattern 1: CRM Pipeline
1Webhook (new lead) → Airtable Create → Email welcome2→ Wait 3 days → Airtable Update (follow-up) → Email reminderPattern 2: Inventory Tracker
1Schedule (hourly) → Airtable List (stock < threshold)2→ Loop → Slack alert per itemCheckpoint
Airtable node hỗ trợ những operations nào? Cho ví dụ use case cho "Create" và "List".
🔄 Notion ↔ Airtable Sync
3. Notion ↔ Airtable Sync
3.1 One-Way Sync: Airtable → Notion
1Schedule (every 15 min)2→ Airtable List (modified_after: last_run)3→ Loop each record4 → Notion Search (find matching page)5 → IF exists6 → Notion Update7 → ELSE: Notion Create3.2 Two-Way Sync (Advanced)
1⚠️ Two-way sync phức tạp — cần:21. Unique ID mapping (Airtable ID ↔ Notion Page ID)32. Last-modified timestamp tracking43. Conflict resolution (which wins?)54. Loop detection prevention6 7Recommendation: Dùng one-way sync khi có thể.3.3 Practical Example: Project Tracker
1Source of truth: Airtable (project data)2Display: Notion (team wiki)3 4Airtable table "Projects":5- Name, Status, Owner, Due Date, Budget6 7Notion database "Project Dashboard":8- Synced from Airtable every 15 min9- Team adds notes/comments in Notion10- Status changes flow back to AirtableCheckpoint
Two-way sync giữa Notion và Airtable phức tạp vì sao? Cần giải quyết những vấn đề gì?
🏷️ Working with Properties
4. Working with Properties
4.1 Notion Property Types
1// Title2"Name": {"title": [{"text": {"content": "My Title"}}]}3 4// Select5"Status": {"select": {"name": "Done"}}6 7// Multi-select8"Tags": {"multi_select": [{"name": "urgent"}, {"name": "bug"}]}9 10// Date11"Due": {"date": {"start": "2026-01-15", "end": "2026-01-20"}}12 13// Number14"Budget": {"number": 5000000}15 16// Checkbox17"Completed": {"checkbox": true}18 19// URL20"Link": {"url": "https://example.com"}21 22// People23"Assignee": {"people": [{"id": "user-id"}]}24 25// Relation26"Project": {"relation": [{"id": "page-id"}]}4.2 Airtable Field Types
1// Text2"Name": "Task ABC"3 4// Single Select5"Status": "In Progress"6 7// Multiple Select8"Tags": ["urgent", "bug"]9 10// Date11"Due Date": "2026-01-15"12 13// Number / Currency14"Budget": 500000015 16// Checkbox17"Completed": true18 19// Attachment20"Files": [{"url": "https://..."}]21 22// Linked Record23"Project": ["rec123"]5. Hands-on Lab
Lab 1: Task Manager
Build workflow nhận task từ Slack → tạo trong Notion:
- Slack Trigger — Message in #tasks channel
- AI Parse — Extract task name, assignee, due date
- Notion Create — Add to Tasks database
- Slack Reply — Confirm "✅ Task created!"
Lab 2: Lead Tracker
Build CRM workflow:
- Webhook (new lead from website)
- Airtable Create (save lead)
- Email (send welcome)
- Wait (3 days)
- Airtable Update (mark "Follow-up needed")
- Slack notify (sales team)
Lab 3: Content Calendar Sync
Sync content calendar từ Airtable → Notion:
- Schedule (every 30 min)
- Airtable List (upcoming content)
- Loop each item
- Notion Search (check if exists)
- Notion Create/Update accordingly
📝 Quiz
-
Để kết nối Notion với n8n, cần gì?
- Email và password
- Internal Integration Token + share database
- API key từ settings
- OAuth chỉ có trên paid plan
-
Airtable "List" operation dùng để?
- Tạo record mới
- Xóa records
- Lấy danh sách records từ table
- Create table
-
Two-way sync giữa Notion và Airtable thì?
- Đơn giản, chỉ cần 2 nodes
- Không thể
- Phức tạp, cần ID mapping + conflict resolution
- Tự động sẵn
🎯 Key Takeaways
- Notion — Create, Read, Update pages + databases
- Airtable — CRUD operations trên bases/tables
- Sync — One-way sync đơn giản, two-way cần cẩn thận
- Properties — Mỗi tool có cú pháp riêng cho field types
- Patterns — Task management, CRM, content calendar
Checkpoint
Cú pháp property types của Notion khác Airtable như thế nào? Cho ví dụ về "Select" type ở cả hai.
🚀 Bài tiếp theo
Slack & Discord Automation — Tự động hóa team communication!
