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

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

Update a Sharepoint list entry after looking up in another Sharepoint list

(0) ShareShare
ReportReport
Posted on by 53

I have 2 sharepoint lists. List #1 is called "Forms", which the entries comes from a MS Forms. In this list I have a column, "Topic" and "SPOC" (Single Point Of Contact). See the screenshot below:

 

Forms.PNG

 

When new entry comes into the "Forms" list, my automation flow should look up into the second lists entries and if there is a corresponding entry in "Topic" found, then update the corresponding column "SPOC" in the first list. Here the screenshot of the second list, which is kind of statical: 

 

SPOC.PNG

The common element in these 2 lists is the column "Topic". Now the use case:

 

Here is what I have already in my second list called "SPOC":

TopicSPOC
Topic 1spoc-topic1@mail.com
Topic 2spoc-topic2@mail.com
Topic 3spoc-topic3@mail.com

 

Then I get a new item into my "Forms" list:

TitleTopicMessageSenderSPOC
test titleTopic 1this is a test message.sender@mail.com 

 

The automation flow will look up the topic, and when for example, Topic 1 is found in the "SPOC" list, it should update the column "SPOC" of the new entry with the corresponding email from the "SPOC" list, namely spoc-topic1@mail.com and an simple email will be sent to this email address.

 

And if the topic is not found in the "SPOC" list, the new entry will get the email address generic@email.com as SPOC and an email will be sent also to this corresponding email address.

 

I hope, my explanation is clear enough. So people, how can I achieve this?

I have the same question (0)
  • v-xiaochen-msft Profile Picture
    on at
    Re: Update a Sharepoint list entry after looking up in another Sharepoint list

    Hi @Lukas3 ,

     

    I made a sample for you.

    vxiaochenmsft_0-1715218337958.png

    vxiaochenmsft_1-1715218520809.png

    vxiaochenmsft_2-1715218726950.png

    vxiaochenmsft_3-1715218785851.png

     

    Best Regards,

    Wearsky

  • Lukas3 Profile Picture
    53 on at
    Re: Update a Sharepoint list entry after looking up in another Sharepoint list

    Thank you for your reply @v-xiaochen-msft . I have a problem with the condition branch "No". Everytime when I try to set the field "SPOC" it adds automatically a new "Apply to each" block into my code. So from where is the entry that is circled in the screenshot below?

     

    error.PNG

    I can't figure it out:

    error2.PNG

  • v-xiaochen-msft Profile Picture
    on at
    Re: Update a Sharepoint list entry after looking up in another Sharepoint list

    Hi @Lukas3 ,

     

    What's the column type of SPOC in 2 lists?

    Are they all person columns?

     

    Best Regards,

    Wearsky

  • Lukas3 Profile Picture
    53 on at
    Re: Update a Sharepoint list entry after looking up in another Sharepoint list

    @v-xiaochen-msft yes, SPOC is type of Person in both lists. 

  • v-xiaochen-msft Profile Picture
    on at
    Re: Update a Sharepoint list entry after looking up in another Sharepoint list

    Hi @Lukas3 ,

     

    Try this

    vxiaochenmsft_0-1715319998051.png

    item()?['SPOC/Claims']
    outputs('Update_item')?['body/SPOC/Email']
     
    Best Regards,
    Wearsky
  • Lukas3 Profile Picture
    53 on at
    Re: Update a Sharepoint list entry after looking up in another Sharepoint list

    @v-xiaochen-msftYour proposal didn't worked. But I've changed in Apply to each-block from Body to Value and it works now, but every time, when the flow goes into "No"-condition, so the Topic is found in "SPOC" list, the SPOC get the same email always 3 times. If I check the run history, the flow is run just one time, and even in the "forms" list only one new item, the recipient get 3 same emails. Here is the screenshot of my code:

     

    3 same emails.PNG

    Do I need some filter in "Get items"?

  • Lukas3 Profile Picture
    53 on at
    Re: Update a Sharepoint list entry after looking up in another Sharepoint list

    As it seems, my flow sends exactly as many emails as I have in my "SPOC" list as entry. That means, If I have a 4 different topics with 4 different corresponding person and their email addresses, and when new item is added in "Forms" list, where the topic is found in "SPOC" list, the flow send the same email to the corresponding email address 4 times. How can I now make sure, that just the affected person get a single email?

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 788 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 452 Moderator

#3
developerAJ Profile Picture

developerAJ 302

Last 30 days Overall leaderboard