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 / How can I check for up...
Power Automate
Unanswered

How can I check for updated SharePoint list items each time my cloud flow runs?

(0) ShareShare
ReportReport
Posted on by

Hello Everyone.

 

I have a cloud flow that uses the Get Items option for SharePoint lists to retrieve the current values in the list I choose.

 

For example, if my list looks like this and has two entries:

 

Name: Joe Bloggs
Email: jb124@email.com

Name: Jane Doe
Email: jd127@email.com

 

The flow will get those details and then I can add a condition to do something.

 

But, if someone updates the actual SharePoint list (e.g., adds a new list item or deletes an existing one) what do I have to add to my flow to tell it to check for updates to the SharePoint list I choose every time the flow runs?

So, I imagine my flow would be:

1 - Check for updated SharePoint list items
2 - Get list items
3 - Do something

Can anyone help me with point 1 please?

Thank you so much!

Categories:
I have the same question (0)
  • Sundeep_Malik Profile Picture
    6,484 on at

    Hey @ianwuk 

     

    So, you want to know what was the previous value of the current updated field. For this you can use send an http action. 

     

    Giving you some links, which might help:

     

    https://www.youtube.com/watch?v=Pqme7N_PUDc

    https://www.youtube.com/watch?v=Ek4oYWPWfT0

    https://www.youtube.com/watch?v=DT6BpixFbHY

  • CU-19081228-9 Profile Picture
    on at

    Thank you for replying @Sundeep_Malik.

     

    I managed to get it to work by creating an array variable to store the email addresses from my SharePoint list and then using an Apply to Each to add each email address to the array and then joining them together and using that Output as the list of addresses to send the email to.

    ianwuk_0-1676358993268.png

     



     

    It works, but with a problem - the flow sends the email twice - how can I fix that?

     

    ianwuk_2-1676359204861.png

     

     



    Meaning that I run the flow and everyone in the SharePoint list gets two copies of the email - how can I stop that from happening?

    Thanks so much! 

  • Sundeep_Malik Profile Picture
    6,484 on at

    @ianwuk 

    Maybe your apply to each loop is running twice and copying all the email ids twice, and adding to the array. 

    So for this you can use union function so that it remove duplicate ids. 

  • CU-19081228-9 Profile Picture
    on at

    @Sundeep_Malik 

    I may have done this wrong, but I added a union statement as a Compose and it still sends emails twice.

    ianwuk_0-1676360274017.png

    The syntax is union(variables('var_Email_Array'),variables('var_Email_Array'))
     - where 'var_Email_Array' contains all the email address from the SharePoint list.

    The output looks correct when the flow is run and joins the two email addresses from the list.

     

    Outlook correctly uses the Output from the Join operation to send the email.

    But it still sends out emails twice, meaning that if the SharePoint list looks like this:

    Name: Joe Bloggs

    Email: Test123@test.com

    Name: Jane Doe

    Email: Test124@test.com

    When the flow runs, Joe Blogg sends out two emails to both Joe Bloggs and Jane Doe as the recipients and Jane Doe receives two emails from Joe Bloggs with Jane Doe and Joe Bloggs as the recipients.

    Hope that makes sense.  Thank you!

  • Sundeep_Malik Profile Picture
    6,484 on at

    Can you share the full flow in edit mode? Hide you personal data. And show one flow run too.

  • CU-19081228-9 Profile Picture
    on at

    @Sundeep_Malik 

    Here is my flow build:

    SP List, with email address field I want highlighted:

    ianwuk_1-1676363754605.png

    Email address in SP List:

    mylistemailaddress@test.com;
    mylistemailaddress2@test.com



    1- Get items from SP List and create array variable to store them.

    ianwuk_0-1676362216318.png


    2 - Go through each value in SP list and store Email Address value into the array variable

    ianwuk_1-1676362254914.png

     

    Sample output:

    Name: var_Email_Array
    Value: mylistemailaddress@test.com


    3 - Run a Compose of a union statement and then join the email addresses together

    ianwuk_2-1676362303215.png


    Sample Output from the Compose:

    [
      "mylistemailaddress@test.com",
      "mylistemailaddress2@test.com"
    ]


    Which is then joined from the Join operation as:

    mylistemailaddress@test.com; mylistemailaddress2@test.com

    4 - Send email using the Output of the Join Operation:

    ianwuk_3-1676362340777.png

     

    To: mylistemailaddress@test.com; mylistemailaddress2@test.com

    Does it matter that the Power Automate login account I am using to run the flow is registered also to mylistemailaddress@test.com?

    Thanks so much.  I'm so close to solving this.

  • Verified answer
    Sundeep_Malik Profile Picture
    6,484 on at

    @ianwuk 

     

    I am really confused now whats happening. 

    In  most of these cases where mails are sent many times, the send email is in an apply to each loop, but in your case its not. 

     

    Do one more thing. 

    Instead of taking append to array, use append to string and separate it with semi colon. 

    Like: in append to string:

    YourEmailDynamicExpression;

    Then no need to use union(I hope you dont have duplicate emails in your list)

    Then dont use join as you already have them separated by semi colon. 

    And then use this string variable in send email.

     

     

    Extra: 

    One more possible reason it could be sending 2 emails could be, the flow is running twice. Not sure how its happening, but in some cases I have seen flows running twice, when pressed run flow. So, once check if flow is running twice or not.

  • CU-19081228-9 Profile Picture
    on at

    @Sundeep_Malik I am really confused too, in my (very) limited knowledge of Power Automate, this should work.

    I've now updated my flow to look like this:

    1 - Get SP list items
    2 - Create string variable
    3 - Append to string variable

    ianwuk_2-1676364344508.png

    Is that correct?

    In my final step now, for the Outlook To what do I put?   I have nothing to select from the string array variable.

    ianwuk_3-1676364464149.png

     

    Thanks again!

  • Sundeep_Malik Profile Picture
    6,484 on at

    @ianwuk 

     

    1) You cannot add the initialize string variable inside an apply to each. It will give you an error. Initialize it outside apply to each.

    2) Put a semi colon in append to array.

    3) Probably it will not show in send email. You will have to write it manually in that:

    variables('YourStringVariableName')

     

    Something like below:

    Sundeep_Malik_0-1676364931783.png

     

    Sundeep_Malik_1-1676364941404.png

    Click on add dynamic content and add the string variable there or write the expression I have written above.

    Sundeep_Malik_2-1676364984211.png

     

    Hopefully this will work 🙂

  • CU-19081228-9 Profile Picture
    on at

    @Sundeep_Malik 

    1 - I updated my flow to initialise the variable properly and append the ;.

    ianwuk_0-1676365178452.png

    2 - I added the variables dynamic expression in the To field for Outlook the references my string variable.

    ianwuk_1-1676365363229.png

     

    The flow runs fine - but still two emails sent - I'm stuck now.

    ianwuk_3-1676365497154.png

     

     



    Not sure if there is anything else we can try?  But thanks so much for all your help!

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 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard