Can someone help me to understand why this scheduler consumed about 100k workload units?

Hi there I’m trying to create and scheduler email notification to let know when the user have unread messages every 8 hours. According to me, everything is ok but the app consumed too much workload units and also an user reported me that he received 1500 emails.

Here is the API Workflow:

The first three steps just create a link, don’t send email. And this is because in the app we have 3 differents kind of users.

Here is the condition of the Send email action:

And there is the trigger to activate the workflow:

image

Thanks a lot!

Hey @apps3 :wave:

This is a common mistake. Glad you caught it before you racked up a large bill. :blush::raised_hands:

It looks like you are scheduling on a list of users at 9am and then for each user you are scheduling another list of users 8 hours from then.

The problem is that you are scheduling the list multiplied by the amount of users you have which will continue to get bigger and bigger.

You need to have a daily workflow that just schedules itself each day. Then that will trigger the other workflow to just happen once per day not multiply.

This is what you were doing:

Schedule on list of users

  1. User one
    A. Schedule on a list of users
    1. User one
    A. Schedule on a list of users.
  2. User two
    A. Schedule on a list of users
    1. User one
    A. Schedule on a list of users.
  3. User three
    A. Schedule on a list of users
    1. User one
    A. Schedule on a list of users.

Etc.

This is what you want to do:

Run daily workflow - loop
Schedule On a list of users

  1. User one
  2. User two
  3. User three

Does that make sense?

5 Likes

It makes a lot of sense :grinning: :grinning: thank you so much!

1 Like

Happy to help. :blush:

1 Like