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 / Simple Error Handling,...
Power Automate
Suggested Answer

Simple Error Handling, Automated Email Upon Form Submission

(2) ShareShare
ReportReport
Posted on by 13
Updated (Thank you FLMike!)
 
Hey Everyone!
 
I have a callout form where the submitter selects a manager’s email and enters their own work email. My Power Automate flow sends an email to the manager and CCs the submitter. However, the flow fails when there’s a space in the submitter’s email field and doesn’t notify me of the failure. Odd thing is, it still sends when an incorrect or non-existent email is entered. I’ve tried using try, catch, finally, but it doesn’t notify me of submissions with a space in the email.
 
The Status Code of failed run: 400, ErrorInvalidRecipients
 
When reading into it, it says "At least one recipient is not valid., Recipient Lxx.x.Jxxxxxx @xx.org is not resolved. All recipients must be resolved before message can be submitted."
 
I have recreated the issue and it the space within the email stops the run and does not send the email.
 
The goal of the Try, Catch, Finally is so that I can flag these errors and not miss any callout until I figure out a way to ensure the callout email sends regardless of the input.
 
My train of thought is that the Try will cause a "Failed" status:
 
 
 
....and the Catch will send me a notification since its dependent on the Try failing:
 
 
...and even if the Try fails then the Finally will still send the automated email to the manager without CC'ing the submitter's email:
 
 
I’m still learning, so I appreciate your understanding. Thank you!
Categories:
I have the same question (0)
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,412 Super User 2025 Season 2 on at
    Hi,
     
    Nothing you explained tells me that the form should "automatically" throw an error.
     
    I also cannot see your actions that are for capturing errors
     
    Why do you think its going to fail because there is a space?
     
    What action do you expect to throw an error? What question is the space in? (which is completely legal to do).
     
    Are you saying it should fail, when you try to USE the value or what?
     
    Anyway, have to be more clear on the details, as a form with a question with a space isn't going to just send notifications back, and your "logic" isn't clear to check for it.
     
     
  • VS-11101931-0 Profile Picture
    13 on at
    FLMike! Thanks for responding, I edited my post sorry about not being clear enough the first time. Was unsure how to reply back to you, so I hope this does the trick. Please review my responses in blue.

    Why do you think its going to fail because there is a space?
    I was able to recreate the issue with a space when entering the email.
     
    What action do you expect to throw an error? What question is the space in? (which is completely legal to do).
    I am expecting the "Send an email (V2) Final" to throw an error so its inside a Scope to hopefully still run without CC'ing the submitter's email. The space is in the entered value when the person submitting the form enters their work email with a space in it, which I was trying to make sure it got caught in the try and catch part.
     
    Are you saying it should fail, when you try to USE the value or what?
    If you are referring to the Try part, I attempted to add a condition where it checks the entered value from the compose action. from there the catch part can notify me of the email having a space and still notify the manager without CC'ing the person submitting the form.

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

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard