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 / Send email V2 string e...
Power Automate
Unanswered

Send email V2 string error

(0) ShareShare
ReportReport
Posted on by 132

Hi,

 

Having problems with a flow and don't know why:

 

The 'inputs.parameters' of workflow operation 'New_Lead_Email_-_Day_1_(RH)' of type 'OpenApiConnection' is not valid. Error details: Input parameter 'emailMessage/To' is required to be of type 'String/email'. The runtime value '" madeupusername@gmail.com\n"' to be converted doesn't have the expected format 'string/email'.

 

zerou_0-1669838241016.png

 

 

Categories:
I have the same question (0)
  • Ed Gonzales Profile Picture
    4,531 Most Valuable Professional on at

    @zerou 

    It looks like it's picking up some extra characters from the datasource.  There is a "\n" at the end of your email address which is probably making it freak out a little.  Check out this article and see if that helps:

    How to replace new line (‘\n’) in a Power Automate expression

     

    Keep us posted.

    -Ed

     

    If you liked this reply, please give it a thumbs up! If this reply has answered your question or resolved your challenge, please consider marking it as a Solution. This helps other users find it more easily via search.

  • XeXE Profile Picture
    132 on at

    Hello Ed,

    I'm still very new to all this, so I'm not exactly sure what to do after reading that article. Am I supposed to change the compose 2 step?

  • Verified answer
    Ed Gonzales Profile Picture
    4,531 Most Valuable Professional on at

    @zerou 

    No worries at all, I can go into more detail:

     

    • Just after your trigger, add a step to "Initialize a variable", call it varNewLine, the type would be string, and then put your cursor in the Value box and just hit enter.  (this stores a 'carriage return' in the variable).
    • Then in your first compose, get rid of the dynamic value that's there (we'll put it back, don't worry) and then click in the field to get the little window to pop up that lets you add values.
    • Switch over to the Expression side and type "Replace(" (without the quotes) and then click on Dynamic Value in the same little window, and select the same email field you had in there before.  Then go back to your expression and type ", " and then get the output from your variable in the same manner.
    • Then go back to your expression and finish it off with ", '; ' )"     (again without the double quotes, but you'll need the single quotes in there).

    This expression basically says "Look at the email address, and anywhere you find a carriage return, replace it with a semi-colon and a space.

     

    Then you can use the output of that compose in the "to" field of your email.

     

    Keep us posted.

    -Ed

     

    If you liked this reply, please give it a thumbs up! If this reply has answered your question or resolved your challenge, please consider marking it as a Solution. This helps other users find it more easily via search.

  • XeXE Profile Picture
    132 on at

    Hello again,

    I replaced the current function for the expression with //replace(outputs('Compose'),decodeUriComponent('%0A'),';')//

    This seemed to fix the issue and I was able to resubmit all the new flows without the email/string error.

    Thank you very much edgonzales! You're a life saver!

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

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard