WORKFLOW · N8N
InboxZero Lite — Simple Email Classifier (Log Only)
Productivity👁 5
WORKFLOW JSON
{
"meta": {
"instanceId": "inboxzero-lite-v1"
},
"name": "InboxZero Lite — Simple Email Classifier (Log Only)",
"tags": [
{
"id": "inboxzero",
"name": "InboxZero"
},
{
"id": "autoflow",
"name": "AutoFlow"
},
{
"id": "lite",
"name": "Lite"
}
],
"nodes": [
{
"id": "trigger-gmail",
"name": "Gmail: New Email",
"type": "n8n-nodes-base.gmailTrigger",
"position": [
200,
400
],
"parameters": {
"simple": false,
"filters": {
"readStatus": "unread"
},
"pollTimes": {
"item": [
{
"mode": "everyMinute",
"minute": 5
}
]
}
},
"typeVersion": 1.2
},
{
"id": "parse",
"name": "Parse Email",
"type": "n8n-nodes-base.code",
"position": [
420,
400
],
"parameters": {
"jsCode": "try {\n const e = $input.first().json;\n return [{ json: { messageId: e.id || '', from: e.from?.value?.[0]?.address || '', fromName: e.from?.value?.[0]?.name || '', subject: e.subject || '', snippet: (e.snippet || '').substring(0, 500), date: e.date || new Date().toISOString() } }];\n} catch (e) {\n throw new Error('Failed to parse email: ' + e.message);\n}"
},
"typeVersion": 2
},
{
"id": "ai-classify",
"name": "AI: Classify",
"type": "n8n-nodes-base.openAi",
"maxTries": 3,
"position": [
640,
400
],
"parameters": {
"model": "gpt-4o-mini",
"options": {
"maxTokens": 200,
"temperature": 0.2,
"responseFormat": "json_object"
},
"messages": {
"values": [
{
"role": "system",
"content": "Classify this email as: urgent, important, informational, or spam. Also write a 1-sentence summary. JSON: { \"category\": \"...\", \"summary\": \"...\" }"
},
{
"role": "user",
"content": "=From: {{$json.fromName}} <{{$json.from}}>\nSubject: {{$json.subject}}\n\n{{$json.snippet}}"
}
]
}
},
"retryOnFail": true,
"typeVersion": 1.8,
"waitBetweenTries": 2000
},
{
"id": "merge",
"name": "Merge Result",
"type": "n8n-nodes-base.code",
"position": [
860,
400
],
"parameters": {
"jsCode": "const email = $('Parse Email').first().json;\nconst aiRaw = $input.first().json;\nlet ai;\ntry { ai = JSON.parse(aiRaw.message?.content || '{}'); } catch(e) { ai = { category: 'informational', summary: '' }; }\nreturn [{ json: { ...email, category: ai.category || 'informational', summary: ai.summary || '', classifiedAt: new Date().toISOString() } }];"
},
"typeVersion": 2
},
{
"id": "log-sheets",
"name": "Log to Sheets",
"type": "n8n-nodes-base.googleSheets",
"maxTries": 2,
"position": [
1080,
400
],
"parameters": {
"columns": {
"value": {
"Date": "={{ $json.date }}",
"From": "={{ $json.from }}",
"Subject": "={{ $json.subject }}",
"Summary": "={{ $json.summary }}",
"Category": "={{ $json.category }}"
},
"mappingMode": "defineBelow"
},
"options": {},
"operation": "append",
"sheetName": {
"__rl": true,
"mode": "name",
"value": "Lite Log"
},
"documentId": {
"__rl": true,
"mode": "id",
"value": "={{ $env.INBOXZERO_SHEET_ID }}"
}
},
"retryOnFail": true,
"typeVersion": 4.5
},
{
"id": "note",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
120,
180
],
"parameters": {
"color": 6,
"width": 300,
"height": 180,
"content": "## InboxZero Lite — Classify Only\n\nSimplest version: classify + log.\nNo auto-actions, no Slack, no drafts.\n\nPerfect for trying InboxZero before\nenabling auto-actions."
},
"typeVersion": 1
}
],
"settings": {
"executionOrder": "v1",
"saveManualExecutions": true
},
"connections": {
"Parse Email": {
"main": [
[
{
"node": "AI: Classify",
"type": "main",
"index": 0
}
]
]
},
"AI: Classify": {
"main": [
[
{
"node": "Merge Result",
"type": "main",
"index": 0
}
]
]
},
"Merge Result": {
"main": [
[
{
"node": "Log to Sheets",
"type": "main",
"index": 0
}
]
]
},
"Gmail: New Email": {
"main": [
[
{
"node": "Parse Email",
"type": "main",
"index": 0
}
]
]
}
}
}RELATED WORKFLOWS
COMMENTS
No comments yet — be the first.
