MinAI - Về trang chủ
Lý thuyết
3/1340 phút
Đang tải...

Note-Taking Automation

Tự động capture và organize content với n8n - save web clippings, organize notes, sync giữa Notion/Obsidian

📝 Note-Taking Automation

Note Taking

0

🎯 Mục tiêu bài học

TB5 min

Sau bài học này, bạn sẽ:

✅ Kết nối Notion với n8n cho note management

✅ Xây dựng web clipper và email-to-notes workflows

✅ Implement auto-tagging và inbox processing

✅ Tạo daily notes tự động và sync giữa Notion/Obsidian

Capturing và organizing knowledge thủ công rất time-consuming. Bài này hướng dẫn automate note-taking để build personal knowledge base effortlessly.

1

🔍 Note Automation Overview

TB5 min

What to Automate:

📝Note-Taking Automation
📥Capture
🌐Web clippings
📧Email highlights
🔖Social bookmarks
🎙️Voice notes transcription
📸Screenshot OCR
🗂️Organize
🏷️Auto-tagging
📂Smart categorization
🔗Linking related notes
📥Inbox processing
🗄️Archive management
🔄Sync
💻Cross-platform sync
☁️Backup to cloud
📤Export formats
📋Version control

Checkpoint

Ba category chính của note automation là gì?

2

🛠️ Notion Setup

TB5 min

Connect Notion:

Ví dụ
11. Add Notion node
22. Create Integration at notion.so/my-integrations
33. Get Internal Integration Token
44. Share database with integration
55. Copy database ID from URL

Database Structure:

🗃️Recommended Notion Database
📌Title (title)
📋Type (select): Article, Video, Tweet, Note
📊Status (select): Inbox, Processing, Done
🏷️Tags (multi-select)
🔗Source URL (url)
📅Created (date)
📝Summary (rich_text)
📄Content (page content)

Checkpoint

Notion database nên có những properties nào?

3

⚡ Workflow 1: Web Clipper

TB5 min

Save Articles via Webhook:

Web Clipper

🔗Webhook: /clip
📄Extract Article Content
🤖Summarize with AI
📝Create Notion Page
Return Success

Extract Article Content:

JavaScript
1const url = $input.item.json.url;
2
3// Use HTTP Request to fetch page
4// Or use external API like Mercury Parser
5
6return {
7 url,
8 title: $input.item.json.title || 'Untitled',
9 content: $input.item.json.content || '',
10 extractedAt: new Date().toISOString()
11};

Create Notion Page:

JSON
1{
2 "name": "Create Notion Page",
3 "type": "n8n-nodes-base.notion",
4 "parameters": {
5 "operation": "create",
6 "databaseId": "your-database-id",
7 "title": "={{ $json.title }}",
8 "properties": {
9 "Type": {
10 "select": { "name": "Article" }
11 },
12 "Status": {
13 "select": { "name": "Inbox" }
14 },
15 "Source URL": {
16 "url": "={{ $json.url }}"
17 },
18 "Created": {
19 "date": { "start": "={{ $json.extractedAt }}" }
20 },
21 "Summary": {
22 "rich_text": [{ "text": { "content": "={{ $json.summary }}" }}]
23 }
24 }
25 }
26}

iOS Shortcut Integration:

JavaScript
1// Webhook receives from iOS Shortcut:
2// {
3// "url": "https://example.com/article",
4// "title": "Article Title",
5// "selection": "Selected text if any"
6// }
7
8const input = $input.item.json;
9
10return {
11 url: input.url,
12 title: input.title,
13 highlight: input.selection,
14 source: 'iOS Shortcut',
15 savedAt: new Date().toISOString()
16};

Checkpoint

Web clipper workflow hoạt động qua những bước nào?

4

🔧 Workflow 2: Email to Notes

TB5 min

Save Important Emails:

Email to Notion

📧Gmail Trigger: Label 'Save to Notes'
📄Extract Content
📎Process Attachments
📝Create Notion Page
📥Archive Email

Email Processing:

JavaScript
1const email = $input.item.json;
2
3// Clean up email content
4let content = email.text || email.snippet;
5
6// Remove signatures
7content = content.replace(/--\s*\n[\s\S]*$/m, '');
8content = content.replace(/Sent from my iPhone/g, '');
9
10// Extract key info
11const fromName = email.from.split('<')[0].trim();
12const date = new Date(email.internalDate);
13
14return {
15 title: email.subject,
16 content: content,
17 source: fromName,
18 sourceEmail: email.from,
19 receivedDate: date.toISOString(),
20 type: 'Email',
21 emailId: email.id
22};

Checkpoint

Email-to-notes workflow xử lý content email như thế nào?

5

🏗️ Workflow 3: Social Bookmarks

TB5 min

Save Twitter/X Bookmarks:

Twitter to Notion

