cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
XiScorpii
New Member

Trigger E-mail on Action Date within Excel Table

I am brand new to Microsoft Flow and believe I am pretty close (from my own research) to what I want to do-- I appreciate any feedback and guidance in advance!

 

I am utilizing this scheduler (below) that is stored within a SharePoint site:

Table.png

 

All three of these fields will play a role in the flow, but currently I am facing trouble in converting date values within Excel (ACTION DATE) into Power Automate. So far what I have is below:

 

Flow.png

 

The trigger of the entire process is that IF the 'Action Date' is today's date, then execute the e-mail. Every time I run the test, the date comes up as false and this is not the case. Deductive reasoning has led me to the fact that I am converting the date incorrectly into flow. In addition, I do not need time values accompanied by the date.

 

May someone please assist with this? 

 

1 ACCEPTED SOLUTION

Accepted Solutions

So when I look again on your flow, the values in the condition don't seem right, so I'll start from the beginning. In Power Automate if you want to add a function, you need to go into the 'expressions' tab and design them there. If you just type them in as a string they'll be processed as a string. 

image.png

Then, to compare dates in Power Automate they should be in the same format which you already expected in your condition. For that there's formatDateTime() expression. On the left side, you use a dynamic content from the Excel file.

formatDateTime([Date dynamic content],'yyyy-MM-dd')

image.png

On the right side, to get today's date, Power Automate has utcNow() expression, where you can define the date format as a parameter.

utcNow('yyyy-MM-dd')

image.png 

 

If for any reason the condition doesn't work, you can create the two variables with the same expressions as you're using in the condition:

1st variable value: formatDateTime([Date dynamic content],'yyyy-MM-dd')

2nd variable value: utcNow('yyyy-MM-dd')

 

That way you'll be able to see what enters the condition and adjust it if needed.



[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ I also blog about Power Automate solutions even for non-IT people. ]

View solution in original post

4 REPLIES 4
tom_riha
Super User
Super User

I'd try to initialize 2 string variables before the condition and store both sides of the condition into them. That way you can see in the flow run history what values will enter the condition and adjust them accordingly.



[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ I also blog about Power Automate solutions even for non-IT people. ]

May you please elaborate? I am new to Flow so I am unsure what you are talking about, but I did try to make sense of it. 

 

This is my logic for what you just said:

Initialize Variable--

Name; Action Date

Type; String

Value; (Not sure what to put here)

 

** Then I do the same thing with today's date?

 

The thing with this is that I will have more than just two dates in the Action date column.

So when I look again on your flow, the values in the condition don't seem right, so I'll start from the beginning. In Power Automate if you want to add a function, you need to go into the 'expressions' tab and design them there. If you just type them in as a string they'll be processed as a string. 

image.png

Then, to compare dates in Power Automate they should be in the same format which you already expected in your condition. For that there's formatDateTime() expression. On the left side, you use a dynamic content from the Excel file.

formatDateTime([Date dynamic content],'yyyy-MM-dd')

image.png

On the right side, to get today's date, Power Automate has utcNow() expression, where you can define the date format as a parameter.

utcNow('yyyy-MM-dd')

image.png 

 

If for any reason the condition doesn't work, you can create the two variables with the same expressions as you're using in the condition:

1st variable value: formatDateTime([Date dynamic content],'yyyy-MM-dd')

2nd variable value: utcNow('yyyy-MM-dd')

 

That way you'll be able to see what enters the condition and adjust it if needed.



[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ I also blog about Power Automate solutions even for non-IT people. ]

View solution in original post

Great thank you, this worked!

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Users online (2,934)