Email with specific data to users from Excel

I have an Excel table which looks something like this:

Capture

I want to send an email to only those users with ‘Value = 0’. I managed to do so but the thing is the email with zero values (3 rows) is sent to all 3 users (User1, User3 and User4). What I’m after, I want to send the email with zero value only to the respective user, e.g. the user ‘User1’ will get an email with an Excel with only one row which corresponds to him/her and won’t receive the rows belonging to users ‘User3’ and ‘User4’.

Any hints or ideas are highly appreciated.

@Jasu Check the below workflow.

new11–.xaml (14.1 KB)

Reference excel

mailtest.xlsx (8.5 KB)

1 Like

Thanks Manjuts90 for your efforts providing the example, much appreciated.

A quick question, the path for the ‘Write range’ activity is: “C:\Users\Raju\Desktop\Mail"+row(1).ToString+”\Data.xlsx"

Does this mean a new folder will be created for each Excel output file? Also, how about if I want to send an email also for those having values smaller than zero (if they exist), where that condition should be specified?

1 Like

Hey ,

I have created a workflow related to your problem.
check it outDate.xaml (7.2 KB)

1 Like

@Jasu In assign statement which is present after read excel scope.

Instead of

dt.Select("[Value]=0").CopyToDataTable

Give like below

dt.Select("[Value]<=0").CopyToDataTable
1 Like

@Jasu

Yes for each mail, folder is created. I have created folder for mail because excel file can be named properly. Without separate folder creation also u can do it, by giving unique name it must be changed while second excel file and soon. You can use Name column, Email column values.

For example

“C:\Users\Raju\Desktop\Mail\”+row(1).ToString+“.xlsx”

Above statement will create excel file with mail ids(Sometimes filename should contain some special characters in that case file creation fails). So choose wisely filename while creating file.

1 Like

@Jasu If u got solution, close thread marking specific answer as solution

Thanks Manjuts90 for your help.

1 Like

Thanks Anjali01, I’ll give this one also a try.

@Jasu ur welcome bro :grinning:

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.