Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Suggested answer

How do I output the subject line from the email into my Teams notification?

(1) ShareShare
ReportReport
Posted on by 4
I have an otherwise working flow that sends a Teams message to a Group Chat when an email from a specified sender and contains specified words in the subject is received. The output/chat message is one that I created - intent is just an alert - don't want entire body of message to be sent to Teams. I DO want the subject line of the email however to appear in the Teams Chat. This is what I am using 
 
 "body/messageBody": "<p class=\"editor-paragraph\">Check email - Proactive notification email received from support. Subject:  @{triggerOutputs()?['body/subject']}</p>"
 
What outputs in chat though is Check email - Proactive notification email received from support. Subject:
 
Actual subject is not pulled in.  What should I be including in order to obtain the subject from the email to appear in the chat? This subject is variable which is why I want the actual subject from the email.
  • CV-07101421-0 Profile Picture
    4 on at
    How do I output the subject line from the email into my Teams notification?
    @FLMike This is the Action 
     
    This is the Flow. The filtered email trigger is working as expected as well as the action except for that last piece where I am using the out of the box "body/subject" output trigger in an attempt to extract and output the actual subject line from the inbound email that triggers the flow.
  • Suggested answer
    Michael E. Gernaey Profile Picture
    43,270 Super User 2025 Season 1 on at
    How do I output the subject line from the email into my Teams notification?
    Hi
     
    This is because you are using this as a string look at this
     
    "body/messageBody": "<p class=\"editor-paragraph\">Check email - Proactive notification email received from support. Subject:  @{triggerOutputs()?['body/subject']}</p>"
     
    you have 
    "<p class=\"editor-paragraph\">Check email - Proactive notification email received from support. Subject:  @{triggerOutputs()?['body/subject']}</p>"
     
    The issue is the above have double quotes around the whole thing
    You need to show us the Actual Action with the stuff typed in, just typing the string tells me you have it wrong, but I need to see the visual activation of the variables, which I cannot see in this string.
     
    The double quotes are killing it. but seeing what you have is better
     
     
  • Suggested answer
    abc 123 Profile Picture
    784 Super User 2025 Season 1 on at
    How do I output the subject line from the email into my Teams notification?
    Try initializing a variable, and then set that variable to the triggerOutputs()?['body/subject']"
    (You might be able to do in a single action, but have to consider how to handle a blank incoming subject.)

    Once you have the value captured, then put that into your body/messageBody. 

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