web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Power automate newbie ...
Power Automate
Unanswered

Power automate newbie trying to do a Outlook/Teams flow

(0) ShareShare
ReportReport
Posted on by 2

Hello all,

 

This is the first time I am trying to do a Power Automate flow and I am struggling with it.

 

So the flow would go like this:

Trigger: "When a new email arrives (V3)"

  • Set up email filtering based on my requirements (Namely if the subject of the email starts with ECAB)

Condition 1: Check if the email subject starts with "ECAB"

  • Yes branch:
    • Compose: Extract the email body
    • Action: "Post a message as the Flow bot to a Teams channel"
      • Fill in the required fields using the dynamic content and expression
         
    • No branch:
      • Condition 2: Check if the email subject contains "FW: ECAB" or "RE: ECAB"
        • Yes branch:
          • Compose 1: Extract the Message ID
          • Compose 2: Clean Message ID (replace(outputs('Compose_1'), '\r\n', ''))
          • Action: "Reply with a message in a channel"
            • Fill in the required fields using the dynamic content and expressions and updates the message on teams (namely updates the conversation with the data from the RE: or FW: email)
        • No branch:
          • Action: "Send an email (V2)"
            • Send a formatted email to the user notifying them of the incorrect format


On Power Automate looks like this:

JusticeBear_0-1678893449617.png

 

But I am having issues with the Yes Branch of the Condition 2.

On that branch I have a compose called Extract Message ID with:
Inputs: split(triggerOutputs()?['body/text'], 'Message ID: ')[1]

And another compose called Clean message ID with:
replace(outputs('Extract_Message_ID'), '\r\n', '')

 

After that I have a Reply with a message in a channel that I have filled with the data I wanted plus on the "Message ID" I have chose the output of Clean message ID and the message being:

<p>Email Content: @{triggerOutputs()?['body/text']}<br><br>Please click on the link to the email in Outlook Web App to review<br></p>

 

Then I save and test... and get this error:

JusticeBear_1-1678893848631.png


Does anyone knows what I am doing wrong? and could you help me please?

 

Thank you in advance.

Categories:
I have the same question (0)
  • JusticeBear Profile Picture
    2 on at

    Trying to bump this one to see if it doesn't disappear...

  • v-jefferni Profile Picture
    Microsoft Employee on at

    Hi @JusticeBear ,

     

    To test this flow, you can replace the message body with several simple words firstly, check if was the message that caused this issue:

    <p>Email Content: test <br><br>Please click on the link to the email in Outlook Web App to review<br></p>

     

    Besides, please expand the action and paste with a screenshot so that we can see the detailed settings.

     

    Best regards,

  • dongenr Profile Picture
    18 on at

    JusticeBear,
    I am sorry, I have no resolution for your issue.
    Does the replace of the MessageID work correctly?
    I am trying to remove the "FW: " from the received mail, and maybe your Conditon2-Yes holds the solution for me.
    If yes, would you be willing to share the details, please.
    Rene

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 552

#2
Valantis Profile Picture

Valantis 388

#3
11manish Profile Picture

11manish 375

Last 30 days Overall leaderboard