Hi All,
A site that I managed was recently migrated to 365 from on premise.
I have a few site workflows but this one is taking forever to run, it has never completed. On premise, this workflow would take about 20 minutes.
The workflow in a nutshell:
- Build an email template
- Query a list for ALL items (has about 2500 list items) to get user names (there are 12 users - This does not change often.
- Remove duplicates.
- for each user in the collection (where user = variable from step 2)
- Query the list for the items for that use
- For Each item found in the second query
- set multiple variables (10 individual variables)
- Math: Add item to counter variable
- Build string adding the variables to an email template
- Build String: close the table
- Run if counter = 125
- pause for 2 minutes
- reset counter variable
- send email
- clear all collections
overall there are two queries and 2 for Each activities. I have no idea why this takes so long. It takes an hour just to get one email.
Any help here would be MOST appreciated.