Create a "New Thing" (event) each week

Hi all. I am creating an App which will be used by sports coaches can create an Event (called Training) and have it repeat weekly, adding the same list of attendees to accept or decline their attendance to the event.

So, an ‘event’ is created, there are options as to the type of event, such as Home Match, Friendly, or Training. The latter one being an event that would usually re-occur weekly, the others are usually one-time events. The list of users to be invited to this event are then selected before clicking continue on to the next page where a time and date is attributed to this, along with a venue. and some other details All users are allocated to the event as ‘unanswered’ and a notification is displayed on that users App to show they have an unanswered event. Once the event has happened, I would like to the re-create the same event for the following week.

Any help would be greatly appreciated with setting up the API’s and workflows as I have searched high and low and unfortunately, the terminology used in the searches closely match terms used within the bubble platform, such as recurring and event.

TIA

1 Like

If you want all future events created at once (for example, the way google calendar works) you can set up recursive workflows to create future events when the original event is created. You’ll then need to track the relationship between all events so that if one event is changed in a manner that impacts future events, you can apply changes accordingly.

If you only want to create the future event when the original event has occurred then you can create a backend workflow to create the future event and then schedule or trigger that workflow when the original event is completed

Hi @alex.esposito.1108
Either option sounds good for different reasons. The second one sounds good as it wouldn’t fill up a users events screen with events, but, upon review, I think using the Google Calendar option sounds better as, if a change is made, IE, the time, all future events would change also. I suppose I could limit the number of Rows on the RG to not fill up the screen; but have a >Show More option to see events further in the future.

Are you also able to change an event, but it not affect other future events. I.E. when you make a change, it asks “do you want to make a change to this event only” or “do you want to change all future events”?

Either way I go, I am still struggling to work out how to do this, so any more help would be grand

You could try adding a field called Event ID and it’s the same for all of the same recurring events. Then when you edit an event, if the user chooses to edit all you can search for all events with that Event ID.

This depends on how your users will sign up to events. How far out would they sign up to events? Same week, 2 weeks before, months before? If they don’t need to sign up for events way in advance the first option is better as it’s much easier to maintain.

I don’t see the advantage here over the first option…

Yes, of course…as long as it you build it that way

Give it a shot and if you get stuck come back with a specific question. I’m happy to help

The way users ‘sign-up’ to events isn’t by clicking a button each time. I will set the scene, a Football Coach offers training every Saturday Morning between 10:00-11:00am. All members of the team are assigned to the team, so each week, when the event is created, users are invited to the event (all users added as ‘Unanswered Players’) and can then respond with an Accept or Decline. The event rarely changes, sometimes the venue may change due to weather, but 80% of the time, they will all be the same. But the ability to edit an individual event ad-hoc I am sure can be done with a simple edit popup. I suppose one of the additional difficulties is that when a player is removed or added to the list, the original repeating event would need to be edited, or deleted and re-added

I am just struggling with the parameters needed to actually get it to repeat the event as the Backend Workflows don’t seem to let me select that the event is the thing I want to repeat.

Thanks again for any help you can offer

Ok, so sounds like there’s no need to schedule future events way out then

Not necessarily…depends on how you set it up

What have you tried so far? Let’s see screenshots of your workflows. passing the event should be very simple. You just have to ensure that the API workflow has a parameter of event type

I have banged my head against the wall numerous times, I still cannot see it, whether running an API Workflow or a Recurring event, I cannot see how I get it to copy the event details (plus) 7 days.






Hopefully these screenshots demonstrate somewhere where I am going wrong.

Thanks for helping, lifesaver…

Let’s assume that you’re just making 1 future event since that seems to support your use case the best. This means you can get rid of the repeat parameter

First, your API workflow needs to know which event you want to copy. So you can create a parameter of type event.

Now in the first action of the API workflow, where you’re creating a new thing, you can reference the event passed in the parameter for each field. For example, you select the field “matchTitle” and set it to parameter event’s match title. Do this for all fields and you’ve created a copy of your original event.

Now you want to change the event date. If it’s 1 week after the original event then it would be parameter event’s eventDate + days 7.

Finally, decide when you want the new event to be created. This will be the scheduled date of the API workflow, not to be confused with the event date.

Okay, excellent!!! I have managed to make this work now, So I can create an event, set the repeating type to ‘Weekly’ and the API only runs when this is set to weekly, I tested it to run in 3minutes time, just because I didn’t want to wait a week to see if it worked.

But my next question is, how is the following weeks one created now? Looking at the log, under the schedule, you see the repeating event appear, then once it has run, the entry in the log disappears, meaning I only create one extra event.

But, I must thank you for your help. I was missing the ‘event’s’ section of the ‘Set Another Field’ section of the API , eventDate = event’s eventDate

In the API workflow that creates the new event, schedule that same API workflow to run in another week. For the event parameter just reference result of step 1

You can also store the event ID of the scheduled API workflows to cancel them if the event’s date is changed or if the event is no longer recurring

Hi again, and again a humongous thanks for all your help thus far, it is greatly appreciated.

That does seem to work, see attached screeny’s.

With the EventID, I have already created a field for a RandomString when ‘A team’ is created, this is how parents can sign their player up to the team during registration (as the coach will supply the parent / player with the unique ID). Would you suggest creating a Unique ID this was for these too? Using a Generate RandomString.

I can do that easy, will need to work out how to reference this ID when calling up the parameters of the event to edit it, but this does remind me, I haven’t built an ‘Edit Event’ screen yet.




huh??

Sorry, it made sense when I typed it out.

I have a workflow that when a ‘Coach’ creates a "Team’ that it uses a Random String to create a unique 8 character ID for that team. Would you suggest using the same thing to create a unique ID for repeating events like training?

Generate random string doesn’t guarantee unique values, although it’s highly unlikely that you’d see duplicates generating an 8 character ID. Slugs are guaranteed to be unique though

Okay, brilliant, thanks for all the help…

Do you have any familiarity with either sending bulk SMS or WhatsApp messages when these are created, either the first time or the repeating version?

I haven’t done that before but I’m sure it’s not that complicated. Just need to set up an API call and send it a list of contacts