StaticData compare is not working

Hi,

I’ve created a workflow to monitor for new 1Passsword versions.
To do that I’m getting 1Password Releases, extract the version, date and link from the HTML. After that I’m getting the latest version and compare it with the one stored in $getWorkflowStaticData(‘global’).storedVersion.

When the storedVersion isn’t the same as the version from the HTML “extract” n8n should send an email.

All the individual steps work, but… as soon as I activate the workflow that is comparing the stored data in $getWorkflowStaticData(‘global’).storedVersion it turnes out that every run sends an email :frowning:

I am doing something wrong, I guess, on the StaticData storage part OR on the comparison. Does anyone has an idea what I’m doing wrong?

My workflow

Information on your n8n setup

  • n8n version: 1.53.2
  • Database (default: SQLite): SQLite
  • n8n EXECUTIONS_PROCESS setting (default: own, main): default
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
  • Operating system: Synology NAS

Thanks for sharing any thoughts about this!

@jicho , replace Set node “Workflow values” with Code node and the code as below

return {
  url: 'https://releases.1password.com/mac/8.10/',
  storedVersion: $getWorkflowStaticData('global')?.storedVersion
};

It appears that Set node cannot read static data. Also note I have simplified the expression of getting storedVersion utilizing so-called optional chaining, ?.

@ihortom you’ve saved my day.

Thanks, this works!