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 / filter email addresses...
Power Automate
Unanswered

filter email addresses in SharePoint list power automate based College name and department

(0) ShareShare
ReportReport
Posted on by

I have three list in SharePoint


1-Colleges list include this columns(cod-college , name-college)
2-departments list include this columns(code-department, name department)
3-students list include this columns (Id-students , name ,e-mail)and lookup columns from Colleges list(cod-college , name-college) and lookup columns from departments list(code-department, name department).
4-Survay list ( id, name-survey, link-survey).

 

in PowerApps I insert 3 dropdowns
1- to select survey
2- to select college
3-to select department
4-button to send email based on what I choses form above.

 

I need to create flow to send email for specific students for example:


when I selected survay1 and College of Computer Science and IT departments send email for those specific students.

 

Categories:
I have the same question (0)
  • Verified answer
    HenWang Profile Picture
    Microsoft Employee on at

    Hi @Fatimah_Salman ,

     

    Below is my demo flow:

    HenWang_0-1684811458661.png

     

    There are several points need to be carefully treated. And we have the same DataSources and columns actually.

     

    Flow details:

     

    1. Firstly, you will need to add three custom dynamic content in this flow by clicking Ask in PowerApps three times:

    HenWang_1-1684811732826.png

     

    How to click:

    add three 'Compose' action and rename them like below firstly:

    HenWang_2-1684811784957.png

     

    Then you can go to each input of them and click the Ask in PowerApps one by one and here is the result you will get, please make sure you have exactly the same result as mine or you need to create a new flow from scratch:

     

    HenWang_3-1684811907334.png

     

    My Student list columns:

    HenWang_5-1684812011477.png

     

     

    Then add "Get items" action and add filter query inside:

    HenWang_6-1684812124473.png

     

    You will see that for lookup column, you need to add '/' character after the lookup column name in Student list and then you need to add the column which hold the real text value of this specific lookup column name from its original list. In my college list, the Title column hold the college name and this is why my condition here is:

     

    college_lookup/Title

     

    and after the eq(equal) character, you need to add the related dynamic content and also, add the ' character around it. Below is the string value of my formula:

    college_lookup/Title eq '@{outputs('College')}' and department_lookup/Title eq '@{outputs('Department')}'

     

    You can just copy and paste but make sure you have changed the lookup column names with the real lookup name value from your side.

     

    Here is one link that you can refer to if you are still confused: Power Automate - How To Filter SharePoint Lookup Column - YouTube

     

    Then you will receive all the students records from this IT department and you can just add "Send an email" action:

    HenWang_7-1684812455436.png

     

    As to the survey part, it's the same logic ,you will need an additional get items action to return the survey selected from power apps.

     

    Canvas app part:

    In the button onselect property, type below code:

    'flow_name'.Run(Dropdown1.Selected.Value,Dropdown1_1.Selected.Value,Dropdown1_2.Selected.Value)

     

    Remember to keep the order of the composes in your flow here. The dropdown1 should hold the college info and the second dropdown should hold the department value, and so on.

    HenWang_8-1684812562309.png

     

    That's all, please mark my answer if you think it answers your questions.

     

    BR,

    Hen Wang

     

  • HenWang Profile Picture
    Microsoft Employee on at

    deleted

  • dlwalla Profile Picture
    4 on at

    I'm having trouble finding the 'Ask Power Apps', let alone finding the Default Content to add to the 'Compose' actions. Can you elaborate more for this first section? I first created the test lists then created the dropdowns in Power Apps, and, last, created the Power Automate from the Power Apps.Thank you in advance.

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

#2
Tomac Profile Picture

Tomac 456 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard