Skip to main content

Notifications

Community site session details

Community site session details

Session Id : 8gPa+M9kk4aGoiUs14li+0
Power Automate - Building Flows
Answered

Send email from excel if the date is more than 42 days.

Like (0) ShareShare
ReportReport
Posted on 8 Aug 2022 15:07:35 by 318

Hi All, 

I am trying to create a flow to send emails to people in list from excel file, 

1. I want to the check the excel file everyday, see if there is anyone whose date is over 42 days send them a specific email.

2. There are 2 project type, project 1 and project 2. I want to add condition if the person is from project 1 and the date is over 42 days, send specific email and if the person is from project 2 and the date is over 42 days send specific email. 

 

I have only come till this part and dont know if i am doing this right or what to do next, the flow does not give me errors and suceeds everytime i test it, but there is no result please help me. Thank you.

 

formatDateTime(items('Apply_to_each_2')?['Date'],'yyyy-MM-dd')

addDays(items('Apply_to_each_2')?['Date'],42,'yyy-MM-dd')

 

VikasNagaraj_0-1659974183601.png

VikasNagaraj_2-1659974214061.png

 

VikasNagaraj_3-1659974233787.png

 

 

VikasNagaraj_2-1659971054923.png

 

@Pstork1 @Expiscornovus @abm @tom_riha 

  • VikasNagaraj Profile Picture
    318 on 10 Aug 2022 at 14:53:16
    Re: Send email from excel if the date is more than 42 days.

    @abm Thank you very much for your time and help. 
    @tom_riha thanks for your respose and formula.

  • Verified answer
    abm abm Profile Picture
    32,464 Most Valuable Professional on 10 Aug 2022 at 14:42:21
    Re: Send email from excel if the date is more than 42 days.

    Hi @VikasNagaraj 

     

    @tom_riha  Had a screenshare session with Vikas. There are couple of things he need to change as part of this requirement. Thanks for your prompt response.

     

    Following are the steps we did.

     

    1. Use the filter array step to get date greater than 42 days

    2. Again filter the records with project names (Project 1, Project 2)

    3. Once the records are retrieved then find the unique email recipients. Here used union and join expressions.

    4. When the email is sent the update the relevant records to send email 'Yes'

     

    Thanks

  • tom_riha Profile Picture
    10,085 Most Valuable Professional on 09 Aug 2022 at 16:09:43
    Re: Send email from excel if the date is more than 42 days.

    Hello @VikasNagaraj ,

    if you take the expression exactly as it is it'll search for rows with the date in 42 days from today. If you want to search for 42 days in the past instead use -42.

  • VikasNagaraj Profile Picture
    318 on 09 Aug 2022 at 08:04:16
    Re: Send email from excel if the date is more than 42 days.

    @tom_riha 

    Thank you for your response, I did try the expression proviced, it gave me a error when i copied and pasted it, but when i removed the @ and {} it was fine, dont know if i did that right. 

    The flow came sucessfull but no output, the apply to each is grayed out when i checked the test result. 

    VikasNagaraj_0-1660032179761.png

    Is this the right condition i am applying ?

    VikasNagaraj_1-1660032247965.png

     

  • Verified answer
    tom_riha Profile Picture
    10,085 Most Valuable Professional on 08 Aug 2022 at 17:01:56
    Re: Send email from excel if the date is more than 42 days.

    Hello @VikasNagaraj ,

    you can filter the rows directly in the 'List rows...' action to return only rows with a date over 42 days

    DateColumn eq '@{add(div(sub(ticks(utcNow()),ticks(formatDateTime('1899-12-30'))),864000000000),42)}'

    it'll return only the valid rows, all that's left is to loop through the rows in 'Apply to each' and add a 'Condition' depending on the project.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,645 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,997 Most Valuable Professional

Leaderboard
Loading started