Long pooling short intervals still get duplicates

So there are a few possible workarounds.

The aforementioned logic could still work with a separate table or even an external database (if you can’t modify the original one), though the latter requires separate queries.

Is there a way to ensure that the new flow doesn’t start until previous one finish (i do understand that this might mean longer than 1 second intervals)

This idea specifically can be implemented, but is a bit hacky. You’d essentially need to use an undocumented API used by the n8n UI to get your currently running workflows and verify if the current workflow is already running. @Jon recently shared and example for this here: Check if the workflow is running through the API - #2 by Jon

So your workflow would start then check if it’s already running more than once. Combined with an IF node you could then decide whether to continue or not with the current execution.

1 Like