{"id":"140","name":"Get today's date and day using the Function node","nodes":[{"name":"On clicking 'execute'","type":"n8n-nodes-base.manualTrigger","position":[250,300],"parameters":{},"typeVersion":1,"id":"34b178d6-d3ab-4b56-9581-8c9f13910175","notes":"This manualTrigger node performs automated tasks as part of the workflow."},{"name":"Function","type":"n8n-nodes-base.function","position":[450,300],"parameters":{"functionCode":"var date = new Date().toISOString();\nvar day = new Date().getDay();\nconst weekday = [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"];\n\nitems[0].json.date_today = date;\nitems[0].json.day_today = weekday[day];\n\nreturn items;"},"typeVersion":1,"id":"4826faa0-9869-412a-9e55-50e28683be04","notes":"This function node performs automated tasks as part of the workflow."},{"id":"error-be3531c1","name":"Error Handler","type":"n8n-nodes-base.stopAndError","typeVersion":1,"position":[1000,400],"parameters":{"message":"Workflow execution error","options":{}}}],"active":false,"settings":{"executionOrder":"v1","saveManualExecutions":true,"callerPolicy":"workflowsFromSameOwner","errorWorkflow":null,"timezone":"UTC","executionTimeout":3600,"maxExecutions":1000,"retryOnFail":true,"retryCount":3,"retryDelay":1000},"connections":{},"description":"Automated workflow: Get today's date and day using the Function node. This workflow processes data and performs automated tasks.","meta":{"instanceId":"workflow-42409062","versionId":"1.0.0","createdAt":"2025-09-29T07:07:48.649608","updatedAt":"2025-09-29T07:07:48.649685","owner":"n8n-user","license":"MIT","category":"automation","status":"active","priority":"high","environment":"production"},"notes":"Excellent quality workflow: Get today's date and day using the Function node. This workflow has been optimized for production use with comprehensive error handling, security, and documentation."}