Multiple webook calls overlaping

Jan,

I tried implementing it on my n8n cloud instance.
I then changed the “url”: “http://localhost:5678/rest/executions-current” to my url : “https://[hidden].app.n8n.cloud/rest/executions-current” but the flow is not valid (see below).

The answer from the http node doesn’t have the same info than with the local url - it’s a list of text. How is it possible to get the right info?

info with local url :

info with the n8n cloud url :

There is no need to change the URL. The URL works fine as it is. In this case is localhost:5678 correct as n8n connects to itself.

Oh ok thanks a lot !
Works like a charm :wink:

Great to hear! Have fun!

It doesn’t work in my case. Workflow execution is so fast that all instances see multiple executions in progress. My goal was to run the first iteration and ignore the following ones. But with this system, all iterations are ignored. It would be so much easier to prevent parallel execution at n8n level.

1 Like

Hey @Denis_VICTORIA

Unfortunately this feature is not yet available with n8n, but you can use Redis for this.

There is a similar situation mentioned in another post: Deny simultaneously workflow execution / Don't execute if workflow is running - #8 by krynble

If you have access to a Redis you can follow the mentioned procedure.

Let me know if this works.

I added redis to my docker compose. It seems to work well as a workaround but this feature seems to be mandatory for real life cases (barcode scan for me).

Thank you for your help @krynble

1 Like

How can this be modified to detect if a specific workflow is running or not?

You can change the first line in the Function-Node. Replace $workflow.id.toString() with the workflow you want to check for like for example '123'. Make sure that it is a string and not a number.

So for example:

const executions = items[0].json.data.filter(execution => execution.workflowId.toString() === '123');
1 Like

Initially it was giving an error, “Authorization is required!”

I registered the credential on the http node as instructed

here the node was always returning as false, I changed “value1”: "= false {{$ json [" isActive \ “]}}”

to “value1”: "{{$ json [" isActive \ "] }} ", It worked

thank you so much

@jan looks like your solution workflow is gone. Would you be so kind to repost it or put it somewhere public, like github?

Cheers

@mattesilver it looks like it is still there, You may need to do a ctrl / cmd + F5 in your browser to see it.

Works now.
Cheers

@jan ,
Just had a chance to run it on a server. The n8n instance is configured with basic auth but looks like the API requires n8n-auth cookie. is there a way around?

Cheers

Hey @mattesilver,

The user management feature changed some parts of the internal API, There are a couple of ways to still use it like the example here: How to authenticate for REST API with Users management activated? - #3 by JulienDelRio

Sorry for the misunderstanding; I don’t have users, just N8N_BASIC_AUTH_USER

Hey @mattesilver,

No misunderstanding at all buddy, The user management feature changed how the internal API works if you are using it or not. That being said I have not tried it without so it could be a similar process where you need to get the token to be able authenticate from the auth request.

Hmm…
the default user has neither email nor password to login with.
I guess I can downgrade back to 0.167 for now?

This is my solution for preventing simultaneous processing while keeping the processing order

2 Likes

Hi Jan! Is this still possible? I cannot figure out how to get running workflows - have the same challenge as OP! Thanks :slight_smile: