Stagger Create/Change Thing in Triggered Custom Events to Prevent Duplicates

Hi all - I’m looking for help and have been stumped for quite some time on this issue. I’ve read everything I can in relation to order of operations for workflows and how to best handle sequential workflow needs, but am stuck on an issue that is causing duplicate issues in my DB.

I have a custom event that creates a thing if it doesn’t exist in the DB or makes changes to it if it does exist. As part of my larger workflow, I need to trigger this custom event multiple times (see screenshot) where I pass different parameters to it as needed.

Custom Event Triggers

This custom event then creates or makes changes to the thing as needed (see screenshot).

Custom Event

The problem I’m having is that triggering this event multiple times will create multiple items in the DB because they are all running at the same time (or very close to the same time) per the standard Bubble workflow order of operations design and the search that tells the workflow if the item already exists does not update in real time (again per the standard Bubble workflow order of operations design).

I’ve tried every variation of custom events, custom events inside other custom events, conditionals, custom event return values, etc. and cannot figure it out. I thought custom event return values would allow me to reference “previous step of” type design and delay the triggering, but I could not get it to work.

The only thing that works is if I schedule the custom events instead of triggering them, but I know I do not want to do this because that will then have them running in parallel to remaining items in the larger workflow which can cause different issues for my order of operations.

Any help is greatly appreciated.