Search Mail

Search Mail enables you to search for one or more e-mails in a Mail Folder as per the keyword-based approach or across all the search criteria such as Subject, Body, From address, To address and Attachment. This operation can search in any of the Outlook folders that is present under any of the account. Only the top 10 unique IDs results are shown in search mail.

 

Search can be performed using:

  • Keyword to search across all criteria including the attachment content
  • Search criteria to search for a specific criterion. Here any/all (Subject, Body, From, To, Attachment) can be provided.
     

    NOTE:  

    : You are restricted from using both the options so, either of these two options must be selected else, a warning appears.

Using Search Mail feature

  1. Make sure the prerequisites for using Office 365 activities are met.
  2. In the Canvas Tools pane, click Office 365 Services to expand the tool and view the associated activities.
  3. Drag the Outlook 365 activity inside the Office 365 Application Activity. Ensure that the output token of the OAuth process is passed on to the Outlook activity for authentication. For more information, see OAuth Activity.
    1. The validation error symbol disappears when you select relevant values in the field from the available list. For example, Access Token, Feature, Output Variable, or Input configuration values.

  4. In the Access Token list, select the output parameter holding the value of access token from the OAuth activity to pass in the Outlook 365 activity. For more information, see OAuth activity.
  5. In the Feature list, select Search Mail.

    1. Click the   (Setting) icon to configure the input configuration. The Input Configuration screen appears.

    2. Ensure to define all the input parameters as an in argument in the Parameter bar for selection in the mandatory and advanced options.

    3. The Input configuration consists of two types of parameters which must be entered. All the searches are based on partial search.

      1. Mandatory Options:

        1. In the Mail Folder, select the workflow argument / provide default value as per the configuration. For the list of accepted values for the Mail Folder Input configuration refer the below table -

        2. Advanced Options: Click Advanced Options to enter more input configuration as per your requirements. You can define the parameters for these search criteria either in the arguments or provide their default values.

          1. In the Keyword field, select the Keyword based on which mails are searched including the attachment content and attached files. If Keyword is selected other Advanced Options should not be selected.

          2. In the Subject field, select the subject text based on which mails are searched.

          3. In the Body field, select the body text based on which mails are searched.

          4. In the From field, select the from address text based on which mails are searched.

          5. In the To field, select the to address text based on which mails are searched.

          6. In the Attachment field, select the Attachment name text based on which mails are searched.

          7. Click Delete to remove the input parameter from the list.

          8. You can select the Is Default Value checkbox to set the selected input parameter as the default value.

          9. Once done, click Confirm.

  6. In the Output list, select the argument which should store the result. The argument should be of Out Direction.
  7. Save the process.
  8. In the Tool bar, click Setup Environment.

    NOTE:  

    You must select the relevant scope as per the activities in the automation process.
  9. Once environment setup is completed perform the Test Run.

    Output is of the format : {"searchResult":[{"id":"AAMkAGVmMDEzMTM4LTZmYWUtNDdkNC1hMDZiLTU1OGY5OTZhYmY4OABGAAAAAAAiQ8W967B7TKBjgx9rVEURBwAiIsqMbYjsT5e-T7KzowPTAAAAAAEMAAAiIsqMbYjsT5e-T7KzowPTAASXFxfBAAA="},{"id":"AAMkAGY3NDRmNzdmLTRiMWEtNDA5Ny05YTJmLTFhMzQ3YTA5OTVlOABGAAAAAACfaX52GHerSKvCFG4IUz2HBwBmk5_iauTiRZDadYaft_edAAAAAAEMAABmk5_iauTiRZDadYaft_edAAAY1YzcAAA="}]}