Sending a notification email when there are unread messages through a backend workflow

Hello bubble community!

I have a messaging function in my app, and I would like to send a notification to users when they receive a new message. I first tried through a workflow but it didn’t work because of privacy rules.

I saw on some other posts that it could be done via a backend workflow but as I am fairly new to bubble, I am struggling to find the right settings. Does anyone have suggestions? I tried now with a recurring workflow with the settings below but it didn’t work either


Screenshot 2024-01-11 3.58.36 PM

You can probably use a database trigger for this

Complementing @johnny great advice you could set up a database trigger that … triggers … upon the creation of new messageEntry

The expression for the dataBaseTrigger should read like this:

“When messageBefore is empty and messageNow is not empty”

The above is a simplification of the actual expression for illustration purposes. Once the trigger detects a new entry you can have it run further actions as needed. The exception being … triggering other dBTriggers … :grin:

Further learning on this subject can be found in a great resource written by @petter below:

1 Like

Guys… I think he wants to send weekly emails alerting the Users who have unread messages…

@cragswap , what you can do is create a simple backend workflow with two steps:

  1. Send this e-mail to every user that have unread messages. For this, you will leave the “To” field blank in your “Send email” action and use de “Bcc” field to enter the list of emails you want to use.

  2. Reschedule this same backend workflow to current Date/Time + 7 days

Oh… lol great catch

1 Like

Thanks a lot I will check this out!

1 Like