Custom nodes order

Hello

I am writing automations interacting with a REST API server that I built. I used n8n-openapi-node to generate my openapi into a node. I also wrote a custom websocket listener node, which waits for a websocket message with a given timeout.

I wanna make an api request using my node, and then wait for a websocket message to arrive and only then continue with the workflow. The thing is, the request is causing a trigger to the websocket message, which sometimes causes the message to arrive before the websocket node actually starts to listen - so the message is being missed.

The ideal solution would be to run these 2 nodes in parallel, but I figured it is not supported. I was also thinking about adding a delay (some kind of setTimeout) to the API node to have the request happen only a few milliseconds after the node finished, but I couldnt figure out how to do this. Any ideas?

Thanks in advance

The thing is my websocket node is coming after the api request, since it’s blocking…

Is it possible to continue to the next node before current one finishes?

I couldn’t find a way for my websocket listening node to not block the workflow from going ahead

Anyone? Any idea?

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