How to count number of records returned across multiple bundles

So, I’d like to lookup how many emails have been sent/received for a given email address and return a list of senders/recipients and a count of emails sent/received for each sender/recipient.

So far, my scenario provides a given email address. The next step is to search Outlook/Exchange which returns the emails found where the given email address is within the TO or FROM fields.

Where I’m stuck is how to build a table of results which performs a count. I’m close, however, where, say, an email TO field contains multiple email addresses, I am using an Iterator to do a count of each individual email address. This is fine to a point.

The question I have is, how do I total up the count where a recipient exists in multiple emails (bundles).

For example
email 1: From john@somewhere.com To: joe@abc, mike@xyz
email 2: From john@somewhere.com To joe@abc
email 3: From joe@abc To: john@somewhere.com

In this example, the email address to search is john@somewhere.com and I’d want a table showing:
joe@abc 3 emails
mike@xyz 1 email

The iterator contains 3 operations in this example (3 emails) and
2 bundles for operation 1
1 bundle each for operation 2 and operation 3

Is this enough info for some wise person to point in the right direction?

Thanks in advance

In the Array Aggregator, expand the "Show advanced settings, and then insert the email address variable into the “Group by” field.

Then, you can use the length function on the resulting arrays to count the number of emails per address.

You might need to use another aggregator after that.

Hope this helps! Let me know if there are any further questions or issues.

@samliew

Thanks for this. I did try adding an array agregator but struggling. Do you offer paid help?

You can use the Hire a Pro category to request for private 1-to-1 assistance via video call/screenshare/private messaging/etc. This may help you get your issue resolved faster especially if it is urgent or contain sensitive information. It is important to post your request in the Hire a Pro category, as forum members are not allowed to advertise their services in other categories like here (even if it’s free/unpaid). Posting in the Hire a Pro category will allow other members to assist you over other forms of communication.

Alternatively, you can use the private messaging feature to directly reach out to other forum members. To do this, go to your profile, and click on the “New Message” button:

Hope this helps! Let me know if there are any further questions or issues.

@samliew