How to get unique email values from dt and sending email with cumulative data

Hello,

I will create a data table with a query. ps.Id is a variable from previous parts of the process. Data table will be filled with different rows of different emails.

I would like to send an e-mail to unique e-mail values with their all row datas. All rows of companies should be attached to email via excel.

Thank you in advance for your support.


@cagatay.kater

As you are getting for each p.id already …

Now group the data by email and then loop on the grouped data inside loop use write range and send email

Dt.AsEnumerable.GroupBy(function(x) x("email").ToString).ToDictionary(function(x) x.key,function(y) y.CopytoDatatable)

Now inside loop currentitem.key will give the email and currentitem.value will give the related datatable

Cheers

Thank you for reply, however I am tcomplete beginner to automation :slight_smile:
Should I create loop with flow chart? How can I group email? And lastly will I write the code inside write range?

@cagatay.kater

you need to use for each loop yes

the code given is for grouping

inside loop use write range with currentritem.value which gives datatable

cheers

Is it possible you to show with studio sequence screenshot? Thank you in advance!

@cagatay.kater

FYI

cheers