cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
ezequiel
Level: Powered On

One or more recipients are invalid

Hi

 

I'm getting information from a SQL query. To each record I need to send an email to a single person. When sending the email I'm getting the error:

 

Capture.JPG

When checking the inputs all looks good:

 

Capture.JPG

 

Flow looks like:

 

Capture.JPG

 

I'm getting a little crazy with it 🙂

 

Any suggestion on how to solve it?

 

Thanks,

 

Ezequiel

 

1 ACCEPTED SOLUTION

Accepted Solutions
Dual Super User
Dual Super User

Re: One or more recipients are invalid

In my test I put the email that needed to be stripped in a variable called Test.  You'll need to replace that input in the following formulas with whatever field you are trying to strip.  The easiest way is to use two compose actions. One that strips everything up to the first '<' and the second that takes the output of that and strips everything off starting at the '>'.

substring(variables('test'),Add(indexOf(variables('test'),'<'),1))

substring(outputs('Compose_2'),0,indexOf(outputs('Compose_2'),'>'))


-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

3 REPLIES 3
Dual Super User
Dual Super User

Re: One or more recipients are invalid

I think the problem is the format of the TO value you are retrieving.  Although you have it obscured it looks like its printing out in the form of name <address>.  This is a display format used by a lot of email applications, but its not the format Flow is expecting.  For Flow the TO line needs to be a semicolon delimited list of just email addresses. YOu need to strip away everything except what is between the < > characters.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
ezequiel
Level: Powered On

Re: One or more recipients are invalid

@Pstork1Thanks for the reply. That makes sense. I'm not very familiar on how to manage strings in Flow. Let's say that the info I'm getting from the SQL query is "Ezequiel Sapoznik <esapoz@xyz.com>", how do I strip away everything except esapoz@xyz.com?

 

Thanks again for your help

 

Ezequiel

Dual Super User
Dual Super User

Re: One or more recipients are invalid

In my test I put the email that needed to be stripped in a variable called Test.  You'll need to replace that input in the following formulas with whatever field you are trying to strip.  The easiest way is to use two compose actions. One that strips everything up to the first '<' and the second that takes the output of that and strips everything off starting at the '>'.

substring(variables('test'),Add(indexOf(variables('test'),'<'),1))

substring(outputs('Compose_2'),0,indexOf(outputs('Compose_2'),'>'))


-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

Helpful resources

Announcements
firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (5,847)