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 Platform Community / Forums / Power Automate / Using a form to trigge...
Power Automate
Unanswered

Using a form to trigger an email to a specific person based on the selected response

(0) ShareShare
ReportReport
Posted on by 5

This is my first attempt using MS Forms and I've got my form mostly all set up AND I learned how to use Power Automate for the first time, using it to generate an email that would be sent to the responder as well as a general inbox within my organization.  The Flow I created kept failing and I continued to trouble shoot until I found the issue, which was a question that contained email links, where I was hoping the response would allow dynamic content to be included.

 

The form I am using is an application students would fill out and submit for career programs.  This is a regional effort involving 20 schools, so what I wanted is for student to fill out a form and once submitted 1. my office would receive a confirmation, 2. the student submitting receives a confirmation, and 3. the counselor from their school would receive a confirmation.  I got everything to work except for #3.

 

When my workflow failed I realized it was due to the dynamic content in the section where they select their school.  I did some trouble shooting and it looks like the form wants just an email address entered, but I needed more text than that.  What I had typed in that caused the failure would look something like "West High School - John Smith <jmith@wesths.edu>"  

 

Is there any way to have the text stay in there stating the school and the counselors name and still allowing the flow to send "John Smith" the confirmation email to let him know his student has applied for one of our programs?  

 

I have already considered a work-around which would be to  with the desired text and simply enter in the email "jmith@wesths.edu" in the form (which would appear like the screenshot below), but I figured there had to be another way I was missing.  Any thoughts or solutions?

 

Screenshot 2023-08-13 001427.png

Categories:
I have the same question (0)
  • ManishSolanki Profile Picture
    15,091 Super User 2025 Season 2 on at
    Re: Using a form to trigger an email to a specific person based on the selected response

    Hi @kappnel 

     

    You can make use of an expression with split & replace functions to extract the email address from the input text. The extracted email address can then be used in "Send an email" action for notification purpose.

     

    Here is an example:

    In this example, I have used a variable 'varInputText' that holds the input value and using expression I am extracting the email address from the input string. The expression needs to be entered in the expression box as highlighted in the below screenshot:

     

    ManishSolanki_0-1691903241898.png

    Expression used here:

    replace(replace(trim(last(split(trim(last(split(variables('varInputText'),'-'))),' '))),'<',''),'>','')

    Pls replace the 'variables('varInputText')' with the actual form field submitted by a student. This expression will work only if we have fixed pattern in the input field with hyphen (-), spaces etc.

     

    Output obtained from the expression:

    ManishSolanki_1-1691903893319.png

     

     

    If this helps & solves your problem, please remember to give a 👍 and accept my solution as it will help others in the future.

     

    Thanks

  • kappnel Profile Picture
    5 on at
    Re: Using a form to trigger an email to a specific person based on the selected response

    Thank you for your reply!  Running this past our educators whose students will ultimately be the ones filling out the form, they have a concern that the presence of the email address at all will cause confusion, because if you click on it, it's an active hyperlink that will attempt to send an email if selected.  I am looking for a solution and wondering if anyone knows whether 1. There is a way to disable the hyperlink on the form or 2. There is a way to  utilize text on the form but then replace it with the email address using PowerAutomate (e.g. using the example I originally posted, the form displays "West High School - Mr. John Smith" but then that response automatically changes it to "jsmith@wesths.edu" to allow for the email to send.  Any thoughts on if this could be done?  

  • ManishSolanki Profile Picture
    15,091 Super User 2025 Season 2 on at
    Re: Using a form to trigger an email to a specific person based on the selected response

    Hi @kappnel 

     

    You can create an excel sheet or custom SharePoint list that will store the information of all counselors. Some of the columns/fields that I can think of are: School Name, Counselor name, Counselor email etc. 

    When a user submits the form, you can look up the master counselor excel sheet or SharePoint list and apply filter to get the required email address of the counselor. 

    This way you can avoid putting the email address in the choice value in the MS form.

     

    If this helps & solves your problem, please remember to give a 👍 and accept my solution as it will help others in the future.

     

    Thanks

  • kappnel Profile Picture
    5 on at
    Re: Using a form to trigger an email to a specific person based on the selected response

    Thank you for the reply, The reason I had to put the email in there was because I needed the form to utilize that to send an email immediately to the school/counselor selected.  Is there a way to do this?  I apologize, I'm not quite following how that works...I admit I'm very new to Power Automate.  

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