{ "nodes": [ { "name": "IF", "type": "n8n-nodes-base.if", "position": [ 1050, 500 ], "parameters": { "conditions": { "string": [ { "value1": "={{$node[\"HTML Extract Data\"].data[\"title\"]}}", "value2": "Show HN:", "operation": "contains" } ] } }, "typeVersion": 1, "id": "node-d2334a95" }, { "name": "Send Email", "type": "n8n-nodes-base.emailSend", "position": [ 1450, 400 ], "parameters": { "text": "={{$node[\"Function\"].data[\"emailText\"]}}", "options": {}, "subject": "Trending Show HN" }, "typeVersion": 1, "id": "node-4a44d66f" }, { "name": "Cron", "type": "n8n-nodes-base.cron", "position": [ 250, 500 ], "parameters": { "triggerTimes": { "item": [ { "hour": 13 } ] } }, "typeVersion": 1, "id": "node-91d4e891" }, { "name": "Function", "type": "n8n-nodes-base.function", "position": [ 1250, 400 ], "parameters": { "functionCode": "let emailText = 'Currently trending \"Show HN\":\\n\\n';\n\nfor (let item of items) {\n emailText += `${item.json.rank} ${item.json.title}\\n${item.json.url}\\n\\n`;\n}\n\nreturn [{json: {emailText}}]\n" }, "typeVersion": 1, "id": "node-9b5c108c" }, { "name": "HTTP Request", "type": "n8n-nodes-base.httpRequest", "position": [ 450, 500 ], "parameters": { "url": "{{ $env.BASE_URL }}", "options": {}, "responseFormat": "string" }, "typeVersion": 1, "id": "node-bc2e1982" }, { "name": "HTML Extract Items", "type": "n8n-nodes-base.htmlExtract", "position": [ 650, 500 ], "parameters": { "options": {}, "extractionValues": { "values": [ { "key": "item", "cssSelector": "tr.athing", "returnArray": true, "returnValue": "html" } ] } }, "typeVersion": 1, "id": "node-62359a3b" }, { "name": "HTML Extract Data", "type": "n8n-nodes-base.htmlExtract", "position": [ 850, 500 ], "parameters": { "options": {}, "dataPropertyName": "item", "extractionValues": { "values": [ { "key": "title", "cssSelector": "a" }, { "key": "url", "attribute": "href", "cssSelector": "a.storylink", "returnValue": "attribute" }, { "key": "rank", "cssSelector": ".rank" } ] } }, "typeVersion": 1, "id": "node-42d60b40" }, { "id": "error-26d2dd22", "name": "Error Handler", "type": "n8n-nodes-base.stopAndError", "typeVersion": 1, "position": [ 1000, 400 ], "parameters": { "message": "Workflow execution error", "options": {} } } ], "connections": {}, "name": "Production Workflow", "settings": { "executionOrder": "v1", "saveManualExecutions": true, "callerPolicy": "workflowsFromSameOwner", "errorWorkflow": null, "timezone": "UTC", "executionTimeout": 3600, "maxExecutions": 1000, "retryOnFail": true, "retryCount": 3 }, "meta": { "instanceId": "workflow-d68a6e9a", "versionId": "1.0.0", "createdAt": "2025-09-29T07:07:45.910729", "updatedAt": "2025-09-29T07:07:45.910740", "owner": "n8n-user", "license": "MIT", "category": "automation", "status": "active", "priority": "high", "environment": "production" }, "tags": [ "automation", "n8n", "production-ready", "excellent", "optimized" ], "description": "Production-ready workflow: Production Workflow. This workflow has been optimized for production use with comprehensive error handling, security, and documentation." }