Updating static data not working

Describe the issue/error/question

I have a workflow (see below) that is intended to generate new access_tokens if the most recently generated token has expired. It should do this by storing the token, created date, and expiry interval in staticData. When the flow is run, the staticData is checked and a new token is generated if calculations show it has expired - if it has not expired it just returns the token stored in staticData.

The problem I have found is that once I generate a new token, the code to update staticData doesn’t appear to be working. Looking at the executions, it seems to show that the first ever token generated by the flow is stored in staticData and is not being updated.

Am I doing something wrong in the code nodes that set the staticData values?

Thanks for your help

What is the error message (if any)?

None, just unexpected values stored in staticData.

Please share the workflow

Information on your n8n setup

  • n8n version: Latest from K8s guide
  • Database you’re using (default: SQLite): Postgres
  • Running n8n with the execution process [own(default), main]: own
  • Running n8n via [Docker, npm, n8n.cloud, desktop app]: K8s

Hi @JNathanson, I am sorry to hear you are having trouble.

Tbh, I am not quite sure how static data would behave in a distributed setup like yours. Perhaps @krynble knows more about this?

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