Workflow variable that can be updated with each execution

Hi,
I’m trying to build a workflow for approval process, but I want to cap the number of approvals per day.
Is there a way to set a variable for a workflow that I can set and reset in different executions?
Any other ideas on how I can implement this?
Thanks,
Ron

  • n8n version: cloud
  • Database: NA
  • n8n EXECUTIONS_PROCESS setting: webhook
  • Running n8n via: cloud
    • Operating system: NA

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:

Welcome to the community @Ron_Shteinberg !

Tip for sharing information

Pasting your n8n workflow


Ensure to copy your n8n workflow and paste it in the code block, that is in between the pairs of triple backticks, which also could be achieved by clicking </> (preformatted text) in the editor and pasting in your workflow.

```
<your workflow>
```

That implies to any JSON output you would like to share with us.

Make sure that you have removed any sensitive information from your workflow and include dummy or pinned data with it!


Yes, you can utilize the static data, getWorkflowStaticData | n8n Docs.

Thanks.
I tried that and it seems to save the variables for a particular run. Next time I run the variable is null again.
Is there something similar but that saves a variable to be available for all runs?

You probably do not use the feature correctly. Here’s an example of the usage, Set a value and update each time the workflow runs - #5 by ihortom.

Also bear in mind static data won’t be saved between executions unless you:

  1. Are using an automatic trigger node (such as schedule or webhook)
    and
  2. Have activated the workflow

Also, be aware that it gets saved after the execution is finished. So it will only be accessible for executions that started after the previous one is done.

I am trying to automate the task of automatically posting news information from various websites. I plan to implement it using n8n.
My website is a WordPress site (focused on news articles).
As a beginner, I am not sure about using n8n. Can you all help me?

Hi @Zhenyue , Have you seen this? There are other templates that do similar as well>

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