AcademyWorkflowsDevelopment

Demo: storing values with workflowStaticData

Developers and automation builders who call APIs that use tokens which expire.

  • Recommendedour rating
  • 7,297views on n8n
Open on n8n.io ↗

Paste it straight onto an n8n canvas with Ctrl+V or Cmd+V.

demo-workflow-how-to-use-workflowstaticdata.json

Loading the file...

What it does

A demo flow that shows how to keep a value, such as an access token and its expiry time, between runs. It can fetch a token with an HTTP Request node, then store it with workflowStaticData in a Code node. Static data only persists for production executions, such as webhook or schedule triggers, not manual tests.

Use cases

  1. 01Reuse an access token between scheduled runs
  2. 02Store an expiry time and refresh the token when it lapses
  3. 03Learn how workflow static data works in n8n

Connects

HTTP Request · Code

Questions about
Demo: storing values with workflowStaticData.

What is Demo: storing values with workflowStaticData used for?

Developers and automation builders who call APIs that use tokens which expire. A demo flow that shows how to keep a value, such as an access token and its expiry time, between runs. It can fetch a token with an HTTP Request node, then store it with workflowStaticData in a Code node. Static data only persists for production executions, such as webhook or schedule triggers, not manual tests.

How do I import Demo: storing values with workflowStaticData into n8n?

Copy the workflow JSON from this page and paste it onto the n8n canvas with Ctrl+V or Cmd+V. Then connect your credentials in each node.

Is Demo: storing values with workflowStaticData safe to use?

It passed our automatic scan for credential theft, hidden instructions and risky install commands. Third party open source software. Sabemos AI does not maintain it. Check the code and permissions before you connect it to company data.