You can’t wait and perform actions at the same time, so that won’t work for you. in this case
I made a workflow for you. All you need to do is substitute a unique ID and add your logic in the middle.
This saves a file on your system with the name of the ID then deletes the file when the workflow is done. The first step checks if the file already exists, which is the check if it is already running as it will not exist if it is not running.
I put some effort into explaining in the workflow as I have seen others request this as well, hopefully this is helpful to them as well.
I actually forgot you were on cloud so that won’t work for you. You can do the same thing with any spreadsheet or database service which i showed here using google sheets.
Out of curiosity, I tried to build one solution using Google Sheets. I added a buffer approach, so the workflow can wait for the previous one to be executed.
A limitation of using the Google Sheets API for this is their quota per user limitation.
However, for an internal tool that is not triggered intensively, it should do the job.
Buffer is a nice addition, depends on use case if needed, but you would be right that you usually don’t want to just loose that data in most cases
I used sheets as a beginner example, should be easy to swap for a more robust DB for anyone that has any experience with that. Rate limits would be something to watch out for. @The_Leading_Practice if you use sheets or any other external storage through API then set the node settings to retry if failed after 5000 ms
Edit: I since updated the original post to add a timestamp for expiration and a buffer. can see it here@n8ninja