Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Answered

Apply to each not working for excel date lookup with condition

(0) ShareShare
ReportReport
Posted on by 29

I'm try to create a flow that seems pretty straightforward. However, the flow passes testing but does not send an email.  Do I have to create an expression for a date conversion or another action for the condition within Apply to each?  I look forward to feedback from the community.

 

1. Lookup date in Excel table (the Excel file is housed in my business One Drive and contains a table name)

krabotte_1-1651160374149.png

2. If today's date = date in Excel table (anniversary column)

3. Use Outlook365 to send email

 

krabotte_0-1651160055946.png

 

  • krabotte Profile Picture
    29 on at
    Re: Apply to each not working for excel date lookup with condition

    After stepping away and coming back, I got it to work as intended using your filter suggestion, Scott.  Much appreciation for the guidance!

  • krabotte Profile Picture
    29 on at
    Re: Apply to each not working for excel date lookup with condition

    One last question for you, Scott, (Your solution above did work, by the way.  Thanks!)

     

    What expression could I use to filter the anniversary date value by today's date?  I plan on running this as a scheduled flow and I would like it to send an email if the date for anniversary = today's date.

  • Verified answer
    ScottShearer Profile Picture
    25,208 Most Valuable Professional on at
    Re: Apply to each not working for excel date lookup with condition

    @krabotte 

    See my suggestion above to use a filter query instead.  Please let me know if it works for you.

  • krabotte Profile Picture
    29 on at
    Re: Apply to each not working for excel date lookup with condition

    Yes.  I entered the date manually (2022-04-28) for testing purposes.  However, I will like to use today's date in the final solution.  Should I use the formatDateTime(utcnow) expression? 

  • Verified answer
    ScottShearer Profile Picture
    25,208 Most Valuable Professional on at
    Re: Apply to each not working for excel date lookup with condition

    @krabotte 

    Note the date format of the anniversary in the output - it is in the yyyy-MM-dd format.

    Did you change the date format of your date to 2022-04-28 ?

     

    You are better off using a filter query instead of a condition anyway - see my screen shot below - it works for me:

    image.png

     

  • krabotte Profile Picture
    29 on at
    Re: Apply to each not working for excel date lookup with condition

    Scott, 

    Your suggestion doesn't work for me.  The flows run successfully because none of the conditions is marked as true.  However, the second row in the file should be true because the date matches the output.  Any other ideas?

     

    Outputs.PNGFalse Inputs.PNG

     

  • ScottShearer Profile Picture
    25,208 Most Valuable Professional on at
    Re: Apply to each not working for excel date lookup with condition

    @krabotte 

    Change the date in your condition to 2022-04-28 and make sure that the List rows action has the date format set to ISO 8601

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,594 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,928 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow