cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Jhargrove95
Frequent Visitor

Sending Emails Based on Excel File

Hello,

 

I am working on a new flow that sends emails to recipient's using excel. However, when I am creating the excel file, and have duplicate recipients, it sends multiple emails to those recipients. 

I am trying to make it so that if a recipient is listed multiple times on the excel sheet, it will only send one email to them.

Is this possible? I have tried leaving the next few lines in the excel spreadsheet blank, but the flow "fails" because there are null fields and it can't decipher those null fields. I have also tried making a control for the the field that is equal to "null" but I can not find an expression or action that would ignore those fields and move down to the next fields.

 

Any assistance is appreciated!

 

2020-02-24 10_58_09.png

 

3 REPLIES 3
Super User
Super User

Re: Sending Emails Based on Excel File

Hi @Jhargrove95 

 

Add a new column in your excel called 'Send Email'. Once the email is sent then set the flag as 'Yes'. Also before sending email filter the excel rows using some columns (Key) which are unique and flag is Yes. This way you can determine whether you have already sent the email or not?

 

To check a column is null use empty expression

 

empty(items('Apply_to_each')?['Name'])

 

image.png

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Jhargrove95
Frequent Visitor

Re: Sending Emails Based on Excel File

I don't think that will solve my issue. 
What I am running into is when the table in the excel file has empty values, the flow will fail and state that there were null fields.

It will send an email to the field that has an email address, but when it goes down to the next row, and there is nothing there, it can not go on to the next row do to the row being empty. Therefore, it wont send any emails to the next email listed. It will also trigger a fail, and robot will not continue on to next steps.

Super User
Super User

Re: Sending Emails Based on Excel File

Hi @Jhargrove95 

 

Not sure I understood your latest response correctly.  How the power automate step is going to fail if you checking a specified value is empty or not and move on to next item. Could you please explain with some examples?

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog

Helpful resources

Announcements
firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Automate Community!

firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Users online (7,550)