Help with Recurring Workflows

Hello Bubble Community,

Seem to keep running into walls with this deliverable:

I have a Portal which I built for my clients that acts as a Learning Management System. We add in new lessons all the time. Some users have finished or mid-way through a training curriculum.

On a weekly basis, I want to send an email out to all active users every Friday that summarizes any new lessons added to remind them to check back into the Portal.

I see we have Recurring Workflows and I see we have Workflows on a List. I need Recurring for the weekly email. I see that I can set or cancel the event with a regular workflow. So for new users signing up for the Portal, I can easily create a scheduled email for them by “Set/Cancel a Recurring Event”. However, for the users that are already setup and registered, I am imaging I have to use a Workflow on a List to run through all users and Set/Cancel a Recurring Event for each one? This part I am struggling with.

Any suggestions would be helpful. Basically want to set recurring events for a few hundred users in one shot.

Thanks,
Keith

2 Likes

Does anybody have any suggestions with this or did I post in the wrong area? Now that the rest of the structure here is built and working properly, I can possibly simplify my request here if perhaps the way I was going about this was wrong.

New lessons being added in get a date they were added. Lessons are always part of a section or topic. Every Friday, I want the system to automatically email every user who has a section in their curriculum (all located in a single data type) that contains a lesson with a date that is greater then the last email notice. This email would simply list the lessons added, encouraging the user to log back in and check their curriculum. Perhaps this explanation will open doors to other solutions veteran Bubble users are more comfortable commenting on.

Thanks in advance!

Best,

Keith

Hi @ktobias!

Here’s what I’d do… let’s pretend you don’t have anything set up so that I can take you through with a blank slate:

  1. Create a Recurring Event with Type of Thing = User

  2. Create a regular API Endpoint called “send-weekly-email”

  • Add a parameter called “User” that is type User
  • Add an action to this regular API workflow to Send Email to the User (parameter)'s email address
  1. Back to the Recurring Event, add an action to “Schedule an API Workflow on a List”
  • Workflow = WF created in Step 2
  • Type of List = User
  • List = Search for Users (everyone you want receiving an email)
  1. From some internal admin page, SET the recurring event
  • User = current user (i.e. you)
  • Scheduled date = choose the next upcoming Friday (you can do this with a date picker on your page

So, what we’ve done here is that you only set ONE recurring event. Every week, its only purpose is to schedule the other Endpoint with the email action. That schedule action is on a list of Users - “Search for Users.”

Because the Search happens at that point in time and not at the point of setting recurring event, the user list will always be everyone in the system up to that point (unless you’ve created an opt-out feature, which in that case you’d want to filter the search).

Other things to keep in mind:

  • If you need to cancel/stop this recurring event, you only need to cancel once from your same admin user account/internal admin page
  • The email itself would search for new Lessons where Creation Date > Current Date/Time +(days): -7
  • If your user list gets huge, add some spacing delay in the Schedule on List action to keep performance happy.

I hope this makes sense! It’s a different approach that makes it a bit easier to manage. You’re not having to set/cancel/bulk edit all your users this way.


Gaby at Coaching No Code Apps

Courses & Products, Tutorials, Private Coaching, and High-level Development

Start Learning Today :mortar_board:

9 Likes

Gaby, I was hoping you would chime in as some of your solutions thus far have been solid! Thank you very much. I will take a shot at this tonight and post back and let you know. Again THANK YOU!!

Best,

Keith

Hi @romanmg,

Sorry for the delay but just got to doing this now. Your instructions are VERY easy to follow and logic mainly makes sense as well. However, I am running into an issue. Imagine something I misunderstood, but let me run it by you quickly.

When setting up step 3 (Recurring Event), it requires that I put a “Scheduled Date” and “User” parameters (required fields). So it does not appear I can set this from the “SET” command I am initiating from an Admin screen. I am feeding that start date anyway (from step 4) and choose next Friday and Weekly but note the Event it is setting up is scheduling it for May 13th (which is a week from today, not Friday).

Did I misunderstand something above?

EDIT: Really odd, but so you know since it is requiring date in the recurring workflow, I have it set to current date. I am still pushing the requested date from the Admin page when I do the SET. Just now, it showed 5/10/2019 when I checked the log WHICH IS CORRECT. However if I cancel that event and try again, it is now showing 5/17/2019 which is next Friday. Ideally, trying to schedule this for now, so I can test it first, but if I select ANY day this week, it schedules it for that day a week from now. What am I missing?

EDIT 2: While I imagine I am missing something from your suggestion, I was able to get this to work by taking the date I want the recurring workflow to occur, and subtracting 7 days from it. When I do this, I can indeed schedule a workflow for the exact day I intend, as it was previously adding a week to the start date no matter what date I entered. It runs and works well (THANK YOU!) and now better understand how this feature is used and crazy how I was going about this vs how you suggested (THANK YOU AGAIN). Still have some more testing to do but believe I am home free!

How can it be done using Zapier any idea