# Recurring workflows based on a field

**URL:** <https://forum.bubble.io/t/recurring-workflows-based-on-a-field/320748>\
**Category:** APIs\
**Created:** [May 3, 2024, 6:12pm UTC](https://forum.bubble.io/t/recurring-workflows-based-on-a-field/320748 "2024-05-03T18:12:04Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![danielshibu82](https://avatars.discourse-cdn.com/v4/letter/d/ebca7d/32.png) [@danielshibu82](https://forum.bubble.io/u/danielshibu82)\
**Post date:** [May 3, 2024, 6:12pm UTC](https://forum.bubble.io/t/recurring-workflows-based-on-a-field/320748/1 "2024-05-03T18:12:04Z")

</div>

I have a database of companies and would like to send them different recurring emails at varying frequencies depending on what they have subscribed to (this is depicted by a field attached to each company).  
I have a field (subbedwkflw - list )attached to each company which decides what emails they should receive.  
Email A - should be sent yearly  
Email B - should be sent quarterly  
Email C - should be sent quarterly

Im on the personal plan and it looks like I can on set a recurring event (send email A, send Email B send, Email C - recurring event) per thing. This isn’t great as I want to go through all the companies and set a recurring workflows to send emails dependant on what each subbedwflw field contains.

I ve tried using the database trigger workflows for each email with conditions that check if the email type is in the subbedwfklw field and then it should set the recurring workflow. But this has shot up my WKU into the 20,000s for running it on 3 companies in app.

I just need a way of setting whatever recurring workflows that is mentioned in subbedwkflw field for each company.

How can I do this in an optimised way and without having to upgrade to a more expensive plan?

---

<div class="post-metadata">

**Author:** ![boston85719](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/boston85719/32/77286_2.png) [@boston85719](https://forum.bubble.io/u/boston85719)\
**Post date:** [May 4, 2024, 1:26pm UTC](https://forum.bubble.io/t/recurring-workflows-based-on-a-field/320748/2 "2024-05-04T13:26:08Z")

</div>

> [@danielshibu82](#):
>
> How can I do this in an optimised way and without having to upgrade to a more expensive plan?

Backend workflows that schedule themselves after sending the email and scheduling them according to the concept you outlined of quarterly or yearly…basic math can get that correct so you have things for schedule and use ‘current date plus year 1’ or ‘current date plus months 4’

---

<div class="post-metadata">

**Author:** ![danielshibu82](https://avatars.discourse-cdn.com/v4/letter/d/ebca7d/32.png) [@danielshibu82](https://forum.bubble.io/u/danielshibu82)\
**Post date:** [May 4, 2024, 1:33pm UTC](https://forum.bubble.io/t/recurring-workflows-based-on-a-field/320748/3 "2024-05-04T13:33:45Z")

</div>

thats a great way of setting the frequency intervals thanks. But how would I initially trigger the workflow that sets the recurring workflow of sending the regular emails ? it looks like i can only set one per company at the moment or am i getting confused ?

---

<div class="post-metadata">

**Author:** ![boston85719](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/boston85719/32/77286_2.png) [@boston85719](https://forum.bubble.io/u/boston85719)\
**Post date:** [May 4, 2024, 1:51pm UTC](https://forum.bubble.io/t/recurring-workflows-based-on-a-field/320748/4 "2024-05-04T13:51:13Z")

</div>

> [@danielshibu82](#):
>
> it looks like i can only set one per company at the moment

I do not keep track of the changes Bubble makes to their plans and included feature sets, so that may be the case.

> [@danielshibu82](#):
>
> But how would I initially trigger the workflow that sets the recurring workflow of sending the regular emails

Schedule the backend workflow when the user does something in the app, like signup or when they provide the information needed to populate the emails.

---

<div class="post-metadata">

**Author:** ![danielshibu82](https://avatars.discourse-cdn.com/v4/letter/d/ebca7d/32.png) [@danielshibu82](https://forum.bubble.io/u/danielshibu82)\
**Post date:** [May 4, 2024, 1:52pm UTC](https://forum.bubble.io/t/recurring-workflows-based-on-a-field/320748/5 "2024-05-04T13:52:10Z")

</div>

currently i have it set up as shown:

 ![image](https://us1.discourse-cdn.com/bubble/original/3X/a/b/ab6112ef4a635aa4d668e9d14f617f1d4045e745.png)  
So the app user selects that a company should be sent Email A, Email B and Email C an api workflow gets called which adds the email to the company subbdwklw field and also set the recurring events with the conditions that only allow it to be set if the email type is in the subbdwkflw field. So when i run it now it only sets on out of the 3 recurring workflows where it should set all three?  
 ![image](https://us1.discourse-cdn.com/bubble/original/3X/1/5/15c89bfd8d5a3adcb0b79b2d4b8e4fdf2f71a46f.png)  
As you can see its only set Annual accounts email when it should have set PAYE and VAT too.  
 ![image](https://us1.discourse-cdn.com/bubble/original/3X/2/8/2831732e591176e3a2270192c52d6989c9de9785.png)

---

<div class="post-metadata">

**Author:** ![danielshibu82](https://avatars.discourse-cdn.com/v4/letter/d/ebca7d/32.png) [@danielshibu82](https://forum.bubble.io/u/danielshibu82)\
**Post date:** [May 4, 2024, 3:48pm UTC](https://forum.bubble.io/t/recurring-workflows-based-on-a-field/320748/6 "2024-05-04T15:48:21Z")

</div>

so would that be done individually or is there a way i can do it on multiple companies ate on time?

---

<div class="post-metadata">

**Author:** ![danielshibu82](https://avatars.discourse-cdn.com/v4/letter/d/ebca7d/32.png) [@danielshibu82](https://forum.bubble.io/u/danielshibu82)\
**Post date:** [May 9, 2024, 9:45am UTC](https://forum.bubble.io/t/recurring-workflows-based-on-a-field/320748/7 "2024-05-09T09:45:10Z")

</div>

@jici helped me out, had a separate thing per email type
