--- title: "Search Emails" slug: "search-emails" updated: 2025-09-02T19:33:46Z published: 2025-09-02T19:33:46Z canonical: "documentation.decisions.com/search-emails" --- > ## Documentation Index > Fetch the complete documentation index at: https://documentation.decisions.com/llms.txt > Use this file to discover all available pages before exploring further. # Search Emails | Step Details | | --- | | **Introduced in Version** | 4.0.0 | | **Last Modified in Version** | 7.12.0 | | **Location** | Integration > Exchange Web Services | The **Search Emails** step is used to search through received emails to find an email specified by the Step's inputs. ### Prerequisites - This step requires the [Exchange Web Services module](https://documentation.decisions.com/docs/microsoft365-exchange) to be [installed](https://documentation.decisions.com/docs/installing-modules-decisions) before it will be available in the toolbox. - A [dependency](https://documentation.decisions.com/docs/project-dependencies) must be created after installing the module in order for the Step to be used. --- ## Properties #### Inputs | Property | Description | Data Type | | --- | --- | --- | | Exchange Server | The server and authentication used. | ExchangeServerDefinition | | Offset | The number of results to skip. Use 0 to retrieve results from the start of the results. This parameter is used to allow pages of results to be retrieved. | Int32 | | Page Size | The maximum number of results to return. | Int32 | | Search String | Text to search for in the Inbox. This parameter supports a subset of Microsoft's Advanced Query Syntax, as documented here: [QueryString \| Microsoft Docs](https://learn.microsoft.com/en-us/previous-versions/office/developer/exchange-server-2010/ee693615%28v%3dexchg.140%29) | String | #### Outputs | Property | Description | Data Type | | --- | --- | --- | | Output | Outputs a list of the retrieved emails. | List of ExchangeEmail | ![](https://cdn.document360.io/6ef8bcc1-6489-4486-9ad1-83acff7e5df0/Images/Documentation/2025-08-20_15h09_46.png) --- ## Common Errors ### The Remote Server Returned an Error If the remote server address is improperly entered, the Step will cause an error. To correct this, input a URL that is properly spelled to effectively connect to the designated server. #### Error Message: ```csharp DecisionsFramework.Design.Flow.ErrorRunningFlowStep: Error running step Search Emails 1[SearchEmails] in flow [Step Library Flow]: Exception invoking method SearchEmails on class ExchangeEmailSteps ---> DecisionsFramework.LoggedException: Exception invoking method SearchEmails on class ExchangeEmailSteps ---> System.Exception: Search Exchange Email error. Search String: test. ---> System.AggregateException: One or more errors occurred. (The parameter queryString is only valid for Exchange Server version Exchange2010 or a later version.) ---> Microsoft.Exchange.WebServices.Data.ServiceVersionException: The parameter queryString is only valid for Exchange Server version Exchange2010 or a later version. at Microsoft.Exchange.WebServices.Data.FindRequest`1.Validate() at Microsoft.Exchange.WebServices.Data.ServiceRequestBase.ValidateAndEmitRequest() at Microsoft.Exchange.WebServices.Data.SimpleServiceRequestBase.InternalExecuteAsync() at Microsoft.Exchange.WebServices.Data.MultiResponseServiceRequest`1.ExecuteAsync() at Microsoft.Exchange.WebServices.Data.ExchangeService.FindItems(FolderId parentFolderId, String queryString, ViewBase view) --- End of inner exception stack trace --- at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task`1.get_Result() at Decisions.Exchange.ExchangeEmailSteps.SearchEmails(ExchangeServerDefinition ExchangeServer, String SearchString, Int32 PageSize, Int32 Offset) --- End of inner exception stack trace --- at Decisions.Exchange.ExchangeEmailSteps.SearchEmails(ExchangeServerDefinition ExchangeServer, String SearchString, Int32 PageSize, Int32 Offset) at InvokeStub_ExchangeEmailSteps.SearchEmails(Object, Span`1) at System.Reflection.MethodBaseInvoker.InvokeWithFewArgs(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) --- End of inner exception stack trace --- at DecisionsFramework.Design.Flow.StepImplementations.InvokeMethodStep.Run(StepStartData data) at DecisionsFramework.Design.Flow.FlowStep.RunStepInternal(String flowTrackingID, String stepTrackingID, KeyValuePairDataStructure[] stepRunDataValues, AbstractFlowTrackingData trackingData) at DecisionsFramework.Design.Flow.FlowStep.Start(String flowTrackingID, String stepTrackingID, FlowStateData data, AbstractFlowTrackingData trackingData, RunningStepData currentStepData) --- End of inner exception stack trace --- ``` --- Related InformationRelated Articles: [Exchange Web Services Module](https://documentation.decisions.com/docs/microsoft365-exchange)