Graph API - Outlook -- Search Emails By Subject ?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
15-09-22 05:24 PM
Hi,
I have used BP graph API developer exchange product to read/retrieve a list of all emails. Is there a way that I can filter ? ( I can and am filtering the result).. But is there a way to request a list of messages with specific query criteria ?
Like give me a list of emails where the subject = " Get XYZ Report now"
or emails that were received on a specific date = ?
Any pointers/documents links will be helpful
I have used BP graph API developer exchange product to read/retrieve a list of all emails. Is there a way that I can filter ? ( I can and am filtering the result).. But is there a way to request a list of messages with specific query criteria ?
Like give me a list of emails where the subject = " Get XYZ Report now"
or emails that were received on a specific date = ?
Any pointers/documents links will be helpful
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
15-09-22 07:21 PM
Hello @spalkar1,
The Microsoft Graph API supports the use OData queries within the requests. There is an query parameter/tag you can apply to the URL called $filter that provides a means for entering a search criteria.
See this Microsoft page for further details: https://docs.microsoft.com/en-us/graph/query-parameters
NOTE: You will need to edit the definition of the Outlook connector to be able to leverage this. Here's an example of adding a $filter to the List Messages action such that it will only return messages received from j.doe@gmail.com. Notice I added the following extra data to the end of the URL Path:

If you wanted this to be configurable, you could add a new input parameter where you would specify the OData value of the filter.
Cheers,
Eric
The Microsoft Graph API supports the use OData queries within the requests. There is an query parameter/tag you can apply to the URL called $filter that provides a means for entering a search criteria.
See this Microsoft page for further details: https://docs.microsoft.com/en-us/graph/query-parameters
NOTE: You will need to edit the definition of the Outlook connector to be able to leverage this. Here's an example of adding a $filter to the List Messages action such that it will only return messages received from j.doe@gmail.com. Notice I added the following extra data to the end of the URL Path:
?$filter=from/emailAddress/address eq 'j.doe@gmail.com'
If you wanted this to be configurable, you could add a new input parameter where you would specify the OData value of the filter.
Cheers,
Eric
