Hi all!
I want to loop a node when i make a certain choice. And i want to get a new notification within 24 hours or so to remind me again.
Now i have this.
[{"id":"ecac18b5.46a7e8","type":"switch","z":"97634444.95c118","name":"","property":"originalMessage.text","propertyType":"msg","rules":[{"t":"eq","v":"Si","vt":"str"},{"t":"eq","v":"No","vt":"str"}],"checkall":"false","repair":false,"outputs":2,"x":310,"y":300,"wires":[["3713e5e.401f41a","291bba44.676b96"],["daaddaa7.60a0d8"]]},{"id":"13059b5c.e5c775","type":"function","z":"97634444.95c118","name":"remove keyboard","func":"var opts = {\n reply_to_message_id: msg.payload.messageId,\n reply_markup: JSON.stringify({\n \"remove_keyboard\" : true\n })\n};\n\nmsg.payload.options = opts;\n\nreturn msg;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1130,"y":340,"wires":[["9bf67bcb.7d6288"]]},{"id":"daaddaa7.60a0d8","type":"function","z":"97634444.95c118","name":"no","func":"msg.payload.chatId = 587232739;\nmsg.payload.type = 'message';\nmsg.payload.content = 'Ok, te aviso nuevamente en 1 hora.';\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":650,"y":540,"wires":[["13059b5c.e5c775"]]},{"id":"3713e5e.401f41a","type":"function","z":"97634444.95c118","name":"Si","func":"msg.payload = {}\nmsg.payload.chatId = 587232739;\nmsg.payload.type = 'message';\nmsg.payload.content = 'Genial!, escribiendo respuesta en CSV...';\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":650,"y":220,"wires":[["13059b5c.e5c775"]]},{"id":"1e547cc6.cd8da3","type":"file","z":"97634444.95c118","name":"","filename":"/data/psa_cambio_filtro.csv","appendNewline":true,"createDir":false,"overwriteFile":"false","encoding":"utf8","x":720,"y":340,"wires":[["cc3d40b9.6b8c"]]},{"id":"291bba44.676b96","type":"function","z":"97634444.95c118","name":"data to csv file","func":"var data = \"Filtro PSA de la cocina cambiado!\"\n\nmsg.payload = data;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":680,"y":260,"wires":[["1e547cc6.cd8da3","13059b5c.e5c775"]]},{"id":"39c28c41.8d5964","type":"moment","z":"97634444.95c118","name":"","topic":"","input":"","inputType":"msg","inTz":"America/Buenos_Aires","adjAmount":0,"adjType":"days","adjDir":"add","format":"","locale":"es-AR","output":"","outputType":"msg","outTz":"America/Buenos_Aires","x":700,"y":300,"wires":[[]]},{"id":"cbc2ffbe.8baf3","type":"delay","z":"97634444.95c118","name":"","pauseType":"delay","timeout":"2","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":500,"y":300,"wires":[["39c28c41.8d5964"]]},{"id":"6ab34b5e.0c3354","type":"comment","z":"97634444.95c118","name":"TODO","info":"If NO is selected remind me again in the next 24 hours.","x":710,"y":500,"wires":[]},{"id":"d9c9ac8d.eef77","type":"function","z":"97634444.95c118","name":"archivo guardado","func":"msg.payload = {}\nmsg.payload.chatId = 587232739;\nmsg.payload.type = 'message';\nmsg.payload.content = 'Se escribió la respuesta en el archivo /data/psa_cambio_filtro.csv correctamente';\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":690,"y":420,"wires":[["9bf67bcb.7d6288"]]},{"id":"cc3d40b9.6b8c","type":"delay","z":"97634444.95c118","name":"","pauseType":"delay","timeout":"2","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":660,"y":380,"wires":[["d9c9ac8d.eef77"]]}]