Any.do tasks

I would love An any.do component ,
I would like to see my full tasks list and be able to make new or mark completed as well as making triggers and sensors

Thanks

Would be an amazing addon!

I’d like to see this as well. I just installed a smart lock on my front door. I’d love to be able to have Home Assistant monitor the battery level, then add a task to Any.Do for me to change the batteries whenever they are low.

1 Like

Did somebody already found it? Because any.do also works perfect with Google assistant

1 Like

This! I need this so bad!

You can achieve that using NodeRed automation. If you are interested I can post here my flow so you can use it

yeah absolutely! been meaning to dive more into node red.

Thanks in advance

Just edit the username and password in the any do login “set params” step
You can get categories ids by manually running the “get categories” flow
The add task flow expects a category id in msg.categoryId and the title of the task in msg.title

[{"id":"2913db6ca536aa3e","type":"debug","z":"7d75498b541be6fb","name":"AnyDo categories","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"items","targetType":"msg","statusVal":"","statusType":"auto","x":1210,"y":240,"wires":[]},{"id":"e7b49e1d5de2c154","type":"inject","z":"7d75498b541be6fb","name":"Get categories","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payloadType":"date","x":140,"y":240,"wires":[["8df9939af9c81a36"]]},{"id":"8fbeb535f7616769","type":"http request","z":"7d75498b541be6fb","name":"Get categories","method":"POST","ret":"obj","paytoqs":"ignore","url":"https://sm-prod2.any.do/api/v2/me/sync?updatedSince=0","tls":"","persist":false,"proxy":"","authType":"","x":760,"y":240,"wires":[["34f2354630c91d9d"]]},{"id":"e57b4cd32e913a40","type":"function","z":"7d75498b541be6fb","name":"Set params","func":"msg.headers = {\n    'content-type': 'application/json',\n    'X-Anydo-Auth': msg.authToken\n};\nmsg.payload = JSON.stringify({\n    models: {\n        category: {\n            items: []\n        },\n        task: {\n            items: [],\n            config: { includeDone: false, includeDeleted: false }\n        },\n        attachment: {\n            items: []\n        },\n        sharedMember: {\n            items: []\n        },\n        userNotification: {\n            items: []\n        },\n        taskNotification: {\n            items: []\n        }\n    }\n});\nreturn msg;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":550,"y":240,"wires":[["8fbeb535f7616769"]]},{"id":"34f2354630c91d9d","type":"function","z":"7d75498b541be6fb","name":"Extract information","func":"var items = {};\nmsg.payload.models.category.items.forEach((item) => {\n    items[item.name] = item.id;\n});\nreturn {\n    items: items\n};","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":980,"y":240,"wires":[["2913db6ca536aa3e"]]},{"id":"3589897a236b1b36","type":"http request","z":"7d75498b541be6fb","name":"add task","method":"use","ret":"obj","paytoqs":"ignore","url":"","tls":"","persist":false,"proxy":"","authType":"","senderr":false,"x":820,"y":400,"wires":[["22769571a084d86f"]]},{"id":"2b7476ca25012d82","type":"function","z":"7d75498b541be6fb","name":"Set params","func":"function _getRandomValue() {\n    return Math.random() * 256;\n}\n\nfunction generateId() {\n    let id = \"\";\n    for (let n = 0; n < 10; n++)\n        id += String.fromCharCode(_getRandomValue());\n    return Buffer.from(id).toString('base64').replace(/\\//g, \"_\").replace(/\\+/g, \"-\")\n\n}\n\nmsg.method = 'post';\nmsg.url = 'https://sm-prod2.any.do/api/v2/me/sync?updatedSince=' + Date.now();\nmsg.headers = {\n    'content-type': 'application/json',\n    'X-Anydo-Auth': msg.authToken\n};\nmsg.payload = JSON.stringify({\n    models: {\n        category: {\n            items: []\n        },\n        task: {\n            items: [{\n                title: msg.title,\n                dueDate: Date.now(),\n                categoryId: msg.categoryId,\n                id: generateId()\n            }],\n            config: { includeDone: false, includeDeleted: false }\n        },\n        attachment: {\n            items: []\n        },\n        sharedMember: {\n            items: []\n        },\n        userNotification: {\n            items: []\n        },\n        taskNotification: {\n            items: []\n        }\n    }\n});\nreturn msg;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":610,"y":400,"wires":[["3589897a236b1b36"]]},{"id":"f0ebf51c8779fd91","type":"link in","z":"7d75498b541be6fb","name":"Add task to anydo","links":[],"x":130,"y":400,"wires":[["4c6ef5c0b68deaa1"]],"l":true},{"id":"3458fe6dc75146c0","type":"comment","z":"7d75498b541be6fb","name":"Add task to anydo","info":"","x":170,"y":340,"wires":[]},{"id":"b11893bb74b1e130","type":"link out","z":"7d75498b541be6fb","name":"","mode":"return","links":[],"x":1160,"y":400,"wires":[],"l":true},{"id":"22769571a084d86f","type":"function","z":"7d75498b541be6fb","name":"extract id","func":"msg.taskId = msg.payload.models.task.items[0].id;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1000,"y":400,"wires":[["b11893bb74b1e130"]]},{"id":"4e064efde6715cd5","type":"link in","z":"7d75498b541be6fb","name":"any do login","links":[],"x":140,"y":100,"wires":[["690d3a3954988985"]],"l":true},{"id":"309d3763f9728a4e","type":"http request","z":"7d75498b541be6fb","name":"login","method":"POST","ret":"obj","paytoqs":"ignore","url":"https://sm-prod2.any.do/login","tls":"","persist":false,"proxy":"","authType":"","credentials":{},"x":530,"y":100,"wires":[["53cf62ccb5b5d4ec"]]},{"id":"690d3a3954988985","type":"function","z":"7d75498b541be6fb","name":"Set params","func":"msg.payload = JSON.stringify({email: \"your email\", password: \"your password\"});\nmsg.headers = {\n    'content-type': 'application/json'\n};\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":350,"y":100,"wires":[["309d3763f9728a4e"]]},{"id":"53cf62ccb5b5d4ec","type":"function","z":"7d75498b541be6fb","name":"extract token","func":"msg.authToken = msg.payload.auth_token;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":690,"y":100,"wires":[["db031668db834306"]]},{"id":"db031668db834306","type":"link out","z":"7d75498b541be6fb","name":"link return","mode":"return","links":[],"x":890,"y":100,"wires":[],"l":true},{"id":"8df9939af9c81a36","type":"link call","z":"7d75498b541be6fb","name":"","links":["4e064efde6715cd5"],"timeout":"300","x":350,"y":240,"wires":[["e57b4cd32e913a40"]]},{"id":"4c6ef5c0b68deaa1","type":"link call","z":"7d75498b541be6fb","name":"","links":["4e064efde6715cd5"],"timeout":"300","x":390,"y":400,"wires":[["2b7476ca25012d82"]]},{"id":"be5f38685e530437","type":"comment","z":"7d75498b541be6fb","name":"Get any do auth token","info":"","x":170,"y":60,"wires":[]},{"id":"601cc37b4abda8de","type":"comment","z":"7d75498b541be6fb","name":"List categories ids","info":"","x":160,"y":200,"wires":[]},{"id":"feb6ca2a3a8016f7","type":"http request","z":"7d75498b541be6fb","name":"remove task","method":"use","ret":"txt","paytoqs":"ignore","url":"","tls":"","persist":false,"proxy":"","authType":"","senderr":false,"x":810,"y":540,"wires":[["38fe0ec5573b9299"]]},{"id":"fcd2dd79777bc5ad","type":"function","z":"7d75498b541be6fb","name":"Set params","func":"msg.method = 'delete';\nmsg.url = 'https://sm-prod2.any.do/me/tasks/' + msg.taskId;\nmsg.headers = {\n    'X-Anydo-Auth': msg.authToken\n};\nmsg.payload = undefined;\nreturn msg;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":610,"y":540,"wires":[["feb6ca2a3a8016f7"]]},{"id":"bd7f7b48c9836db9","type":"link in","z":"7d75498b541be6fb","name":"Remove task from anydo","links":[],"x":150,"y":540,"wires":[["594b35efc3b747c2"]],"l":true},{"id":"acab5215fbfa6327","type":"comment","z":"7d75498b541be6fb","name":"Remove task from anydo","info":"","x":150,"y":480,"wires":[]},{"id":"38fe0ec5573b9299","type":"link out","z":"7d75498b541be6fb","name":"","mode":"return","links":[],"x":1000,"y":540,"wires":[],"l":true},{"id":"594b35efc3b747c2","type":"link call","z":"7d75498b541be6fb","name":"","links":["4e064efde6715cd5"],"timeout":"300","x":390,"y":540,"wires":[["fcd2dd79777bc5ad"]]}]

I’m working on a proper integration but it will take me sometime

Curious if you are planning to create a node red module for this integration? Great work BTW!

Did you ever make a “proper” integration? Is there any way to list the tasks the node red categories inject only says what categories of tasks there are in the flow you provided

2 Likes