{ "id": "kubWVFN16Jar4v4Q", "name": "Audiobook Notification Router", "nodes": [ { "parameters": {}, "id": "workflow-trigger", "name": "Execute Workflow Trigger", "type": "n8n-nodes-base.executeWorkflowTrigger", "typeVersion": 1.1, "position": [ 100, 300 ] }, { "parameters": { "operation": "send", "sendTo": "admin@ben.io", "subject": "={{ $json.emailSubject }}", "message": "={{ $json.emailHtmlBody }}", "options": {} }, "id": "send-gmail", "name": "Send Gmail", "type": "n8n-nodes-base.gmail", "typeVersion": 2.1, "position": [ 700, 200 ], "credentials": { "gmailOAuth2": { "id": "Os1ux3h3zFlC2XkG", "name": "Gmail account" } } }, { "parameters": { "assignments": { "assignments": [ { "id": "status", "name": "status", "value": "sent", "type": "string" } ] } }, "id": "return-status", "name": "Return Status", "type": "n8n-nodes-base.set", "typeVersion": 3.4, "position": [ 900, 200 ] }, { "id": "685a8518-fcbf-4a0c-84d0-3ab4dacb61a4", "name": "Build Email HTML (Item)", "type": "n8n-nodes-base.functionItem", "typeVersion": 1, "position": [ 500, 200 ], "parameters": { "functionCode": "const torrentCount = Number($json.torrent_count) || 0;\nconst torrents = Array.isArray($json.torrents) ? $json.torrents : [];\n\nfunction getMAMStatus(t) {\n return t.mam_torrent_id\n ? `✅ Yes`\n : '❌ No';\n}\n\nconst rows = torrents.length\n ? torrents.map(t => `\n
| Title | \nSeeders | \nSize | \nOn MAM? | \nLinks | \n
|---|