Question about WorkflowStaticData

Initially,
I imagined getWorkflowStaticData(‘global’) as a temporary storage area for variables for a specific workflow execution. This seemed fantastic because I wouldn’t need to store these variables in an external database. However, to my surprise, it isn’t a global storage area for a specific workflow execution but rather for the entire workflow as a whole. I discovered by accident that getWorkflowStaticData(‘global’) means that all executions manipulate the same variables.

I would like to know if there is a way to have the same functionality as getWorkflowStaticData(‘global’) but specific to a particular workflow execution?

Information on your n8n setup

  • n8n version: 1.37.3
  • **Database (default: SQLite):cloud
  • **n8n EXECUTIONS_PROCESS setting (default: own, main):cloud
  • Running n8n via (n8n cloud): cloud
  • **Operating system:Mac OS - 14.2.1

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:

Hey @Eduardo_Moscatelli , take a look at this similar discussion, here:

1 Like

Thanks @dkindlund.

From what I could see in the documentation in detail, the Custom executions data is suitable for storing static variables at the Workflow Execution level. I read the topic you indicated, and there are some very interesting points. I am still in doubt whether, over time, I will have problems with this storage of static variables at the execution level.

Thank you for the help.

1 Like

hello @Eduardo_Moscatelli

You can access any variable of executed nodes within one execution by default (if you have outputted them). If you mean that you will need only one specific past execution, then there is no build-in method for that. Consider using an external storage (files, dbs, tables, etc)

1 Like

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