I am using the HTTP response node to send request to my own python flask server to use selenium to retrieve pdf files, however it takes quite a long time for the request to complete (30 to 60 sec), on completion it will send a http file response back.
The problem i am having is that I would like to have n8n hold off the next request until the current request has completed and returned the file.
currently starting a new request while one is currently being executed will cause it to fail.
So for now to get around it I am just setting an interval of 60sec between requests and it seems to be enough for the job to complete. But this is very inefficient because it will be waiting when a request has already been completed and returned.
I would like it to send the next request after receiving a response (with the PDF)
Thank you this might be what I am looking for, so to clarify how can I make it so that the loop is complete before it will continue on to trigger the nodes later in the workflow?
Lastly the HTTP Request node also has a batch option, but apparently it doesnt wait for a response before sending the next request? would it be difficult to add the extra functionality to wait for response??
If you have the option to add community nodes to the workflow. There is a community node for the splitinbatches node that will allow you to use it a bit easier when continuing the workflow after the loop. might be worth checking out if your current workflow is giving you issues.
wow this advanced split in batches node is extremely useful!
I have implemented it in my http loop and its simplified the entire workflow by a large number of redundant nodes, the work flow is so much tidier and it saves so much time with building similar workflows!
The best part is the separated output and the combine feature which is what ive been looking for this whole time. this should definitely be a core node.