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!