How to Create Mail Flow Rules That Reduce Outlook Meeting Notifications

December 11, 2023
14 min read

In this four-part series, I discuss the elements of a mail flow rule—available in the Exchange admin center (EAC)—and explain how you can implement them in your organization.

It is recommended that you read these articles in the order they have been written.

When your Microsoft 365 users create a meeting via Outlook on the web, they can get bombarded by unnecessary meeting-related notification emails. For example, user X has accepted your meeting invite, user Y is out of office, etc.

The attendees themselves might find the meeting details in their inbox a bit distracting when they can always look in their calendars for any upcoming meetings. Plus, there are reminders about upcoming meetings anyway.

So, in this article, I’ll focus on creating two mail flow rules that address the issues that both the meeting convener and the attendees face.

For those who like to watch and learn, check out the 9-minute video at the end of this article.

Preliminary Notes

Before getting started, keep the following in mind:

Prerequisites

You should possess the global administrator or Exchange administrator role.

Use Case 1: Setting Meeting Response as Accepted by Default (Solution to the Meeting Convener Issue)

To configure a mail flow rule that saves the meeting convener from receiving unnecessary meeting notifications and responses like ‘accepted,’ ‘out of office,’ ‘busy at the scheduled time,’ etc., you should configure the rule’s conditions as shown in Figure 1.

This screenshot shows the Microsoft 365 mail flow rule settings for creating a mail flow rule that automatically sets Outlook meeting related responses as 'accepted'.
Figure 1: Microsoft 365 mail flow rule for setting Outlook on the web meeting response as Accepted by default. | Used with permission from Microsoft.

Setting the Message Header

After you add a name for the mail rule and set the values of Apply this rule if in the drop-down menus, configure the message header. From the Do the following dropdown, select Modify the message properties, as shown in Figure 2.

This screenshot shows how you can configure the Microsoft 365 mail flow rule message header.
Figure 2: Modify the message properties. | Used with permission from Microsoft.

For Modify the message properties, select set a message header option as the value, as shown in Figure 3.

This screenshot shows how you can configure the Microsoft 365 mail flow rule message header. It shows a Modify the message properties dropdown menu and
Figure 3: Set a message header. | Used with permission from Microsoft.

Your mail flow rule pane at this point should look like the one shown in Figure 4.

This screenshot shows the Microsoft 365 mail flow rule with configured message headers.
Figure 4: Set message header text and value. | Used with permission from Microsoft.

Select the first Enter text link (Figure 4) and enter the message header parameter as X-MS-Exchange-Organization-CalendarBooking-Response, as shown in Figure 5, and select Save.

This screenshot shows how you can enter the Microsoft 365 mail flow rule message header value. It shows a message header with text entered for the value. The value in this case is X-MS-Exchange-Organization-CalendarBooking-Response.
Figure 5: Set the message header text. | Used with permission from Microsoft.

Select the second Enter text link (Figure 4), enter the message header parameter’s value as Accept, as shown in Figure 6, and select Save.

This screenshot shows how you can enter the Microsoft 365 mail flow rule message header value. It shows a message header with a value of Accept.
Figure 6: Set the message header value. | Used with permission from Microsoft.

Your mail flow rule pane at this point should look like the one shown in Figure 7.

This screenshot shows the Microsoft 365 mail flow rule with configured message headers.
Figure 7: Microsoft 365 mail flow rule with configured message headers. | Used with permission from Microsoft.

Select Next and proceed with configuring the settings for the rule. To configure a mail flow rule’s setting, read How to Create Mail Flow Rules from Scratch Using the Microsoft 365 Exchange Admin Center and Windows PowerShell. After you configure the rule, test whether it works.

Testing Whether the Configured Rule Works

To test whether the configured rule works:

Sign in with the sender account (which was granted the rights to set meetings with accepted as the default response) and access Outlook on the web. Next, set up a meeting by selecting New mail > Event, as shown in Figure 8.

This screenshot shows how you test the configured Microsoft 365 mail flow rule using Outlook on the web. In the left pane, New mail and Event are selected.
Figure 8: Testing the Microsoft 365 mail flow rule using Outlook on the web. | Used with permission from Microsoft.

Fill in the meeting’s details, as shown in Figure 9, and then select Send.

This screenshot shows the next step in testing the configured Microsoft 365 mail flow rule using Outlook on the web. It shows the meeting details ad the Send button that has been selected.
Figure 9: Testing the Microsoft 365 mail flow rule by sending the meeting. | Used with permission from Microsoft.

Wait for a few minutes and you’ll get an all-accepted meeting response, as shown in Figure 10. This is the only meeting-related attendee response you will get, instead of the usual user X accepted, user y declined, and similar annoying meeting responses from your attendees.

This screenshot shows the Outlook window with an all-accepted meeting response.
Figure 10: Testing the Microsoft 365 mail flow rule using Outlook on the web by get an all-accepted meeting response. | Used with permission from Microsoft.

Creating the Same Rule Using PowerShell

