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 Automate
Suggested Answer

Keyword Flagging Flow

(0) ShareShare
ReportReport
Posted on by 9
I would like to create a flow that flags emails based on specific conditions. For example, if an email contains the word “dinner,” it should be automatically flagged. I have attempted to set this up myself, as shown below, but the test is currently failing.
 
 
My set up is as below:
{"nodeId":"Condition","serializedValue":{"type":"If","expression":{"contains":["@triggerOutputs()?['body/body']","dinner"]},"actions":{"Flag_email":{"type":"OpenApiConnection","inputs":{"parameters":{"messageId":"@triggerOutputs()?['body/id']"},"host":{"apiId":"/providers/Microsoft.PowerApps/apis/shared_office365","connection":"shared_office365","operationId":"Flag_V2"}}}},"else":{"actions":{}},"runAfter":{}},"allConnectionData":{"Flag_email":{"connectionReference":{"api":{"id":"/providers/Microsoft.PowerApps/apis/shared_office365"},"connection":{"id":"/providers/Microsoft.PowerApps/apis/shared_office365/connections/shared-office365-bc79df50-bad1-47cb-b507-b3b1d7f5b8a9"},"connectionName":"shared-office365-bc79df50-bad1-47cb-b507-b3b1d7f5b8a9"},"referenceKey":"shared_office365"}},"staticResults":{},"isScopeNode":true,"mslaNode":true}
error1.png
I have the same question (0)
  • Suggested answer
    PowerDeveloperTP Profile Picture
    468 on at
    Hello,
     
    Could you please make sure you are using message id in Flag email action to identify the correct email.

    Do NOT use:

    Subject,  Conversation Id,  Internet Message Id

    Also ensure you have set the flag status.


    •  
     
     
    Thank you.
    Like my answer? - Hit that Thumbs Up. Resolved the Issue? - Hit Accept as Solution.
    This helps others find solutions to future issues!
  • Suggested answer
    Kalathiya Profile Picture
    1,977 Super User 2026 Season 1 on at
     
    Yes, above answer is correct only. Also, make sure to check these two things as well:
     
    #1. Make sure that you are using Message Id from dynamic content selection not the Internet Message Id
    Please copy and past this in Message Id parameter.
    @{triggerOutputs()?['body/id']}
    #2. Please check connection reference is correct or not. If it’s not, please sign in and fix the connection.
     
    If this response resolves your issue, please mark it as the Verified Answer so it can help other community members as well.
    ---------------------------------------------------------------------------------

    📩 Need more help? Just mention @Kalathiya and I’ll be happy to assist.

    ✔️ If this answer helped you, please tick “Does this answer your question?” so it can be marked as the Verified Answer.

    💛 A Like always motivates me to keep contributing!

  • Kalathiya Profile Picture
    1,977 Super User 2026 Season 1 on at
     
    If this solution helped, please consider marking it as the verified answer so it can help others in the community 😊
    If you still need assistance, feel free to let us know, we’re happy to help!
     

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
Vish WR Profile Picture

Vish WR 875

#2
Valantis Profile Picture

Valantis 817

#3
Haque Profile Picture

Haque 481

Last 30 days Overall leaderboard