Skip to main content

Filter which emails a Gmail source processes

Choose which Gmail messages a Gmail source processes, by subject, sender, recipients or attachments.

Written by Jonatan Gomes

Use "Filter emails" in your Gmail source to choose which emails it processes. You can filter by subject, sender, recipients, attachment name, or whether an email has an attachment.

Build a filter

  1. Turn on "Filter emails" to open the condition editor.

  2. In "Match", choose AND or OR before "of the following". AND requires all conditions to match; OR requires at least one.

  3. In the CONDITION row, use "Select field" to choose what to check.

  4. Use "Select criteria" to choose how to check it. The available criteria depend on the field. Until you choose a criterion, the Value box shows "Select the criteria first".

  5. For a text comparison, enter the text to match in "Value". For "Has attachment", choose "Is true" or "Is false".

  6. Select "Confirm" to save the row. The saved row shows COLUMN, CRITERIA, and VALUE.

  7. Select "Add condition" to add another row, then configure and confirm it.

To remove a condition, select "Remove" in its CONDITION row.

Choose AND or OR

The "Match" setting applies to all conditions in the filter.

Match setting

When an email matches

AND

The email meets every condition. For example, it comes from a specific sender and has an attachment.

OR

The email meets at least one condition. For example, its subject contains one report name or another.

The editor supports one level of conditions, with no groups. You can't combine an AND group with an OR group in this editor.

Next to "Add condition", the editor displays: "Maximum nesting depth reached. For deeper logic, use the Query Data processor."

Available fields, criteria, and values

Field

Available criteria

Value

Subject

Text contains, Text does not contain, Text is exactly, Is empty, Is not empty

Text for text comparisons; "Is empty" and "Is not empty" check whether the field has content.

Sender (from)

Text contains, Text does not contain, Text is exactly, Is empty, Is not empty

Text for text comparisons; "Is empty" and "Is not empty" check whether the field has content.

To

Text contains, Text does not contain, Text is exactly, Is empty, Is not empty

Text for text comparisons; "Is empty" and "Is not empty" check whether the field has content.

Cc

Text contains, Text does not contain, Text is exactly, Is empty, Is not empty

Text for text comparisons; "Is empty" and "Is not empty" check whether the field has content.

Attachment name

Text contains, Text does not contain, Text is exactly, Is empty, Is not empty

Text for text comparisons; "Is empty" and "Is not empty" check whether the field has content.

Has attachment

Is true, Is false

"Is true" matches emails with an attachment. "Is false" matches emails without an attachment.

Gmail doesn't offer "Attachment size (MB)". That field is available in the Outlook source.

Examples

Process emails whose subject contains a report name

To process emails whose subject contains "Weekly sales report":

  1. Turn on "Filter emails".

  2. Select "Subject" as the field.

  3. Select "Text contains" as the criterion.

  4. Enter "Weekly sales report" in "Value".

  5. Select "Confirm".

With one condition, AND and OR give the same result. This filter matches subjects such as "Weekly sales report - October" because they contain the report name.

Process emails from one sender that have an attachment

To process only emails from [email protected] that have an attachment:

  1. Turn on "Filter emails" and set "Match" to AND.

  2. Create a condition with "Sender (from)", "Text is exactly", and the value "[email protected]". Select "Confirm".

  3. Select "Add condition".

  4. Choose "Has attachment" and "Is true". Select "Confirm".

Both conditions must match. An email from that sender without an attachment won't match, and neither will an email with an attachment from a different sender.

Did this answer your question?