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 : K7hc7ITsjUwMVFcYZ3iQaf
Power Automate - Building Flows
Answered

Send email V2 string error

Like (0) ShareShare
ReportReport
Posted on 30 Nov 2022 19:55:10 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

 

 

I have the same question (0)
  • Ed Gonzales Profile Picture
    4,531 Most Valuable Professional on 30 Nov 2022 at 19:58:51
    Re: Send email V2 string error

    @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 30 Nov 2022 at 20:04:34
    Re: Send email V2 string error

    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 30 Nov 2022 at 20:28:04
    Re: Send email V2 string error

    @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 30 Nov 2022 at 21:22:55
    Re: Send email V2 string error

    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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 788 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 452 Moderator

#3
developerAJ Profile Picture

developerAJ 302

Last 30 days Overall leaderboard
Loading complete