Current Day Birthday list + Send automatic Email

Hello community, i need your help. I’ve looked on the forum, but I haven’t found anything identical to what I’m looking for.

I have a member management app and I need to have a list of the current month’s birthdays and I need an automatic email to go out with congratulations for the birthday boy or girl of the day. Can someone help me?

What part of this do you need help with? What have you tried so far and where are you stuck?

Two ways you could go for this:

  1. Create a recurring workflow to run daily → Check the user whose birthday is today → Send an email

  2. When the User signs up → Schedule a workflow for their date of birth to send email. Whenever a user updates, you will have to cancel the scheduled workflow, schedule new workflow for the new dob.

Simpler Option: First.
But bubble has some restrictions based on number of recurring workflows for certain plans, so you can go with second as well.

HI, thank you for your reply.

I have used table to list all the members where is birthday is igual to current day, but i am not been able to filter the users.

I havent tried to done the recurring workflow to send the email because of the same problem… can´t filter the members that have the birthday on that day

Thank you for your reply.

And how to filter a member by it´s birthdate to the current day?

Do a search for User’s (Constraint - dob: rounded down to date is current date: rounded down to date)

Is there any advantage to recurring events over recursive workflows, other than the edge case where the workflow doesn’t reschedule itself because of an error in a previous action (which can be avoided by making the schedule action the first action)? I’ve never used them, not even once, and want to know what I might be missing…

To be honest not much. I have used recurring workflows only once which we eventually moved to scheduled. It provided better control.

thats exatly my problem … i´m doing something wrong, i cant filter da field

Ah yes, try this instead:

Do a search for User’s (Constraint - dob >= current date: rounded down to date , dob< current date: rounded down to date + 1)

Thank you for your reply, but it still doesn´t work.
I dont seem to be able to add the second part of the scrip after the comma.

Add them as two seperate constraints.

WU optimization is one, since you do not incur the costs of the schedule a backend workflow action in addition to the WU of actually running the actions within the workflow.

1 Like

When a user provides the birth date, use the schedule backend workflow and schedule it for the birth date provided, but you need to then modify the date for the year, so use the operator change year to and then select current date time then operator extract year…this way as soon as they provide you the birthdate you are able to schedule the backend workflow, which will send the email, on their next birthday.

In that backend workflow, after the send email action, schedule the same backend workflow to run and schedule it for current date time plus 1 year. There are other things to consider for conditionals to make sure it doesn’t run when it shouldn’t but there are so many different scenarios, I won’t go into it.

Avoid the use of the Search that has been suggested, it will cost you WAY too much in WUs and is not an optimized approach.

This is what to me is the best approach for this.

This costs too much in WUs because you have to search everyday when it is not actually necessary to do so.

1 Like

How safe is it to schedule workflows months ahead of time? Is this realy maintanable?
Personally I tend to avoid scheduling critical stuff and also too far in the future.

When scheduling things super ahead of time, you’ll want to store the planned workflows ID “just in case”.

Depending on how many customers there are, that might be worth losing a few WU for the ease of a daily workflow.

About as safe as it is to operate an app on Bubble

Why would it not be. With your suggestion to save the workflow ID as a just in case measure, that would make it more maintainable.

As the user base grows, so does the WU consumption for the daily recurring workflow that requires a search of users since all fields on the user data type are returned, and we get charged for each character of data returned. In a world where margins are slim because of WUs it is imperative to find every way possible to reduce the amount of WUs used.

Ah, great - hadn’t thought of that one.

The scheduler page is so user-unfriendly, with no possibility to really search things or control what’s scheduled through workflows or any logic.

For these reasons I have never relied on scheduled workflows, but I am curious to know more:

  • What if you have to make changes to the workflow while there are still scheduled occurences in the future? Will Bubble remind you that it is still scheduled?
  • Same question if you delete the workflow, will you be reminded?
  • If for any reason there is a downtime and scheduled stuff are not triggered correctly, is there a retry mechanism under the hood, or any way that the developper is informed?

As of today, No to all.

Bubble does not remind the developer or the app admin about these details. As a developer you can put in workflows to ensure you get an alert. But that is limited.

If someone accidentally deletes the scheduled API from editor, there is no way to find out who did it, or that it happened. We recently experienced this with an app and had to debug why a certain thing was not working. Thankfully it was on a test branch.

Another problem I face is with storing multiple scheduled workflow IDs. If a certain workflow runs and a few do not, you can not know which one because the workflow ID is not available inside.

Thank you for your reply. regard to the email sending i guess i´ll use that option to try to reduce the WU, but regarding to the Table where i want to display the current day Birthday member i really need the have a search option right?
The constrains options provided dont atualy work. In this case the constraints suggested will always return all the dates because the DOB is a future date it´s always a True Statement

image,