Understanding filters in Office 365 triggers
Tags: webmethods, integration, connectors
Published: 2021-12-06 09:26:11

---
title: Understanding filters in Office 365 triggers
published: true
date: 2021-12-02 15:06:50 UTC
tags: #webmethods, #integration, #connectors
canonical_url: https://tech.forums.softwareag.com/t/understanding-filters-in-office-365-triggers/253665
---

This article explains how to use filters provided for Office365 triggers.

In Office 365 triggers you can use the Email and Subject filter to add a condition based on a particular email address or a particular subject term respectively.

[![image](https://aws1.discourse-cdn.com/techcommunity/optimized/3X/3/7/37daa58a91fe298bec6b5e48b7bd925ae24dab3a_2_505x375.png)](https://aws1.discourse-cdn.com/techcommunity/original/3X/3/7/37daa58a91fe298bec6b5e48b7bd925ae24dab3a.png "image")

You can click on the “Add Email” and “Add Subject” buttons to add filters.

**Let’s see how to add filters for Email ids.**

[![image](https://aws1.discourse-cdn.com/techcommunity/optimized/3X/4/f/4f0634ef739ab930dce658c432d3a57b65c51616_2_505x375.png)](https://aws1.discourse-cdn.com/techcommunity/original/3X/4/f/4f0634ef739ab930dce658c432d3a57b65c51616.png "image")

Once you click on Add Email button, you will see a field to add email ID.

Once you add the email ID inside the above Email ID field means, you are configuring the trigger to be executed when the email contains the mentioned Email ID.

**And** condition for Email ID.

[![image](https://aws1.discourse-cdn.com/techcommunity/optimized/3X/1/b/1bfa4d80e7f6667f9fd751a3baf8a9900b1427e4_2_507x375.png)](https://aws1.discourse-cdn.com/techcommunity/original/3X/1/b/1bfa4d80e7f6667f9fd751a3baf8a9900b1427e4.png "image")

To set **AND** condition click on the “Add Email ID’s” button, shown in the above screenshot.

In the above screenshot, we have set is an **AND** condition, where the trigger will execute only when the email has both the mentioned Email ID’s

**OR** condition for Email ID’s

To add an **OR** condition see the below image.

[![image](https://aws1.discourse-cdn.com/techcommunity/optimized/3X/1/f/1f2d79b872379cff9724df1aea445d53c513b876_2_502x375.png)](https://aws1.discourse-cdn.com/techcommunity/original/3X/1/f/1f2d79b872379cff9724df1aea445d53c513b876.png "image")

To add an **OR** condition click on the “Add Email” button on the above image.

[![image](https://aws1.discourse-cdn.com/techcommunity/optimized/3X/7/2/7294e68654c5a5e46db35a154032bd3ccaa75b75_2_506x375.png)](https://aws1.discourse-cdn.com/techcommunity/original/3X/7/2/7294e68654c5a5e46db35a154032bd3ccaa75b75.png "image")

The above screenshot depicts the example of the **OR** condition. The trigger will execute only either the email contains the email ID from Email Ids 1 or Email Ids 2.

**Now let us see how to use the filter for both the Email ID and Subject field.**

You can set a filter when you want the trigger to get executed if it has a particular Email ID and a particular subject.

For this, you would need to add an Email ID in the Email field and need to add Subject in the Subject field.

See the attached image:

[![image](https://aws1.discourse-cdn.com/techcommunity/optimized/3X/1/e/1e4d61028019887c9265720211d09677e02867df_2_502x375.png)](https://aws1.discourse-cdn.com/techcommunity/original/3X/1/e/1e4d61028019887c9265720211d09677e02867df.png "image")

Here we have set a condition, that the trigger will get executed when the email has [john@example.com](mailto:john@example.com) as one of the email IDs and the subject contains the word “demo” in it.

<small>1 post - 1 participant</small>

[Read full topic](https://tech.forums.softwareag.com/t/understanding-filters-in-office-365-triggers/253665)