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 to use two SharePo...
Power Automate
Unanswered

How to use two SharePoint lists in PowerAutomate

(0) ShareShare
ReportReport
Posted on by 101

Thank you very much for watching.


The scenario is like this: I have a List A with a column of people's names, and I need to send an email to different person in each row, and each person's email is stored in List B. How do I implement this?

 

Since I am just using powerautomate, please understand if there is something I don't understand, thank you for your help!

Categories:
I have the same question (0)
  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hi @XiaohuLiu 

     

    Is there a relationship between the lists right now? 

     

    If not, you can create a new column in the list A of type lookup and select the lookup list as list B. 

     

    In your flow, you can do get items to get the items from list A and then in an apply to each loop, you can add the Get Item action for the list B and for ID pass the value from the lookup field of List A. You can add an email action then and have data from both the lists included in the email. 

     

    Hope this Helps!

     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

  • Nived_Nambiar Profile Picture
    18,136 Super User 2025 Season 2 on at

    Hi @XiaohuLiu 

     

    You have to try this approach

     

    1. Use Get items to get all items from List A

     

    2. Use apply to each loop through all items from output of Get Items action.

    Nived_Nambiar_0-1681127312829.png

     

    3. Use get items for List B with filter query like below 

    name eq (dynamic content of name from List A)

    Like below

    Nived_Nambiar_1-1681127385804.png

     

    Instead of name , here it is customer

     

    Next we will validate whether the values are present or not, if yes then send an email like below 

     

    Nived_Nambiar_2-1681127435528.png

     

    Here values will be from output of Get Items for List B 🙂

     

    Hope it helps 🙂

     

     

  • XiaohuLiu Profile Picture
    101 on at

    XiaohuLiu_0-1681180332063.png

    @Nived_Nambiar Thank you very much for your reply, but I have some problems with the running process.
    I understand according to your idea like this, first get all items in LIST A, then use aplly to each, get items in LIST B, the filter condition is equal columns in both LIST. Then send an email with the obtained Email.

    I do not quite understand that


    1. why add a conditional judgment, using length (...)
    2. how to use the column name in Get Items 2? I input it directly and it will show that the column does not exist, and there is only the column name in Get Items 1 in Dynamic content.

     

    Thank you very much for your help.

  • Nived_Nambiar Profile Picture
    18,136 Super User 2025 Season 2 on at

    Hi @XiaohuLiu 

     

    Please find answers to your questions below

     

    1.  why add a conditional judgment, using length (...)

     

    It is an extra step to validate whether the value we are trying to serach in List1 with value from List1 exists or not. This is done by using length function applied on values dynamic content of Get items 2 action.

     

    2. how to use the column name in Get Items 2? I input it directly and it will show that the column does not exist, and there is only the column name in Get Items 1 in Dynamic content.

     

    In dynamic content you will find the Column Name (which itself is the value) under Get Items action 

     

     

    Let me know if you have additional questions 🙂

  • XiaohuLiu Profile Picture
    101 on at

    @Nived_Nambiar thank you for your reply, here are my data form.

    XiaohuLiu_1-1681189118975.png

     

    XiaohuLiu_0-1681189086077.png

     

    I have built Power Automate according to your method, and I got the following error, can you please help me to see? Thank you very much!

    The $filter expression "[name] A" is invalid. Creating query failed.
    clientRequestId: 85bdd7da-ce57-46e1-bb34-a6326494545a
    serviceRequestId: 85bdd7da-ce57-46e1-bb34-a6326494545a

     

  • Nived_Nambiar Profile Picture
    18,136 Super User 2025 Season 2 on at

    The screenshot is not clear, could you share screenshot again after zooming it a little on filter query ?

     

  • XiaohuLiu Profile Picture
    101 on at

    @Nived_Nambiar  

    Thank you very much for your reply. I have reported it again according to your answer, but I have encountered some errors. Please help me take a look. Thank you very much.

    XiaohuLiu_0-1681311973035.png

    XiaohuLiu_2-1681312029255.png

     

    $filter 表达式“[人员] eq '王华'”无效。 Creating query failed.
    clientRequestId: 140a414b-d225-4117-bb95-4979823976dc
    serviceRequestId: 140a414b-d225-4117-bb95-4979823976dc

     

  • Nived_Nambiar Profile Picture
    18,136 Super User 2025 Season 2 on at

    Hi @XiaohuLiu 

     

    One question , why are you enclosing highlighted one under square brackets [] ?

     

    Nived_Nambiar_0-1681319589586.png

     

  • S-Venkadesh Profile Picture
    1,214 Moderator on at

    Hi @XiaohuLiu,

    I understand that you may be experiencing some difficulty when trying to add a filter in the 'Get Items' action. Fortunately, with the help of experimental features in Power Automate Studio, you can simplify the process of adding filter conditions.

    SVenkadesh_0-1681324022858.png

     

    Once you have added the filter, you can toggle off the experimental feature to return to the standard version of the Studio.

    If my suggestion has been helpful, please consider giving it a Thumbs Up!


    Best Regards,

    Venkadesh Sundaramurthy

     

     

  • XiaohuLiu Profile Picture
    101 on at

    @Nived_Nambiar  Hi,

    If I don't add "[]", the system will prompt me: Column "name" does not exist

    XiaohuLiu_0-1681352101503.png

     

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…

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
trice602 Profile Picture

trice602 398 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 323 Super User 2025 Season 2

#3
Expiscornovus Profile Picture

Expiscornovus 183 Most Valuable Professional

Last 30 days Overall leaderboard