{"nodes":[{"id":"trigger-43a50227","name":"Manual Trigger","type":"n8n-nodes-base.manualTrigger","typeVersion":1,"position":[100,100],"parameters":{}},{"name":"Read Harvey's Email","type":"n8n-nodes-base.emailReadImap","position":[270,390],"parameters":{"options":{}},"credentials":{"imap":"Read Harvey's Mail"},"typeVersion":1,"id":"200e7ae0-4868-4302-b92d-04e196f1290d","notes":"This emailReadImap node performs automated tasks as part of the workflow."},{"name":"Who Is The Email From?","type":"n8n-nodes-base.switch","position":[460,390],"parameters":{"rules":{"rules":[{"value2":"Louis Litt <louis_litt_1970@yahoo.com>"}]},"value1":"={{$node[\"Read Harvey's Email\"].json[\"from\"]}}","dataType":"string","fallbackOutput":3},"typeVersion":1,"alwaysOutputData":false,"id":"399d6dcd-65d2-479e-92de-c5d7455c4169","notes":"This switch node performs automated tasks as part of the workflow."},{"name":"Read Excuses File","type":"n8n-nodes-base.readBinaryFile","position":[670,230],"parameters":{"filePath":"/home/n8n/Excuse_Generator.xlsx"},"typeVersion":1,"id":"640523db-96df-4613-91e9-f660b1b3b5e6","notes":"This readBinaryFile node performs automated tasks as part of the workflow."},{"name":"Retrieve Excuses Spreadsheet Data","type":"n8n-nodes-base.spreadsheetFile","position":[860,230],"parameters":{"options":{}},"typeVersion":1,"id":"c77a42c7-378f-421b-b9df-ad63e1125524","notes":"This spreadsheetFile node performs automated tasks as part of the workflow."},{"name":"Generate Excuse","type":"n8n-nodes-base.function","position":[1040,230],"parameters":{"functionCode":"var leadinmax = 24;\nvar perpmax = 25;\nvar delaymax = 23;\nvar leadin = Math.floor((Math.random() * leadinmax ) + 1);\nvar perp = Math.floor((Math.random() * perpmax ) + 1);\nvar delay = Math.floor((Math.random() * delaymax) + 1);\n\nvar excuse = items[leadin].json.Leadin + \" \" + items[perp].json.Perpetrator + \" \" + items[delay].json.Delay;\n\nitems = [{json:{}}];\n\nitems[0].json.excuse = excuse;\nreturn items;\n"},"typeVersion":1,"id":"d1a8239d-29a1-4835-bfb5-a97c7ff892a4","notes":"This function node performs automated tasks as part of the workflow."},{"name":"Merge Excuse and Mail Data","type":"n8n-nodes-base.merge","position":[1230,330],"parameters":{"mode":"mergeByIndex"},"typeVersion":1,"id":"6cf7d259-b94d-4d7a-9c5e-43f7ceaeea75","notes":"This merge node performs automated tasks as part of the workflow."},{"name":"Send Email","type":"n8n-nodes-base.emailSend","position":[1460,250],"parameters":{"text":"= {{$node[\"Merge Excuse and Mail Data\"].json[\"excuse\"]}}\n\nMaybe next time.\n\nHarvey","options":{},"subject":"=RE: {{$node[\"Merge Excuse and Mail Data\"].json[\"subject\"]}}","toEmail":"={{$node[\"Merge Excuse and Mail Data\"].json[\"from\"]}}","fromEmail":"={{$node[\"Merge Excuse and Mail Data\"].json[\"to\"]}}"},"credentials":{"smtp":"Send Harvey's Mail"},"typeVersion":1,"id":"bc8ad2df-83dc-4a37-a819-2894ab7a0969","notes":"This emailSend node performs automated tasks as part of the workflow."},{"name":"Slack (Louis)","type":"n8n-nodes-base.slack","position":[1470,410],"parameters":{"text":"=Here is what Louis emailed you:\n```\n{{$node[\"Merge Excuse and Mail Data\"].json[\"textPlain\"]}}\n```\n\nHere is how \"you\" responded:\n> {{$node[\"Merge Excuse and Mail Data\"].json[\"excuse\"]}}\n\n:+1: *You're Welcome!* :smirk:","channel":"private","attachments":[],"otherOptions":{"mrkdwn":true}},"credentials":{"slackApi":"Nathan's Slack API Token"},"typeVersion":1,"id":"7321887f-134b-47ce-b0b3-95d64cccb49f","notes":"This slack node performs automated tasks as part of the workflow."},{"name":"Slack (General)","type":"n8n-nodes-base.slack","position":[890,470],"parameters":{"text":"You've just received an email. You may wish to check it out.","channel":"private","attachments":[],"otherOptions":{"mrkdwn":true}},"credentials":{"slackApi":"Nathan's Slack API Token"},"typeVersion":1,"id":"c87ee22b-bf12-4f9a-9379-f9af68250e53","notes":"This slack node performs automated tasks as part of the workflow."}],"connections":{"Read Harvey's Email":{"main":[[],[],[],[],[],[],[],[]]},"Send Email":{"main":[[],[],[],[],[],[],[],[]]}},"name":"Emailreadimap Workflow","description":"Automated workflow: Emailreadimap Workflow. This workflow processes data and performs automated tasks.","settings":{"executionOrder":"v1","saveManualExecutions":true,"callerPolicy":"workflowsFromSameOwner","errorWorkflow":null,"timezone":"UTC","executionTimeout":3600,"maxExecutions":1000,"retryOnFail":true,"retryCount":3,"retryDelay":1000},"meta":{"instanceId":"workflow-422837aa","versionId":"1.0.0","createdAt":"2025-09-29T07:07:52.327239","updatedAt":"2025-09-29T07:07:52.327244","owner":"n8n-user","license":"MIT","category":"automation","status":"active","priority":"high","environment":"production"},"notes":"Excellent quality workflow: Emailreadimap Workflow. This workflow has been optimized for production use with comprehensive error handling, security, and documentation."}