Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Answered

Insert 'From' Input in mail object not working

(0) ShareShare
ReportReport
Posted on by

Hello everyone !

 

A customer is asking me for a simple flow but I found an issue I can't manage.

The use case is simple : this customer needs a flow where a mail is dropped in a mail account. Depending of the domain name of this mail, it is redirected with some informations in its body to a special mail box where this mail will be processed by another service. This part is easy.

However, he's asking me to put in the Object field of the mail the 'From' expression that I get with the Outlook trigger of the flow. And this part doesn't work. The error message is this one (sorry for the translation) : The "inputs.parameters" element of the workflow operation "Envoyer_un_e-mail_(V2)" of type "OpenApiConnection" is not valid. Error details: The input parameter "emailMessage/To" must be of type "String/email". The runtime value "From" to be converted does not have the expected "string/email" format.

 

I thought I could use the Initialize variable function to put it as a string variable, but the issue still remains.

 

Would you know how to fix this issue ?

 

Thanks for your help !

 

  • Verified answer
    Community Power Platform Member Profile Picture
    on at
    Re: Insert 'From' Input in mail object not working

    Hello,

     

    I am an idiot. 😃 I have misread the error message. The problem came from the way I modified the email. The correct way is to initialize the variable simply, then the replace function needs to be used in the To field of the mail, not directly in the variable initialization.

    Licanor_0-1644939386252.png

     

    Thank you for your help ! 🙂

  • Community Power Platform Member Profile Picture
    on at
    Re: Insert 'From' Input in mail object not working

    Yes, sorry !

     

    InkedCapture_LI.jpg

     

    The last value is my firstName.lastName@gmail.com.

     

    Thanks !

  • ScottShearer Profile Picture
    25,208 Most Valuable Professional on at
    Re: Insert 'From' Input in mail object not working

    @Anonymous 

    Can you screenshot the mailToModify variable after a run - see my example below

    image.png

  • Community Power Platform Member Profile Picture
    on at
    Re: Insert 'From' Input in mail object not working

    I have this in the log :

     

    {
        "host": {
            "connectionReferenceName""shared_office365",
            "operationId""SendEmailV2"
        },
        "parameters": {
            "emailMessage/To""De",
            "emailMessage/Subject""firstName.lastName@gmail.com / [EXTERNAL] Test 4",
            "emailMessage/Body""<p><html><head>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"></head><body><div dir=\"auto\">Test 4</div></body></html></p>"
        }
    }
     
    It's strange because it's seems to work when you look at the mail in the Subject part. The mail seems to be well-added.
  • ScottShearer Profile Picture
    25,208 Most Valuable Professional on at
    Re: Insert 'From' Input in mail object not working

    @Anonymous 

    If I understand correctly, Flow is complaining about the "To" filed in the email.

    Can you post a screen shot of the output of the MailToModify variable after a run?

     

  • Community Power Platform Member Profile Picture
    on at
    Re: Insert 'From' Input in mail object not working

    Hello ScottShearer,

     

    Thank you for your answer. Yes, of course. Please note that the flow I am showing you contains some tests I've done with variables.

     

    flow1.PNG

     

    flow2.PNGAs you can see, I tried to make a kind of parsing action. I think that the email is detected, even in string, when it's put in Object. The problem is that my client want to have this information in Object.

     

    Thank you very much ! 

  • ScottShearer Profile Picture
    25,208 Most Valuable Professional on at
    Re: Insert 'From' Input in mail object not working

    @Anonymous 

    Can you post a screen shot of your Flow?  That will make it much easier to assist.

     

     

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,645 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,997 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow