As background info: I’m a software deveolper, so my language will be in this context
As far as I know an If-Node acts like an filter on an array.
On my workflow I create/update/complete tasks in todoist based on github-issues.
In order to find the task that should be updated, because the corresponding issue changed, I filter (If-node) the list of tasks for contains
The If-node returns all items in the false-branch, but there should be one in the true branch.
Please share the workflow
Share the output returned by the last node
Information on your n8n setup
Im running the container n8nio/n8n:0.182.1 with a postgres-db
Hey @nidomiro, I suspect your GitHub trigger (and subsequent Switch node) only returns a single item, but your Todoist nodes might return more than one item. Is that correct?
If so, you’d probably need to add
$(item(0). to your expressions referencing data from these nodes as described here: "Set" losing value? Bug? - #3 by MutedJam
Thanks, it is working now
For my understanding of the system I have another question:
Is it right, that each node gets a snapshot of the values of the previous nodes? Or each trigger is a separate execution of the workflow and therefore two executions cannot interfere with each other (at least in n8n)?
Glad to hear this works, thx for confirming!
Is it right, that each node gets a snapshot of the values of the previous nodes
Yes, during the workflow execution each node can access all the data returned by previous nodes.
each trigger is a separate execution of the workflow and therefore two executions cannot interfere with each other
This is also true. Each execution runs on it’s own. So when your GitHub trigger fires a second time it will start a separate execution independent of the previous one.
You can still query data from other executions through the API but this can easily get messy and execution data can be purged. So my suggestion would be to keep your workflow executions self-sufficient and not to rely on previous workflow executions.
If you need to persist data beyond executions I’d go for an external database.