{ "nodes": [ { "id": "email-latest-github-release-notes-0", "name": "Daily Trigger", "type": "n8n-nodes-base.scheduleTrigger", "position": [ 580, 260 ], "parameters": { "rule": { "interval": [ { "field": "cronExpression", "expression": "0 0 * * *" } ] } }, "typeVersion": 1.2 }, { "id": "email-latest-github-release-notes-1", "name": "Fetch Github Repo Releases", "type": "n8n-nodes-base.httpRequest", "position": [ 840, 260 ], "parameters": { "url": "https://api.github.com/repos/n8n-io/n8n/releases/latest", "options": { "timeout": 30000 } }, "typeVersion": 4.2 }, { "id": "email-latest-github-release-notes-2", "name": "Prepare release notes", "type": "n8n-nodes-base.code", "typeVersion": 2, "parameters": { "mode": "runOnceForAllItems", "jsCode": "function prepare({release}) {if(!release||typeof release!=='object'||!(typeof release.body==='string'||release.body==null))throw Error('Invalid release notes');return {hasBody:Object.hasOwn(release,'body'),body:{text:release.body??'',mode:'markdown'}};}\n\nconst p=prepare({release:$input.first().json});return p.hasBody?[{json:p}]:[];" } }, { "id": "email-latest-github-release-notes-3", "name": "Render Markdown", "type": "n8n-nodes-base.httpRequest", "typeVersion": 4.2, "parameters": { "method": "POST", "url": "https://api.github.com/markdown", "sendHeaders": true, "headerParameters": { "parameters": [ { "name": "Accept", "value": "text/html" } ] }, "sendBody": true, "specifyBody": "json", "jsonBody": "={{ $json.body }}", "options": { "timeout": 30000, "response": { "response": { "responseFormat": "text" } } } } }, { "id": "email-latest-github-release-notes-4", "name": "Send Gmail", "type": "n8n-nodes-base.gmail", "position": [ 1520, 260 ], "parameters": { "sendTo": "recipient@example.com", "subject": "Latest GitHub release notes", "message": "={{ $json.data }}", "emailType": "html", "options": { "appendAttribution": false } }, "typeVersion": 2.1 } ], "pinData": {}, "connections": { "Daily Trigger": { "main": [ [ { "node": "Fetch Github Repo Releases", "type": "main", "index": 0 } ] ] }, "Fetch Github Repo Releases": { "main": [ [ { "node": "Prepare release notes", "type": "main", "index": 0 } ] ] }, "Prepare release notes": { "main": [ [ { "node": "Render Markdown", "type": "main", "index": 0 } ] ] }, "Render Markdown": { "main": [ [ { "node": "Send Gmail", "type": "main", "index": 0 } ] ] } }, "name": "Email the Latest GitHub Release Notes", "active": false, "settings": { "timezone": "UTC", "executionOrder": "v1" } }