How can I group multiple email attachments for different recipients?

Hey everyone - I have an automation that searches Xero for invoices and sends emails to the Xero user with the invoice attached.

Currently if the same user has multiple invoices, they’ll receive multiple different emails. However, instead I’m attempting to attach multiple invoices to the same email if that user has multiple invoices. I’ve used the aggregator to send an email with multiple attachments, but not sure how to do this for each user we have in Xero. Do i need to also iterate before the aggregator? Appreciate any support, thanks!

[Edit] - have since changed the source of the aggregator to ‘Search for Contacts’ xero module at the start of the scenario with the same result - sends one email with one attachment.

Hey @Tom_Cronin ,

  • so first we are searching for contacts, add a iterator to loop through each contact.
  • we search for invoices.
  • add aggregator to gather all invoices for one contact
  • and then we send the email (the id can be mapped)

let me know if you get stuck somewhere, thanks

Thanks @Anshul_Soni ! I’ve tried the above and unfortunately getting similar results (individual emails with individual attachments). Perhaps I have setup the aggregator incorrectly?


Thanks!

@Tom_Cronin there is problem with the mapping or grouping of array aggregator, you need to group this from the data coming from the ‘Search for invoices’ module.

please try and let me know