Code nodes are not working with staticData and previous workflow values(urgent for my work)

Describe the problem/error/question

Hello Team,

I am using the Code node to prevent the duplicate upload of contacts in Mailchimp. I am using JavaScript code in the node.

However, I am facing a few issues:

  1. The staticData is not working.
  2. The previous workflow values are not working.
  3. After the Set new last execution timestamp node ends, I want to assign the staticData.lastExecution value to the Get last execution timestamp item.lastExecution and exit the workflow. I couldn’t find a suitable node for this. Can you please suggest one?

Thank you.

What is the error message (if any)?

No

Please share your workflow

Note the Workflow is in active stage.

Share the output returned by the last node


Information on your n8n setup

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

Hi there,

The static data only works for non manual workflows. Have you tried it being active?

1 Like

Hi @BramKn,

Thank you for your response.

Static data only works for non-manual workflows. This means that the data for staticData.lastExecution will not be available if I run the workflow manually. Is that correct?

Also, just to confirm, the workflow is currently in an active status.

Regarding your third point, after the execution of Set new last execution timestamp, the value of staticData.lastExecution will be automatically assigned to the staticData.lastExecution of Get last execution timestamp. Therefore, there is no need to loop them?

There is no node for it. Did you read the docs getWorkflowStaticData - n8n Documentation

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