Skip to main content

Specify Gmail Search Criteria for Extracting Email Addresses

The first step in the workflow is to specify the search criteria and any emails that matching the search query will processed for extracting email addresses. The Email Extractor add-on offers a simplified interface that can be used to visually build the search criteria.

Search Criteria in Email Extractor

You can utilize the following search operators to narrow down your search and locate specific emails-

  • Gmail Folder - You have a list of all your Gmail folders (or labels) in the dropdown. You can select any label from the dropdown, or choose the Anywhere option to extract email addresses from anywhere in Gmail (including spam and trash folders).

  • After and Before Date - You may search for emails received before or after particular dates by specifying the date in these fields in yyyy/mm/dd format. For instance, you can specify 2023/01/01 in the after field and 2023/12/31 in the before field to extract addresses available in the emails received in the calendar year 2023.

  • Subject - You may search for emails containing specific words in the subject line. For example, you may specify words like โ€˜invoiceโ€™ and โ€˜paymentโ€™ in this input field to filter the emails based on the subject line.

  • From - You can search for emails sent by a particular sender(s)

  • Advanced Options - These options contain a list of advanced search operators based on which you can filter out your emails. You can filter emails by message size, Gmail category (promotions, social, primary), whether the mail is read, unread, or starred, and many more.

  • Excluded Domains - If you wish to exclude certain email addresses that belong to a particular domain from being extracted, you may specify the domain name in this field.

In our Gmail account, we have separate labels for the emails exchanged with our business contractors and suppliers. For this tutorial, we will process the emails marked under these labels, which have been exchanged within the last 2 years. To specify the date range, you can either specify the exact date in the After Date field or select the marker newer_than: from the Advanced Options field.

We do not want email addresses with our domain, which is thefruitinc.com to be extracted, so we have specified that in the Excluded Domains field.

When you specify the search criteria, a search query appears at the bottom that links to emails in your Gmail inbox matching your search query. This is a good way to test if we have correctly constructed the search query.