cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
EC_1
Helper III
Helper III

Create a flow that sends an email if a table in SQL wasn't updated during the day

I want to te create a flow that checks the last time that a table in SQL was updated
if the table wasn't updated between 6:00 am and 6:00 pm send an email 

1 ACCEPTED SOLUTION

Accepted Solutions
v-bacao-msft
Community Support
Community Support

 

Hi @EC_1 ,

 

There is no field in the SQL table to record the time when the record was changed, so we need to use other table/ list to record whether the SQL table has been changed within a specified period of time.

Please consider using the following method to configure Flow. We need to create a SharePoint List.

  • Create a new Flow and use When an item is modified (V2) as the trigger to determine whether the current time is at 6:00 am and 6:00 pm. If so, create an item in the list.
  • Create another Flow and run it once a day to see if there are items in the list created yesterday. If not, it means that the SQL table yesterday has not been changed within the specified time period.

Image reference:

35.PNG

Another Flow:

36.PNG37.PNG

Please take a try.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-bacao-msft
Community Support
Community Support

 

Hi @EC_1 ,

 

There is no field in the SQL table to record the time when the record was changed, so we need to use other table/ list to record whether the SQL table has been changed within a specified period of time.

Please consider using the following method to configure Flow. We need to create a SharePoint List.

  • Create a new Flow and use When an item is modified (V2) as the trigger to determine whether the current time is at 6:00 am and 6:00 pm. If so, create an item in the list.
  • Create another Flow and run it once a day to see if there are items in the list created yesterday. If not, it means that the SQL table yesterday has not been changed within the specified time period.

Image reference:

35.PNG

Another Flow:

36.PNG37.PNG

Please take a try.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

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
Top Kudoed Authors
Users online (2,827)