Files
swarm-master/swarm-common/n8n-workflows/obsidian-6SKSZWZwuJNwuO2P.json
T
2026-06-04 13:26:50 -07:00

1 line
3.7 KiB
JSON

[{"updatedAt":"2026-05-14T21:36:33.163Z","createdAt":"2026-05-14T21:36:33.163Z","id":"6SKSZWZwuJNwuO2P","name":"Obsidian Inbox Triage","description":null,"active":true,"isArchived":false,"nodes":[{"parameters":{},"id":"a244fdef-bf36-4903-bc52-d37bbc501f64","name":"Manual Trigger","type":"n8n-nodes-base.manualTrigger","typeVersion":1,"position":[0,0]},{"parameters":{"rule":{"interval":[{"field":"cronExpression","expression":"0 18 * * *"}]}},"id":"f7ccf023-35a2-4011-9f35-82b7d9eb804d","name":"Daily 18:00 PT","type":"n8n-nodes-base.scheduleTrigger","typeVersion":1.2,"position":[0,180]},{"parameters":{"url":"http://172.19.0.1:27123/vault/Inbox/","options":{"timeout":30000},"authentication":"genericCredentialType","genericAuthType":"httpHeaderAuth"},"id":"21e3b6ca-f129-4884-82a4-80c9217cb0f4","name":"List Inbox","type":"n8n-nodes-base.httpRequest","typeVersion":4.2,"position":[280,80],"credentials":{"httpHeaderAuth":{"id":"465Swz2b71O2KRAK","name":"Obsidian Local REST API"}},"continueOnFail":true},{"parameters":{"jsCode":"\nconst now = new Date(); const date = now.toISOString().slice(0,10);\nconst input = $input.first().json;\nconst files = (Array.isArray(input.files) ? input.files : []).filter(f => f.endsWith('.md') && !f.includes('Triage'));\nconst lines = files.length ? files.map(f => `- [ ] [[${f.replace(/^Inbox\\//,'').replace(/\\.md$/,'')}]] — classify as Project / Resource / Decision / Runbook / Archive`).join('\\n') : '- No untriaged Inbox markdown files found.';\nconst body = `# Inbox Triage ${date}\n\nGenerated: ${now.toISOString()}\n\n## Inbox items\n\n${lines}\n\n## Promote to Projects\n\n- [ ] \n\n## Promote to Resources\n\n- [ ] \n\n## Promote to Decisions\n\n- [ ] \n\n## Promote to Runbooks\n\n- [ ] \n\n## Archive / Delete / Defer\n\n- [ ] \n`;\nreturn [{json:{path:`Inbox/Triage/${date}.md`, body}}];\n"},"id":"0b4e13c6-47ac-4d89-89b9-65d5da966c07","name":"Build Triage Note","type":"n8n-nodes-base.code","typeVersion":2,"position":[560,80]},{"parameters":{"method":"PUT","url":"={{'http://172.19.0.1:27123/vault/' + encodeURIComponent($json.path).replace(/%2F/g, '/')}}","sendHeaders":true,"headerParameters":{"parameters":[{"name":"Content-Type","value":"text/markdown"}]},"sendBody":true,"contentType":"raw","rawContentType":"text/markdown","body":"={{$json.body}}","options":{"timeout":30000},"authentication":"genericCredentialType","genericAuthType":"httpHeaderAuth"},"id":"dde63028-700e-4abd-af07-cb7af7119c99","name":"Write Triage Note","type":"n8n-nodes-base.httpRequest","typeVersion":4.2,"position":[840,80],"credentials":{"httpHeaderAuth":{"id":"465Swz2b71O2KRAK","name":"Obsidian Local REST API"}}}],"connections":{"Manual Trigger":{"main":[[{"node":"List Inbox","type":"main","index":0}]]},"Daily 18:00 PT":{"main":[[{"node":"List Inbox","type":"main","index":0}]]},"List Inbox":{"main":[[{"node":"Build Triage Note","type":"main","index":0}]]},"Build Triage Note":{"main":[[{"node":"Write Triage Note","type":"main","index":0}]]}},"settings":{"executionOrder":"v1","callerPolicy":"workflowsFromSameOwner","availableInMCP":false},"staticData":{"node:Daily 18:00 PT":{"recurrenceRules":[]}},"meta":null,"pinData":null,"versionId":"aa7b9bb1-7e61-410a-ae86-594e2325c52b","activeVersionId":"aa7b9bb1-7e61-410a-ae86-594e2325c52b","versionCounter":4,"triggerCount":1,"tags":[],"shared":[{"updatedAt":"2026-05-14T21:36:33.167Z","createdAt":"2026-05-14T21:36:33.167Z","role":"workflow:owner","workflowId":"6SKSZWZwuJNwuO2P","projectId":"WGdp8QunI1tHpjXa","project":{"updatedAt":"2026-03-11T21:08:10.005Z","createdAt":"2026-03-11T21:05:11.541Z","id":"WGdp8QunI1tHpjXa","name":"will will <will@wills-portal.com>","type":"personal","icon":null,"description":null,"creatorId":"5ad50ead-6e6a-4d12-ab5b-e5db15835bb5"}}],"versionMetadata":{"name":null,"description":null}}]