I created a workflow where in a gmail trigger will update the getWorkflowStaticData(‘global’). The problem is that gmail trigger does not update it. I already tested the workflow by turning on the active button.
What is the error message (if any)?
There is no error message
Please share your workflow
Share the output returned by the last node
I was expecting the counter to be incremented by 1
I noticed however that any, even slightest change (e.g. delete or add a non-critical whitespace in the code, manipulating other nodes) to the workflow that is being saved afterwards “forces” the code to actually properly change the content of the workflow static data.
I assume the static data is widely used by others and if it was a bug, someone would have already reported it. What is it that @Manage_Bnb and I are very likely overlooking here?
Could someone from n8n team and/or community please look into this and explain?
I was able to reproduce this error in n8n 1.80.5 docker installed. Whenever Gmail Trigger node is run for the first time, it actually updates the getWorkflowStaticData(‘global’). However, the next time it run it will not update getWorkflowStaticData(‘global’).
I tried to find some workaround in here and I found one. However I dont really like this workaround.
The workaround is using a Subworkflow node.
So this is how it looks like
So what it does it execute another workflow. The subworkflow looks like this
This is just a band-aid solution and I hope n8n devs will resolve this.