Hi,
I have this below flow which takes the data and puts into excel and sends it as an attachment.
[{"id":"75213df52c14c49d","type":"tab","label":"Flow 1","disabled":false,"info":"","env":[]},{"id":"5d64f6b3253b286e","type":"function","z":"75213df52c14c49d","name":"","func":"msg.payload=\n [{\n \"No1\": \"101010101\", \n \"No2\":\"236482634763\", \n \"No3\": \"324523623\",\n \"No4\" : [\"11\",\"22\",\"32\",\"16\",\"102\"],\n \"No5\": [\"15\",\"236\",\"362\",\"87\"]\n }]\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":120,"y":300,"wires":[["2155bee091949ab6","d5bc86d05379693c"]]},{"id":"2155bee091949ab6","type":"nanoid","z":"75213df52c14c49d","name":"","idLength":8,"property":"filename","propertyType":"msg","x":260,"y":300,"wires":[["185a201b05e8d807"]]},{"id":"185a201b05e8d807","type":"change","z":"75213df52c14c49d","name":"","rules":[{"t":"set","p":"filepath","pt":"msg","to":"'/tmp/'&filename&'.xlsx'","tot":"jsonata"},{"t":"set","p":"filename","pt":"msg","to":"filepath","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":420,"y":300,"wires":[["e1f1cd60f8aea8fb"]]},{"id":"e1f1cd60f8aea8fb","type":"excel","z":"75213df52c14c49d","name":"","file":"/tmp/Details.xlsx","x":570,"y":300,"wires":[["5ac652da600e84dc"]]},{"id":"5ac652da600e84dc","type":"file in","z":"75213df52c14c49d","name":"","filename":"","format":"","chunk":false,"sendError":false,"encoding":"none","allProps":false,"x":700,"y":300,"wires":[["1d4f39e4ef111f74"]]},{"id":"1d4f39e4ef111f74","type":"base64","z":"75213df52c14c49d","name":"","action":"str","property":"payload","x":860,"y":300,"wires":[["b79bb9dd8d53aae6"]]},{"id":"b79bb9dd8d53aae6","type":"template","z":"75213df52c14c49d","name":"Email body","field":"payload","fieldType":"msg","format":"json","syntax":"mustache","template":"{\n \"message\": {\n \"subject\": \"Welcome letter\",\n \"body\": {\n \"content\": \"Hello\",\n \"contentType\": \"html\"\n },\n \"toRecipients\": [\n {\n \"emailAddress\": {\n \"address\": \"neeta.jadhav@global.ntt\",\n \"name\": \"Neeta Jadhav\"\n }\n }\n ],\n \"attachments\": [\n {\n \"@odata.type\": \"#microsoft.graph.fileAttachment\",\n \"name\": \"details.xlsx\",\n \"contentBytes\": \"{{{payload}}}\"\n }\n ]\n }\n}","output":"json","x":410,"y":380,"wires":[["462c7e725b1ab173","034229d7d7c23b8d"]]},{"id":"462c7e725b1ab173","type":"http request","z":"75213df52c14c49d","name":"Post to Microsoft Graph API","method":"POST","ret":"txt","paytoqs":"ignore","url":"https://graph.microsoft.com/v1.0/me/sendMail","tls":"","persist":false,"proxy":"","authType":"","senderr":false,"x":640,"y":380,"wires":[["e043a8183ed4cb47","fa05ace26c752e27"]]},{"id":"e043a8183ed4cb47","type":"exec","z":"75213df52c14c49d","command":"rm ","addpay":"filepath","append":"","useSpawn":"false","timer":"","winHide":false,"oldrc":false,"name":"","x":830,"y":380,"wires":[["98157b38449d41c6"],[],[]]},{"id":"98157b38449d41c6","type":"debug","z":"75213df52c14c49d","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":970,"y":380,"wires":[]},{"id":"b6a27e12b4f50d4f","type":"inject","z":"75213df52c14c49d","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":100,"y":200,"wires":[["4898ccf62d6b7603"]]},{"id":"d5bc86d05379693c","type":"debug","z":"75213df52c14c49d","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":190,"y":380,"wires":[]},{"id":"034229d7d7c23b8d","type":"debug","z":"75213df52c14c49d","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":530,"y":440,"wires":[]},{"id":"fa05ace26c752e27","type":"debug","z":"75213df52c14c49d","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":810,"y":440,"wires":[]},{"id":"4898ccf62d6b7603","type":"http request","z":"75213df52c14c49d","name":"Get Email Token","method":"GET","ret":"obj","paytoqs":"ignore","url":"http://maplet-authrzr-0-1656663433.a927252e-fb71-472b-ae58-dce6bfd35690.svc:80/token/email","tls":"","persist":false,"proxy":"","authType":"","senderr":false,"x":460,"y":180,"wires":[["efa8e7a3cdc63b37"]]},{"id":"efa8e7a3cdc63b37","type":"change","z":"75213df52c14c49d","name":"Set headers","rules":[{"t":"set","p":"headers","pt":"msg","to":"{}","tot":"json"},{"t":"set","p":"headers['Authorization']","pt":"msg","to":"'Bearer ' & payload.accessToken","tot":"jsonata"},{"t":"set","p":"headers['Content-Type']","pt":"msg","to":"application/json","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":670,"y":180,"wires":[["5d64f6b3253b286e"]]}]
Output is below
But expectation is to put the list in numbers in new line
Kindly help me on this topic.
Hope I have provided all the required data.
Thanks,
Neeta