Schedule: Daily
🐦Get Twitter Bookmarks via API
🔁For Each Tweet
🔍Check if Already Saved
📝No → Create Notion Page
⏭️Yes → Skip

Tweet Processing:

JavaScript
1const tweet = $input.item.json;
2
3// Extract thread if needed
4const isThread = tweet.conversation_id !== tweet.id;
5
6// Extract media
7const hasMedia = tweet.attachments?.media_keys?.length > 0;
8
9// Clean tweet text
10let content = tweet.text;
11
12// Remove t.co links
13content = content.replace(/https:\/\/t\.co\/\w+/g, '');
14
15return {
16 title: content.substring(0, 50) + (content.length > 50 ? '...' : ''),
17 content: content,
18 author: tweet.author.username,
19 authorName: tweet.author.name,
20 tweetUrl: `https://twitter.com/${tweet.author.username}/status/${tweet.id}`,
21 isThread,
22 hasMedia,
23 metrics: {
24 likes: tweet.public_metrics.like_count,
25 retweets: tweet.public_metrics.retweet_count
26 },
27 savedAt: new Date().toISOString()
28};

Checkpoint

Social bookmarks workflow kiểm tra duplicate bằng cách nào?

6

📊 Workflow 4: Auto-Tagging

TB5 min

Smart Tag Assignment:

JavaScript
1const note = $input.item.json;
2const content = (note.title + ' ' + note.content).toLowerCase();
3
4// Define tag rules
5const tagRules = [
6 { keywords: ['ai', 'machine learning', 'gpt', 'neural'], tag: 'AI/ML' },
7 { keywords: ['javascript', 'react', 'node', 'typescript'], tag: 'Development' },
8 { keywords: ['productivity', 'habit', 'routine', 'efficiency'], tag: 'Productivity' },
9 { keywords: ['business', 'startup', 'entrepreneur', 'revenue'], tag: 'Business' },
10 { keywords: ['design', 'ui', 'ux', 'figma'], tag: 'Design' },
11 { keywords: ['marketing', 'seo', 'growth', 'conversion'], tag: 'Marketing' },
12 { keywords: ['book', 'reading', 'author'], tag: 'Books' },
13 { keywords: ['video', 'youtube', 'watch'], tag: 'Video' }
14];
15
16const matchedTags = [];
17
18for (const rule of tagRules) {
19 if (rule.keywords.some(kw => content.includes(kw))) {
20 matchedTags.push(rule.tag);
21 }
22}
23
24// Default tag if no matches
25if (matchedTags.length === 0) {
26 matchedTags.push('Uncategorized');
27}
28
29return {
30 ...note,
31 autoTags: matchedTags
32};

AI-Powered Tagging:

JavaScript
1// Use OpenAI to suggest tags
2const note = $input.item.json;
3
4const prompt = `
5Analyze this note and suggest 1-3 relevant tags from this list:
6[AI/ML, Development, Productivity, Business, Design, Marketing, Personal, Health, Finance, Books, Video, Tools]
7
8Title: ${note.title}
9Content: ${note.content.substring(0, 500)}
10
11Return only the tags as a comma-separated list, nothing else.
12`;
13
14return {
15 prompt,
16 noteData: note
17};
18
19// After OpenAI call:
20// Parse response and extract tags

Checkpoint

Auto-tagging system sử dụng keyword matching rules như thế nào?

7

💡 Workflow 5: Inbox Processing

TB5 min

Weekly Inbox Cleanup:

Process Inbox

Schedule: Sunday 6 PM
📋Get Notes with Status = 'Inbox'
🔁For Each Note
📦Old (> 7 days) → Move to Archive
🏷️Recent → Generate Summary & Tags
🔄Update Status to 'Processing'
💬Send Review List to Slack

Inbox Processing Logic:

JavaScript
1const notes = $input.all();
2const now = new Date();
3const weekAgo = new Date(now - 7 * 24 * 60 * 60 * 1000);
4
5const toArchive = [];
6const toProcess = [];
7const needsReview = [];
8
9for (const note of notes) {
10 const createdAt = new Date(note.json.created);
11 const daysSince = Math.floor((now - createdAt) / (1000 * 60 * 60 * 24));
12
13 if (createdAt < weekAgo) {
14 // Old unprocessed notes go to archive
15 toArchive.push({
16 id: note.json.id,
17 title: note.json.title,
18 reason: `Unprocessed for ${daysSince} days`
19 });
20 } else if (note.json.autoTags?.length === 0) {
21 // Needs tagging
22 needsReview.push({
23 id: note.json.id,
24 title: note.json.title,
25 action: 'needs_tags'
26 });
27 } else {
28 toProcess.push({
29 id: note.json.id,
30 title: note.json.title,
31 tags: note.json.autoTags
32 });
33 }
34}
35
36return {
37 toArchive,
38 toProcess,
39 needsReview,
40 summary: {
41 total: notes.length,
42 archiving: toArchive.length,
43 processing: toProcess.length,
44 review: needsReview.length
45 }
46};