To create the same mail flow rule using PowerShell:

  1. Run your Windows PowerShell as an administrator.
  2. Connect to Microsoft 365 Exchange Online using the Connect-Exchange cmdlet. Read How to Connect to Microsoft 365 Exchange Online With PowerShell for more info.
  3. Run the following, as shown in Figure 11: 
    New-TransportRule -Name "Setting Meeting Response as Accepted by Default" -From "rex@w4l0s.onmicrosoft.com" -SetHeaderName "X-MS-Exchange-Organization-CalendarBooking-Response" -SetHeaderValue Accept 
This screenshot shows how you can configure a Microsoft 365 mail flow rule using PowerShell.
Figure 11: Configuring the Microsoft 365 mail flow rule using PowerShell. | Used with permission from Microsoft.

How Does the Script Work?

Let’s break down the script:

  1. Use the New-TransportRule cmdlet for creating the mail flow rule.
  2. Pass in the name of the rule within double quotes, as shown earlier in Figure 11.
  3. Set the -From parameter value to rex@contoso.com.
  4. Set the -SetHeaderName parameter value to X-MS-Exchange-Organization-CalendarBooking-Response.
  5. Set the -SetHeaderValue parameter value to Accept.

To find out whether the rule has been successfully created, run the Get-TransportRule <name of the rule> command.

Note: (3) is the condition and (4) and (5) are the actions. This rule does not have any exceptions.

Use Case 2: Adding Meeting Details Directly to the Attendees’ Calendar (Solution to the Attendee Issue]

To configure a mail flow rule that sends the meeting details directly to the attendee calendar (without sending them to the attendees’ inbox), configure the rule’s conditions as shown in Figure 12.

This screenshot shows how you can configure a Microsoft 365 mail flow rule for sending Outlook meeting details directly to the attendee's calendar. The name is Sending-meeting-details-directly-to-calendar. The rule is applied is the sender is the designated person. In the Do the following drop-down menu, Modify the message properties is selected and the message header is set to the designated text.
Figure 12: Microsoft 365 mail flow rule for sending Outlook meeting details directly to the attendees' calendar. | Used with permission from Microsoft.

Setting the Message Header

After you add a name for the mail rule and set the values of the Apply this rule if dropdowns, configure the message header.

From the Do the following dropdown, select Modify the message properties, as shown in Figure 13.

This screenshot shows how you can configure the Microsoft 365 mail flow rule message header. Modify the message properties is selected.
Figure 13: Configuring the Microsoft 365 mail flow rule message header. | Used with permission from Microsoft.

Select set a message header option as the value for the Modify the message properties parameter, as shown in Figure 14.

This screenshot shows how you can configure the Microsoft 365 mail flow rule message header. In the Do the following dropdown, Modify the message properties is selected and set a message header is selected.
Figure 14: Set a message header. | Used with permission from Microsoft.

Your mail flow rule pane at this point should look like the one shown in Figure 15.

This screenshot shows a Microsoft 365 mail flow rule with configured message headers. In the Do the following dropdown, Modify the message properties is selected and set a message header is selected.
Figure 15: Microsoft 365 mail flow rule with configured message headers. | Used with permission from Microsoft.

Select the first Enter text link (Figure 15), enter the message header parameter as X-MS-Exchange-Organization-CalendarBooking-TriageAction, as shown in Figure 16, and then select Save.

This screenshot shows a message header with text that says X-MS-Exchange-Organization-CalendarBooking-TriageAction.
Figure 16: Microsoft 365 mail flow rule with message header value. | Used with permission from Microsoft.

Now select the second Enter text link (Figure 15), enter the message header parameter’s value as Accept, as shown in Figure 17, and then select Save.

This screenshot shows a message header with text that says MoveToDeletedItems.
Figure 17: Microsoft 365 mail flow rule with message header value. | Used with permission from Microsoft.

Your mail flow rule pane at this point should look like the one shown in Figure 18.

This screenshot shows a Microsoft 365 mail flow rule with configured message headers.
Figure 18: Microsoft 365 mail flow rule with message headers. | Used with permission from Microsoft.

Select Next and proceed with configuring the settings for the rule. To find out how to configure a mail flow rule’s setting, read How to Create Mail Flow Rules from Scratch Using the Microsoft 365 Exchange Admin Center and Windows PowerShell. After you configure the rule, test whether it works.

Testing Whether the Configured Rule Works

To test whether the configured rule works:

Sign in with the sender account (which was granted the right to send meetings directly to the attendee calendar) and access Outlook on the web. Next, set up a meeting by selecting New mail > Event, as shown in Figure 19.

This screenshot shows how you can test the configured Microsoft 365 mail flow rule using Outlook on the web. In the left pane, New mail and Event are selected.
Figure 19: Testing the Microsoft 365 mail flow rule using Outlook on the web. | Used with permission from Microsoft.

Fill in the meeting’s details as shown in Figure 20, and then select Send.

This screenshot shows the next step in testing the configured Microsoft 365 mail flow rule using Outlook on the web. It shows the meeting details and the Send button that has been selected.
Figure 20: Setting up meeting details using Outlook on the web. | Used with permission from Microsoft.

