Database Trigger triggers always multiple times


I schedule sendng an email when an account is created vie a database trigger like so:

Unfortunately the email arives 4 to 5 times instantly:

Is this a bug Bubble should know about?

I can’t test this right now, but intuitively I don’t think this is a bug:

Triggers will execute for every change made to a record as long as it’s not stopped by a condition. In your case, you’re inviting the trigger to run for every change made to a User, as long as the User does not have an account.

In other words, you trigger at least one (when the temporary User is created) and then once for every change that you happen to make to the User. If you add a second condition that checks whether the User now has an account, it will probably run just once.

User before change is empty
instead of has account.