Checkpoint

Inbox processing workflow xử lý notes cũ hơn 7 ngày như thế nào?

8

🌟 Workflow 6: Obsidian Sync

TB5 min

Sync Notion to Obsidian:

Notion → Obsidian

Schedule: Daily
📄Get Updated Notion Pages
📝Convert to Markdown
💎Write to Obsidian Vault

Convert to Markdown:

JavaScript
1const page = $input.item.json;
2
3// Convert Notion properties to frontmatter
4const frontmatter = `---
5title: "${page.title}"
6tags: [${page.tags?.join(', ') || ''}]
7source: ${page.sourceUrl || ''}
8created: ${page.created}
9status: ${page.status}
10
11`;
12
13// Convert Notion blocks to markdown
14const content = page.content || '';
15
16// Build wikilinks for tags
17const wikilinks = page.tags?.map(tag => `[[${tag}]]`).join(' ') || '';
18
19const markdown = frontmatter + content + '\n\n' + wikilinks;
20
21return {
22 filename: page.title.replace(/[<>:"/\\|?*]/g, '-') + '.md',
23 content: markdown,
24 folder: page.type || 'Inbox'
25};

Checkpoint

Notion to Obsidian sync convert content thành format gì?

9

📈 Workflow 7: Daily Notes

TB5 min

Auto-Generate Daily Note:

Daily Note Creator

Schedule: 6 AM Daily
📅Get Today's Calendar Events
Get Incomplete Tasks
📝Get Yesterday's Notes
📄Generate Daily Note Template
💾Create in Notion/Obsidian

Daily Note Template:

JavaScript
1const events = $('Get Calendar').all();
2const tasks = $('Get Tasks').all();
3const yesterdayNotes = $('Get Notes').all();
4
5const today = new Date();
6const dateStr = today.toISOString().split('T')[0];
7const dayName = today.toLocaleDateString('en-US', { weekday: 'long' });
8
9const template = `
10# ${dayName}, ${dateStr}
11
12## Focus
13What's the ONE thing I need to accomplish today?
14- [ ]
15
16## Schedule
17${events.map(e => `- ${new Date(e.json.start.dateTime).toLocaleTimeString('en-US', {hour: '2-digit', minute:'2-digit'})} - ${e.json.summary}`).join('\n') || 'No meetings scheduled'}
18
19## Tasks
20### Carried Over
21${tasks.filter(t => !t.json.completed).slice(0, 5).map(t => `- [ ] ${t.json.title}`).join('\n') || '- [ ] All caught up!'}
22
23### Today
24- [ ]
25- [ ]
26- [ ]
27
28## Notes
29(Quick capture throughout the day)
30
31## Learning
32Notes saved yesterday: ${yesterdayNotes.length}
33${yesterdayNotes.slice(0, 3).map(n => `- [[${n.json.title}]]`).join('\n')}
34
35## Evening Review
36- What went well?
37- What could be improved?
38- What am I grateful for?
39
40*Daily note auto-generated by n8n*
41`;
42
43return {
44 title: `Daily Note - ${dateStr}`,
45 content: template,
46 date: dateStr
47};

Checkpoint

Daily notes template bao gồm những sections nào?

10

📋 Best Practices

TB5 min
Note Automation Tips

Capture:

  • ✅ Make capture frictionless (1-click)
  • ✅ Add source URL always
  • ✅ Capture now, process later

Organize:

  • ✅ Use consistent tagging
  • ✅ Regular inbox cleanup
  • ✅ Link related notes

Avoid:

  • ❌ Over-capturing (quality > quantity)
  • ❌ Too many tags
  • ❌ Orphan notes (no connections)

Checkpoint

Tại sao nên capture now, process later?

11

📝 Bài Tập Thực Hành

TB5 min
Note-Taking Challenge

Build your knowledge system:

  1. Create web clipper webhook + iOS Shortcut
  2. Set up email to notes workflow
  3. Implement auto-tagging system
  4. Build weekly inbox processor
  5. Create daily note template generator

Build your second brain! 🧠

Checkpoint

Bạn đã hoàn thành những challenges nào trong bài tập?

12

🧠 Key Takeaways

TB5 min
Remember
  • 📥 Capture fast - Minimize friction
  • 🏷️ Tag smart - Auto-tag when possible
  • 📦 Process regularly - Inbox zero weekly
  • 🔗 Connect notes - Build knowledge graph
  • 🔄 Sync everywhere - Access from any device

Checkpoint

Nguyên tắc Inbox zero weekly nghĩa là gì?

🚀 Bài tiếp theo

Personal Dashboards — Daily briefings và information aggregation.