Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Simple flow to send email does not work

(0) ShareShare
ReportReport
Posted on by 118

Hello,

I am trying to build a flow that when an email is received in an inbox folder called "From Website" with the subject "This is from the website", then the email body is parsed and a table in dataverse is filled in with the parsed information.

But I can't get it to work. During testing, I will send a test email, it will go in the "From Website" folder with the subject line "This if from the website", but the flow will not run at all.

 

So I thought maybe something was wrong with my literal first step(the trigger) and created a basic flow that "If an email is received in this folder with this subject line, send a copy of that email to some other email". Simple. Literally 2 step flow. However upon testing again, this does not work as well!

I'm at my wits end. Someone have an idea what's going on here? I can't even get into the nitty gritty of my flow and parsing data properly.

 

Edit: Okay, the basic 2 step email flow works now. But if I try and get it to trigger off of folder in my inbox, it doesn't work:

DVOP_0-1691699067541.png

 

  • wskinnermctc Profile Picture
    6,517 Super User 2025 Season 1 on at
    Re: Simple flow to send email does not work

    I use Initialize Variable because it is easier to identify in other steps. It will be variables('variable name').

     

    When you use Compose it will be something like outputs('Compose_2'). 

     

    But when you are just looking in the flow it will just show Outputs. So it can be confusing if you have a lot of different compose to quickly tell which one is which.

     

    Compose Outputs compared to Variable NamesCompose Outputs compared to Variable Names

     

    Which one is easier to tell what you are using in that last Compose step? The one with the variable names.

  • DevOs Profile Picture
    118 on at
    Re: Simple flow to send email does not work

    Can you please explain why you're using initialize variable instead of compose? Is it because it will store it as data and then it can be referenced in the "add a new row" step? Does compose not do that?

     

    Edit: All good! I figured it out and after some wrangling and banging my head into a wall with other problems on the website, I got it all sorted out. Everything works and works as desired! Thank you so much for your support wskinnermctc ! You're awesome!

  • Verified answer
    wskinnermctc Profile Picture
    6,517 Super User 2025 Season 1 on at
    Re: Simple flow to send email does not work

    I'm not sure you are putting the expression in correctly. You have to add it over in the dynamic content box and add it in the field. You can't just type the expression into the field.

     

    Here is a quick example email I made:

     

    Example Email BodyExample Email Body

     

    My email message body looks like this:

    Here is a bunch of website data from somewhere in outer space.
    
    First Name: Steve
    Last Name: Harvey
    City: New York
    Province: Canada
    Message: Hey welcome to family feud!

     

    Here is the expression to get the First Name:

    trim(first(split(last(split(outputs('Html_to_text')?['body'],'First Name:')),'Last Name:')))

    Here is the expression to get the Last Name:

    trim(first(split(last(split(outputs('Html_to_text')?['body'],'Last Name:')),'City:')))

     

    Here is a screenshot of the flow:

    Flow Example - First Name and Last NameFlow Example - First Name and Last Name

     

    This is the expression to get the City:

    trim(first(split(last(split(outputs('Html_to_text')?['body'],'City:')),'Province:')))

    This is the expression to get the Province:

    trim(first(split(last(split(outputs('Html_to_text')?['body'],'Province:')),'Message:')))

     This is the expression to get the last row Message:

    trim(last(split(outputs('Html_to_text')?['body'],'Message:')))

     

    Here is a screenshot of the flow and where the expression is added or updated:

    Flow Example 2 - ExpressionFlow Example 2 - Expression

     

    Can you use this as an example and get the values you need?

  • DevOs Profile Picture
    118 on at
    Re: Simple flow to send email does not work

    I figured it out. Turns out you were indeed correct and I had some conflicting rules in Outlook. Lots of them were based off of sender rather than subject. So there were other rules running based off of the website automailer. 

     

    Now I'm actually into the meat and potatoes of the flow and having issues with parsing the email body for the following elements in the email:
    //
    First Name:
    Last Name:
    City:
    Province:
    Phone Number:
    Email Address:
    Message:
    //

    DVOP_0-1691777308985.png

     

    I've created 7 compose steps and am using expressions such as this for "First Name:" 
    //first(split(outputs_shared_conversionservice_HtmlToText?['body'],'First Name: '))//

    But clearly I'm doing something wrong as it's literally just giving me the expression itself. I also tried:

    //replace(first(split(last(split(body(‘Html_to_text’),‘Phone Number:’)),‘Email Address’)),‘\D’,‘’)//

    But PowerAutomate said that was an invalid expression flat out.

  • Verified answer
    wskinnermctc Profile Picture
    6,517 Super User 2025 Season 1 on at
    Re: Simple flow to send email does not work

    Well at least that is narrowed down.

     

    I saw something that said there was a difference between where the rules were made (which I don't understand). The difference between desktop Outlook and online I guess? 

     

    Maybe see if that has anything to do with it??

     

    Or if the option "On this computer only" is checked?

  • DevOs Profile Picture
    118 on at
    Re: Simple flow to send email does not work

    So I tested this and set it to a different subfolder and it worked to trigger the flow. My assumption being that something is wrong with the rule I have for "New Lead From Website", but it's the exact same rule as the other sub folder in my inbox.

  • wskinnermctc Profile Picture
    6,517 Super User 2025 Season 1 on at
    Re: Simple flow to send email does not work

    From what I have read it is a little confusing since it is hard to tell what is happening when you set up a rule, or where you set up the rule.

    But it seems like your rule in the system acts more like a copy a file of the email into the "New Lead From Website" folder from the Inbox. So the trigger doesn't run because it's not a new email, it's a new file. 

     

    That doesn't seem right because why would PA give you the folder options? 

     

    But either way, you should test it off of your Inbox and see if that works. If it does then we know the problem has more to do with the rule or how the email is getting into the other folder.

    If it doesn't trigger in the main Inbox, then it would be more about the settings or properties the Trigger uses to identify what email to trigger on like "Subject Filter" or "Includes Attachments Y/N" fields.

  • DevOs Profile Picture
    118 on at
    Re: Simple flow to send email does not work

    The setup I have is:

    Inbox
    >Sub folder called "New Lead From Website"

     

    I *do* have a rule that new emails that come in with the subject like "New Lead From Website" are moved into the subfolder "New Leads From Website" and the flow is supposed to run off of new emails arriving in the subfolder "New Lead From Website" with the subject line "New Lead From Website".

     

    But by your statement, flows cannot run off of emails in subfolders? Only main inboxes? 

  • wskinnermctc Profile Picture
    6,517 Super User 2025 Season 1 on at
    Re: Simple flow to send email does not work

    How is the original email being put into the "From Website" folder? 

     

    If the email is moved into the "From Website" folder then it would not trigger the flow. You should test this using your Inbox folder.

  • DevOs Profile Picture
    118 on at
    Re: Simple flow to send email does not work

    No. I'm using private emails and just edited them for the purpose of posting on here. The logic is the same.

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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 566 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 516 Super User 2025 Season 1

#3
stampcoin Profile Picture

stampcoin 492