Generate unique flow id
This trick can help you mark your subflow node with unique id.
[{"id":"a0f09cc0.c983a","type":"tab","label":"Flow 4","disabled":false,"info":""},{"id":"16a3dc7.7b33d24","type":"catch","z":"a0f09cc0.c983a","name":"","scope":["ca891141.d7473"],"uncaught":false,"x":370,"y":500,"wires":[["957e8b57.86e568"]]},{"id":"6b33f195.e6ccc","type":"inject","z":"a0f09cc0.c983a","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":400,"y":600,"wires":[["ca891141.d7473"]]},{"id":"ca891141.d7473","type":"function","z":"a0f09cc0.c983a","name":"throw nope error","func":"node.error(\"nope\", msg);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":620,"y":600,"wires":[[]]},{"id":"f479b4ab.918f68","type":"debug","z":"a0f09cc0.c983a","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":710,"y":500,"wires":[]},{"id":"957e8b57.86e568","type":"change","z":"a0f09cc0.c983a","name":"","rules":[{"t":"set","p":"id","pt":"flow","to":"error.source.id","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":540,"y":500,"wires":[["f479b4ab.918f68"]]},{"id":"8560fdc9.4a842","type":"inject","z":"a0f09cc0.c983a","name":"click me","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":"0.1","topic":"","payload":"","payloadType":"date","x":380,"y":420,"wires":[["17ae4e10.48b322"]]},{"id":"17ae4e10.48b322","type":"change","z":"a0f09cc0.c983a","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"id","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":680,"y":420,"wires":[["f479b4ab.918f68"]]},{"id":"8c33d705.3b8778","type":"comment","z":"a0f09cc0.c983a","name":"This node id will treated as subflow id that stored in flow.id variable.","info":"","x":780,"y":560,"wires":[]}]