How use `getWorkflowStaticData` in a worflow

How use getWorkflowStaticData

Hello her, it’s my first topic ! I use this simple workflow to parse list of object and use an api to collect information about electrical consumption.
I want to keep the total consumption send by the api and to the next run of the flow (every 1 hour) i need to compare the old and new value, if the difference < 4 i need to send an email alert.

In the edit filed i keep only the necessary value
image

I need to store for each item the value of “total_elec” and use it one hour after the last execution of the job.

I parse the documentation and i think i can use the getWorkflowStaticData

But i don’t understand how ?
image

Thanks for your help.

Information on your n8n setup

  • n8n version: 1.45.1
  • Database SQLite
  • n8n EXECUTIONS_PROCESS setting default
  • Running n8n via n8n cloud and Pro plan
  • Operating system:

It looks like your topic is missing some important information. Could you provide the following if applicable.

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

@Tom_E , this post provides a workflow explaining how the static data could be used. You just need to adjust the usage to your needs.

1 Like

Hello @ihortom thanks for your help :slight_smile:
I have search and my brain have suffer but i think i have already since fews days understand the process of this static/cache data.

Regards

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.