cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Workato Newbie - Need help with repeater element!

freyaf
Deputy Chef I
Deputy Chef I

Morning all. I'm new to Workato so learning as I go, but I'm trying to create a scheduled recipe which fires each day at 0100 AM (Europe/London time) which searches for all Opportunities in Salesforce that are due to close in 14 days time. Our organisation mainly operates from three regions; NAM (approx GMT-5), EMEA (GMT time) and APAC (predominantly GMT+8). 

For each Opportunity that's due to close in 14 days time, I want to send a message to the Opp Owner on Slack. The issue is, we want to make sure it's catering for those in different time zones. E.g. posts to Slack at 0900 GMT+8 for those in Singapore, posts to Slack at 0900 GMT for Europe/London users, and posts at 0900 for NAM users (GMT-5). We also don't want it posting on Weekends, so if it's Saturday (identified by a variable which calculates the current day as 6) or Sunday (identified by the variable calculating the current day as 0), we want the recipe to pause for 48 hours or 24 hours respectively.

At the moment, I am creating a list which collates all Opps due to close in 14 days time. I'm then looping through each Opportunity that's been found in Salesforce and adding it to the list. I've then nested IF conditions within the loop to determine whether the current day is a Saturday or Sunday, or to determine whether the Opportunity Owner's Region is EMEA or NAM; if so, the recipe needs to wait 8 hours or 13 hours. The issue I've found is, if a user has more than one opportunity closing in 14 days time, the WAIT element will pause the entire recipe until after the given time. 

How do I create the recipe so that it can cater for all users in different timezones, and not pause the entire recipe? 

Screenshot 2025-05-12 at 10.54.23.png

โ€ƒ






3 REPLIES 3

1dheeraj2
Deputy Chef III
Deputy Chef III

Hi @freyaf ,

Using a single recipe with wait functions could lead to unexpected issues, as you've noticed. Let me suggest two alternative approaches ( as you have to work with 3 region, you can use multiple recipes):

Approach 1: Multiple Function Recipes

  • Create separate function recipes for each region
  • Call them asynchronously and use wait action there  ( try updating concurrency of each recipe to at least 2)
  • This keeps post notifications independent
  • Would require 4 recipes in total

Approach 2:

  • Create 3 scheduler recipes (one per region) 
  • Run each at their specific notification time
  • Filter opportunity owners by region
  • Send notifications directly without wait dependencies

Just a helpful tip: Consider creating a separate single function recipe for posting messages. This way, if you need to modify the notification format in the future, you'll only need to update it in one place rather than making changes across multiple recipes. But it all depends.

Another approach is to keep your existing recipe with all the logic intact. Just create three separate scheduler recipes (one per region) that call this main recipe. This way:

  • You maintain all logic in one place
  • Each scheduler recipe handles its specific region
  • No need to duplicate the logic across multiple recipes

This gives you the best of both worlds - region-specific timing with centralized logic.

There is another approach you can try:

  1. Set your main scheduler to run hourly (starting from, say, 1 AM London time)
  2. Add an if condition right after the scheduler that:
    • Calculates current time
    • Checks if it matches notification times for any region (APAC, NAM, etc.)

  3. If time matches, proceed with your existing notification logic

Benefits:

  • Single recipe handles everything
  • No extra task usage
  • Maintains all logic in one place
  • No need for multiple schedulers

Please let us know if you find a better solution, as this use case is common among SFDC users and could help others.

All great suggestions. I would also like to add that you may want to consider consolidating messages into a single message per user. I've implemented similar notification systems via email and messagings app (Slack, Teams, etc.), and the first feedback is inevitably "I'm getting too many emails/notifications."

I don't know the volume of opportunities in Salesforce, but this recipe results in any user getting more than maybe 5 emails/messages daily you should really consider consolidating to avoid feeling spammy.

ajorde
Deputy Chef II
Deputy Chef II

Your original question looks to be answered, but I want to make one slight suggestion for improving your recipe above. If you filter your Salesforce opportunities up front, you can avoid the need for the list. Alternatively, if the list is helping with some additional lookup values or otherwise useful formulas, please consider adding all the records to the list when the list is being created to avoid an extra task during each iteration of the loop.