Task: RPA-First task

n8n workflow:
{"nodes":[{"name":"HTTP Request","type":"n8n-nodes-base.httpRequest","position":[480,300],"parameters":{"url":"https://internal.users.n8n.cloud/webhook/custom-erp","options":{"splitIntoItems":true},"authentication":"headerAuth","headerParametersUi":{"parameter":[{"name":"unique_id","value":"recaj2mRaXZ1US6W0"}]}},"credentials":{"httpHeaderAuth":{"id":"1","name":"Header Auth account"}},"typeVersion":1},{"name":"Airtable","type":"n8n-nodes-base.airtable","position":[1140,100],"parameters":{"table":"tblVGFoBNWfigjCve","options":{},"operation":"append","application":"appDwjW2sNaXEH6Eu"},"credentials":{"airtableApi":{"id":"2","name":"Airtable account"}},"typeVersion":1},{"name":"IF","type":"n8n-nodes-base.if","position":[680,300],"parameters":{"conditions":{"string":[{"value1":"={{$json[\"orderStatus\"]}}","value2":"processing"}]}},"typeVersion":1},{"name":"Set","type":"n8n-nodes-base.set","position":[960,100],"parameters":{"values":{"number":[{"name":"orderID","value":"={{$json[\"orderID\"]}}"}],"string":[{"name":"employeeName","value":"={{$json[\"employeeName\"]}}"}]},"options":{},"keepOnlySet":true},"typeVersion":1},{"name":"Function","type":"n8n-nodes-base.function","position":[980,380],"parameters":{"functionCode":"let totalBooked = items.length;\nlet bookedSum = 0;\n\nfor(let i=0; i < items.length; i++) {\n  bookedSum = bookedSum + items[i].json.orderPrice;\n}\nreturn [{json:{totalBooked, bookedSum}}];"},"typeVersion":1},{"name":"Discord","type":"n8n-nodes-base.discord","position":[1600,600],"parameters":{"text":"=This week we have {{$node[\"Function\"].json[\"totalBooked\"]}} booked orders with a total value of {{$node[\"Function\"].json[\"bookedSum\"]}}. My Unique ID: {{$node[\"HTTP Request\"].parameter[\"headerParametersUi\"][\"parameter\"][0][\"value\"]}}","options":{},"webhookUri":"https://internal.users.n8n.cloud/webhook/course-level-1"},"typeVersion":1},{"name":"Cron","type":"n8n-nodes-base.cron","position":[260,300],"parameters":{"triggerTimes":{"item":[{"hour":9,"mode":"everyWeek"}]}},"typeVersion":1},{"name":"Send Email","type":"n8n-nodes-base.emailSend","position":[1420,600],"parameters":{"text":"=BookedSum: {{$node[\"Function\"].json[\"bookedSum\"]}} TotalBooked:{{$node[\"Function\"].json[\"totalBooked\"]}}","options":{},"subject":"=ZHIYUAN SUN n8n-[1] {{$json.time}}","toEmail":"hitsmit@yopmail.com","fromEmail":"zhiyuansun703@gmail.com"},"credentials":{"smtp":{"id":"3","name":"SMTP account"}},"typeVersion":1},{"name":"GetDate","type":"n8n-nodes-base.function","position":[1200,560],"parameters":{"functionCode":"var time = new Date()\nreturn [{time}]"},"typeVersion":1}],"connections":{"IF":{"main":[[{"node":"Set","type":"main","index":0}],[{"node":"Function","type":"main","index":0}]]},"Set":{"main":[[{"node":"Airtable","type":"main","index":0}]]},"Cron":{"main":[[{"node":"HTTP Request","type":"main","index":0}]]},"GetDate":{"main":[[{"node":"Send Email","type":"main","index":0}]]},"Function":{"main":[[{"node":"GetDate","type":"main","index":0}]]},"Send Email":{"main":[[{"node":"Discord","type":"main","index":0}]]},"HTTP Request":{"main":[[{"node":"IF","type":"main","index":0}]]}}}