Thank you @mitchbaylis for your reply.

  1. I’ve added a 1.5 second delay which fixed the race conditions for now but with high usage that isn’t a 100% accurate solution
  2. A second API would mean extra WU so I want to avoid that and again I’d have to have things in place in case it fails to execute.
  3. I’m using the file&multi uploader plugin, they don’t allow to access meta data to filter. The best I can do is access the file name, truncate or split the end to get the file type, and then add the count only when file type is png or jpg etc for images. The :filtered or even :split by :group by etc aren’t efficient and will significantly slow with a Google Drive clone idea of 100,000+ files. It’s only a decent solution for much less.

The only solution on bubble seems to be a recursive workflow OR a scheduled workflow with a 1.5 delay and a system in place to check that files uploaded = file count which again is an extra search and potentially an extra change “Change count -1” if it wasn’t successful.

Every solution is crap. Seems to be a major problem on Bubble.