Crow Canyon Software Forum

Forum Navigation
Please or Register to create posts and topics.

Accessing current loop iteration in Execute Script action

I have a custom action that uses a Query List action to get a bunch of tasks from a template, then an Add List Item action to add those tasks to another list associated with an event. Each task is assigned to an individual in a person column. I would like to build a deduplicated list of email recipients so that managers aren't deluged with dozens of emails for individual items.

I've added a Loop Control to the end and was thinking I could iterate over the original Query List results from the task templates, then use an Execute Script action to check if the email address is already in a variable and add it if it's not.

My problem is that I can't figure out how to access the loop iteration values instead of the 'current item' values that are associated with the event being created, not the tasks.

I'm also open to any easier methods, like maybe I'm just overthinking this and it would be OK to pass duplicate addresses to the Send Mail action? That list could potentially be quite long and I don't know if there is a character limit on the To line.

Thanks,

Joe

Hi Joe,

It's okay to pass duplicate email addresses in the Send Mail action as only unique addresses from the variable are considered.

When send mail action runs in a custom action, an item is created in the ‘Send mails’ list. All recipients are stored in a multi-line text column, so there are no character limit issues.

Please check and test it in your custom action and let us know if the duplicate email address in the send mail action is causing an issue.