SearchEmailsInput#

class langchain_community.tools.office365.messages_search.SearchEmailsInput[source]#

Bases: BaseModel

Input for SearchEmails Tool.

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.

param folder: str = None#

If the user wants to search in only one folder, the name of the folder. Default folders are “inbox”, “drafts”, “sent items”, “deleted ttems”, but users can search custom folders as well.

param max_results: int = 10#

The maximum number of results to return.

param query: str [Required]#

The Microsoift Graph v1.0 $search query. Example filters include from:sender, from:sender, to:recipient, subject:subject, recipients:list_of_recipients, body:excitement, importance:high, received>2022-12-01, received<2021-12-01, sent>2022-12-01, sent<2021-12-01, hasAttachments:true attachment:api-catalog.md, cc:samanthab@contoso.com, bcc:samanthab@contoso.com, body:excitement date range example: received:2023-06-08..2023-06-09 matching example: from:amy OR from:david.

param truncate: bool = True#

Whether the email body is truncated to meet token number limits. Set to False for searches that will retrieve small messages, otherwise, set to True