HasChanged node

Hi! To simplify workflows such as monitoring a website or an API, what do you think of having a built-in HasChanged node?

Its input would a typically be mapped from a previous node (HTTP request, HTML Extract…). It would then check the value against the last recorded value. Just like an If node it would have 2 outputs: changed and unchanged.

It would need storage to keep track of the previous value, I was thinking of Redis or a temp file.

It would help simplify workflows such as this one: Site checker with Telegram warning

Yes, can see how that can be helpful. But we should then have the abstraction of the database layer in place, like also discussed here:

As saving it in a file would not really be the best option (like for example with proper scaling) and Redis is also not an option as not everybody has it and do not want to add it to the default setup as it would so make everything more complicated. So it would need an abstraction for whatever database the user uses to keep the setup simple and also the usage.

Thanks for your thorough reply! I can see how an abstracted storage mechanism would be useful.

In the short term do you think Redis is definitely out? A redis instance is very easy to setup (single redis-server binary or Docker image) and takes <5MB of RAM. Could it be a temporary requirement, saying “this node requires an external Redis instance for now, pending a generic storage system”?

Sorry do not think that is an option. Prefer to wait for the proper solution than something like that. Do simply not think it would be worth it. As a temporary workaround you can simply create an own workflow which does the same as that node would do and saves the data in file/redis. You can then use it in different Workflows with the “Execute Workflow” node. Would for sure be less work then creating now an extra temporary node for it.

Thank you I’ll do that for now.

1 Like