Maybe you need to use persistent context?
https://discourse.nodered.org/t/a-guide-to-understanding-persistent-context/4115