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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / send an email if Forms...
Power Automate
Answered

send an email if Forms Response contains an answer that is contained in an excel table

(0) ShareShare
ReportReport
Posted on by 2

Hello! I need some advice on how to accurately build a flow. What I'm trying to build is:

  • Someone submits a forms survey response
  • If the text response to a question "type the email address of the person you would like to send an email to" matches an email domain listed in an excel table, then a specific email will be sent under the YES condition
  • If there is no match, then another email will be sent to the person submitting the response under the NO condition. This is what I've tried so far and even though my test response contain an email address that is listed in the excel table, I keep getting a False response and the incorrect email is being sent. Anyone have any suggestions?
 
 

So far I have tried:

1- When a forms response is submitted

2- get response details

3- list rows present in a table

4- Condition: if response to (specific question) contains (values from excel able) if YES, then send email

 

 

 

 

 

Categories:
  • Verified answer
    v-litu-msft Profile Picture
    Microsoft Employee on at

    Hi @bartos123,

     

    Firstly, you could initialize an array variable named EmailDomain to hold these Email domain store in the Excel file:

    Annotation 2020-06-25 133145.jpg

     Secondly, use split() function extract domain form the Email address submit in MS form, I use "Test@gmail.com" to test, we should use split() function two times, first time could move "Test", second time could move ".com", finally it will remain "gmail":

    Annotation 2020-06-25 133548.jpg

     

    In the end, use the Condition action with contains, to determine the EmailDomain whether it contains "gmail". 

     

    Best Regards,
    Community Support Team _ Lin Tu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • bartos123 Profile Picture
    2 on at

    Hello @v-litu-msft . Thank you for the response!  I tried what you suggested and unfortunately I must be doing something incorrect. I submitted a test run based off a forms response the test question: Enter the approved email address. I entered an email that has a domain that is listed in the excel table. The test run was successful, but it ran down the condition of NO, which would indicate that the text email address from the form response was not matched with a domain listed in the excel file. Below is a screenshot of my flow. Do you see anything that indicates what may be causing the false outcome?

     

    append to array variable screen capture.png

     

  • v-litu-msft Profile Picture
    Microsoft Employee on at

    Hi @bartos123,

     

    Your Flow steps seems correct, but the expression not correct, here is the correct expression:

    split(split(outputs('Compose'),'@')[1],'.')[0]

     

    Best Regards,
    Community Support Team _ Lin Tu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 424

#2
11manish Profile Picture

11manish 328 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 274

Last 30 days Overall leaderboard