Hi everyone! I’m trying to track content changes across several sites in a Run Workflow step and ran into an issue with global variables.
I’m passing the following JSON as the input:
[
{
"site": "n8n",
"url": "https://n8n.io/legal/cloud-enterprise-terms/"
},
{
"site": "mindstudio",
"url": "https://www.mindstudio.ai/legal/terms-of-use"
},
{
"site": "make",
"url": "https://www.make.com/en/privacy-notice"
}
]
The workflow iterates through each item and checks the page for changes.
To track changes, I need to store a previous value (e.g., hash or content) for each site. Ideally, I’d like to store these in global variables, one per site.
What I was hoping to do is dynamically reference the variable name based on the current item, something like:
{{current_site.site}}
So the stored variables would effectively become:
-
n8n -
mindstudio -
make
However, it doesn’t seem possible to dynamically set the global variable name this way.
I also tried creating the globals manually, but I couldn’t find a clean way to initialize and reference them during the iteration.
Question:
Is there a recommended pattern in MindStudio for storing and retrieving per-item persistent values (like previous page content) when iterating over a list like this?
For example:
-
dynamically named global variables
-
a key/value store pattern
-
or another approach for persistent per-site state
Any suggestions would be appreciated!