web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / SharePoint Online List...
Power Automate
Unanswered

SharePoint Online List from SQL

(0) ShareShare
ReportReport
Posted on by

Hi

 

I have a SharePoint list that is populated from SQL on a scheduled task.  I was to be able to use this list as a location where users can access to make requests to update data that then copies over to another SharePoint list for review by an SME.  The issue I'm having is the flow I'm using (When an Item is created or modified) is copying and emailing me everytime my SQL to SharePoint task runs.  I only want the data to copy and notify me when the data is modified by a user.  Any help as to how I can do this?

 

Thank you
Larry

Categories:
I have the same question (0)
  • efialttes Profile Picture
    14,756 on at

    Hi!

    You probably need to add a 'Condition' action block, evaluate whatever condition you need, on the true branch add email notification, leave false branch empty

     

    'notify me when the data is modified by a user'

    A specific user, you mean?

    On the left part of you condition you shall add the following expression

     

    triggerBody()?['Editor']?['Email']

     

    On the right side just type its email address

    Operator: equals

     

    Please note in order to add expressions you need to follow these steps

    https://flow.microsoft.com/es-es/blog/use-expressions-in-actions/

     

    Please implement suggested approach, if problem persis or flow execution fails please share a screenshot from Flow design

    Thanx!

  • Community Power Platform Member Profile Picture
    on at

    Thank you @efialttes .  I will try this next week and let you know how it goes.

     

    Larry

  • efialttes Profile Picture
    14,756 on at
    No problema
    Have a good weekend! Please take care and stay healthy
  • Community Power Platform Member Profile Picture
    on at

    Hi @efialttes 

     

    I went ahead and added the expression and(triggerBody()?['Modified'],not(equals(triggerbody()['Created']))) to both of the columns that I want.  When either of the two of these columns are modified (columns are choice), an email notification should be sent and the data with any attachments should be sent to my other list.  If the data is being replaced/created during the scheduled task from SQL, the notification email should not be sent and the data should not be copied.  

     

    condition.JPG

     

     error.JPG

     

    The users modifying this list is not just one person.  It could be anyone from my department.

     

    Thank you

    Larry

  • efialttes Profile Picture
    14,756 on at
    Wait, wait, wait... did my first suggestion worked?
    Not with my laptop, sorry
    Thanx!
  • Community Power Platform Member Profile Picture
    on at

    The suggestion you made didn't fail but it didn't copy the data to my other list and it didn't send an email notification.   Below you will find the skip message I received.  

     

    Capture.JPG

  • efialttes Profile Picture
    14,756 on at

    @Anonymous 

    "I went ahead and added the expression and(triggerBody()?['Modified'],not(equals(triggerbody()['Created']))) to both of the columns that I want.  When either of the two of these columns are modified (columns are choice), an email notification should be sent and the data with any attachments should be sent to my other list"

     

    Probably it's me who is not understanding properly your approach... It sounds to me as a wrong one. First of all, 'Modified', 'Created' relates to the whole item, no to particular columns. So, if you create an item then modify any column value, Modified will no longer equal to Created.

     

    Also the expression

     

     

    and(triggerBody()?['Modified'],not(equals(triggerbody()['Created'])))

     

     

    does not make sense. equals() needs two entries, you only added one

    https://docs.microsoft.com/en-us/azure/logic-apps/workflow-definition-language-functions-reference#equals

     

    Now, on the issue described at the beginning of this thread:

    "I only want the data to copy and notify me when the data is modified by a user."

    What I understood is that you wanted copy+notify when data is modified by a specific user (let's say bob@contoso.com). THat's why I suggested to evaluate a condition like:

     

     

    equals(triggerBody()?['Editor']?['Email'],'bob@contoso.com')

     

     

    When using a Condition action block, things are done in a more visual way, so you just add first entry on the left, either as an expression or by selecting it from Dynamic content

     

    Then select operator equals

     

    Finally add second entry on the right

     

     

    bob@contoso.com

     

     

     

    But, if your goal is to run this copy + notify when item is modified, then you should consider this alternate approach

     

     

     

    not(equals(triggerBody()?['Created'],triggerBody()?['Modified']))

     

     

     

    If you work with a Condition action block, then it should look the following:

    Flow_CreatedModified.png

    Please note my interface is in Spanish, but when I hover the mouse over the entry on the right, you can see triggerBody()?['Modified']. If I hover the mouse over the entry on the right, I would see triggerBody()?['Created']. Finally, operator selected ' is not equal to' corresponds to not(equals())

     

    Hope this time I understood properly your requirements so all of this explanation makes sense

  • Community Power Platform Member Profile Picture
    on at

    thank you @efialttes for all this information and help.  I will try these steps later on this week (I am pretty tied up at the beginning of the week).  I will let you know if I have any better luck.

     

    Thank you again for all your help.

    Larry

  • efialttes Profile Picture
    14,756 on at

    Hi!

    No worries, take your time.

  • Community Power Platform Member Profile Picture
    on at

    Hi @efialttes 

     

    I had no luck with this.  I'm going to delete this flow (since it keeps running) and start a new one to see if I have better luck.

     

    Thank you

    Larry

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 523 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 406 Moderator

#3
abm abm Profile Picture

abm abm 245 Most Valuable Professional

Last 30 days Overall leaderboard