Let's POWER Automate

From no-code to low-code

Menu
  • Expressions
  • Filters
  • General
  • Application specific solutions
    • Dataverse
    • Excel
    • Forms
    • Outlook
    • Planner
    • Power Apps
    • SharePoint
    • Teams
  • Triggers
  • Ready to use solutions
    • Approval Process Template
    • Task Delegation App
    • The Ultimate Power Automate expressions cheat sheet
    • Power Automate HTTP requests to SharePoint cheat sheet
    • Power Automate HTTP requests to Graph API cheat sheet
  • ABOUT ME
  • Get help with your flow
  • POWER PLATFORM SERVICES
Menu

How to search in the email text using Power Automate flow

Posted on September 18, 2022September 18, 2022 by Tom

“I’d like to get all emails with a specific topic keyword, can I use Power Automate to search in the email text?”


When you need to get emails from a mailbox, the ‘Get emails’ action gives you a lot of options. You can filter by the subject, sender, recipient, CC, etc., but what about the email text? There’s no field that would explicitly ask you for a keyword. How do you search in the email body then?

Use HTTP request instead of ‘Get emails’

The first thing I’d recommend is to not use the ‘Get emails’ action. That action will return maximum 25 emails, no matter how many there’re. Since there can be more than 25 emails it’s better to use the Office 365 Groups action ‘Send an HTTP request’ without such limitation.

Once you add the action you can easily define the filter directly in the url. For example, if I want to search for all emails with the word ‘nordic’ in the body, I can just add the parameters &search=”body:nordic”.

https://graph.microsoft.com/v1.0/me/mailFolders('Inbox')/messages?$select=sender,subject,body&top=100&search="body:nordic"
Power Automate search email text

To decompose the search parameter into pieces:

&       - adding another parameter in the url
search  - to search for something
=       - what to search for?
body    - search where
:       - search for
nordic  - the actual value to search for

Put it all together and it’ll return only emails with the word ‘nordic’ in the text.

Note: you can also search in from, subject, and body at the same time if you skip the ‘search where/for’ in the url, e.g. &search=”nordic”.

Summary

As you can see, you can quite easily search in the email text using Power Automate flow. Instead of the default action use an HTTP request and add the parameter to the url. It’ll return more than 25 emails and you can even search in from, subject, and body at the same time.

And it’s not limited to email body, there’s a whole bunch of values you can search for as specified in the Microsoft documentation.


🚀 Master Power Automate

Join 2,000+ professionals getting actionable Power Automate tutorials, solutions, cheat sheets & tips every week.

No spam. Unsubscribe anytime.

2 thoughts on “How to search in the email text using Power Automate flow”

  1. Ben says:
    March 26, 2025 at 12:16 pm

    Thanks for the insight! Good to know that HTTP request could prove more useful than ‘Get emails’. But I’m still not sure if it’s exactly what I’m looking for:

    I’d like to filter new incoming emails by a certain list of keywords in the email body.
    If one or more keywords are used in the incoming email, I’d like to be notified in a single email, which keywords were used. This email should only list all sentences, where the keywords I’m looking for were mentioned.

    Is this possible with “Get emails” ?

    Reply
    1. Tom says:
      April 5, 2025 at 9:15 am

      Hello Ben,
      it probably is, but it would be quite complicated to implement, it won’t be just some configuration in an action / http request for sure, more like a complex logic in a flow.

      Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

🚀 Master Power Automate

Join 2,000+ professionals getting actionable Power Automate tutorials, solutions, cheat sheets & tips every week.

No spam. Unsubscribe anytime.

Still exchanging emails to get things approved?

Use the Approval Process Template and the Task Delegation App to skip the hard part and deploy an automated, fully functional approval solution on a SharePoint list in minutes! And then the next one, and the next one...

Approval Template Preview ✨ Learn more ✨

Turn ideas into flows with ease!

Grab the complete Power Automate Cheat Sheet Bundle—everything you need to master expressions, SharePoint HTTP calls, and Graph API in Power Automate.

Cheat Sheet Bundle Preview ✨ Get the Cheat Sheets

Didn't find what you were looking for?
Need to adjust a solution to fit your needs?
Or would you just like to get an assistance from somebody with thousands of hours of experience with Power Automate?

Power Automate blogs worth visiting

Damien Bird
Dennis (Expiscornovus)
Paul Murana

©2025 Let's POWER Automate | Theme by SuperbThemes