Sign out and sign in using one of the meeting attendee accounts. You’ll notice there is no meeting-related notification mail in the inbox. Now go to the user’s calendar by selecting the calendar tab, as shown in Figure 21.

This screenshot shows how you can test the configured Microsoft 365 mail flow rule using Outlook on the web. The calendar tab is selected.
Figure 21: Signing into Outlook on the web using one of the meeting attendee accounts. | Used with permission from Microsoft.

Notice that the meeting details get listed in the user’s calendar, as shown in Figure 22.

This screenshot shows meeting details listed in the attendees' calendar.
Figure 22: Meeting details getting listed in the attendee’s calendar. | Used with permission from Microsoft.

Note: You can still locate the meeting details in the Deleted Items folder of the user inbox as shown in Figure 23. If you remember, you set the message header value of the mail flow rule as MoveToDeletedItems. So, the meeting details were automatically moved to the Deleted Items folder, to save the user from unnecessary meeting-related notifications.

In this screenshot, Deleted Items is selected in the left pane.
Figure 23: The meeting details are in the Deleted Items folder. | Used with permission from Microsoft.

Creating the Same Rule Using PowerShell

To create the same mail flow rule using PowerShell:

  1. Run your Windows PowerShell as an administrator.
  2. Connect to Microsoft 365 Exchange Online using the Connect-Exchange cmdlet. Read How to Connect to Microsoft 365 Exchange Online With PowerShell for more info.
  3. Run the following, as shown in Figure 24: 
    New-TransportRule -Name "Send meeting details directly to calendar" -From farah@w4l0s.onmicrosoft.com -SetHeaderName "X-MS-Exchange-Organization-CalendarBooking-TriageAction" -SetHeaderValue MoveToDeletedItems
This screenshot shows how you can create a Microsoft 365 mail flow rule can be created using PowerShell.
Figure 24: Creating the Microsoft 365 mail flow rule using PowerShell. | Used with permission from Microsoft.

How Does the Script Work?

Let’s break down the script:

  1. Use the New-TransportRule cmdlet for creating the mail flow rule.
  2. Pass in the name of the rule within double quotes, as shown earlier in Figure 24.
  3. Set the -From parameter value to farah@contoso.com.
  4. Set the -SetHeaderName parameter value to X-MS-Exchange-Organization-CalendarBooking-TriageAction
  5. Set the -SetHeaderValue parameter value to MoveToDeletedItems.

To find out whether the rule has been successfully created, run the Get-TransportRule <name of the rule> command.

Note: (3) is the condition and (4) and (5) are the actions. This rule does not have any exceptions.

Possible Errors You Might Face

Here are some possible errors you might face and ways to rectify them:

  • Whitespace in your mail flow rule’s name: Ensure you name your mail rules without any whitespace between them, as this can throw errors. Remember that whitespace causes errors only when you are creating your rules using the EAC, not when you are using PowerShell.
  • Typos in your message header and message header value: Ensure you get the message header and its value right. You should enter them exactly as it has been provided in this article. If not, you won’t be able to save/run your rule successfully.
  • Not running your shell as administrator: Select the PowerShell program from the Windows start menu and choose Run as administrator, as shown in Figure 25.
This screenshot shows how you can run PowerShell in Administrator mode.
Figure 25: Running PowerShell as Administrator. | Used with permission from Microsoft. Windows PowerShell is highlighted in the left pane. Run as administrator is highlighted in the right pane.
  • Execution Policy set to restricted mode: Execution policy setting determines the script execution rights for the current user. If you are signing in for the first time, chances are this is set to ‘restricted’ mode. So, ensure the execution policy is set to RemoteSigned (which allows you to execute your scripts) by running the Set-ExecutionPolicy RemoteSigned command.

          Note: To check your current script execution rights, run the Get-ExecutionPolicy command. 

  • Typos in your PowerShell script: You can run into typos even while copying/pasting scripts. So, it’s best to save your scripts in separate .ps1 files and execute them. This not only saves time but also prevents your script from running into unnecessary errors.

Conclusion

In the final part of this series on mail flow rules, let’s focus on the part that I have ignored so far – the exceptions. Let’s create a couple of mail flow rules with exceptions this time and see how they can be useful in overriding the configured mail flow rule when the situation demands it.

For Those Who Like to Watch and Learn

The following is a 9-minute video version of this article. It shows you how to create mail flow rules that reduce Outlook meeting notifications using the Microsoft 365 Exchange admin center and PowerShell.

Thilak Kumar Singh

Thilak Kumar Singh

Thilak Kumar Singh is a trainer who believes in teaching about IT in the simplest possible way with more emphasis on visual mode of learning. He firmly believes in democratizing IT knowledge, especially of Microsoft solutions, in which he specializes as a trainer and consultant.

He observes that in this era dominated by cloud computing and collaboration, where IT has reached users unimaginable hitherto, IT knowledge must not be an obscure science, but rather be available to anyone who wishes to engage with IT.