🔧 New: User Management Graph PowerShell Toolkit

Simplify user tasks like bulk creation, updates, password resets, deletions, license checks & more — all from one place.

🚀 Launch Toolkit

How to Create Mail Flow Rules That Reduce Outlook Meeting Notifications

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, we’ll focus on creating two mail flow rules that address the issues that both the meeting convener and the attendees face.


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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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: 
  4. New-TransportRule -Name "Setting Meeting Response as Accepted by Default" -From "rex@w4l0s.onmicrosoft.com" -SetHeaderName "X-MS-Exchange-Organization-CalendarBooking-Response" -SetHeaderValue Accept 

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 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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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: 
  4. New-TransportRule -Name "Send meeting details directly to calendar" -From farah@w4l0s.onmicrosoft.com -SetHeaderName "X-MS-Exchange-Organization-CalendarBooking-TriageAction" -SetHeaderValue MoveToDeletedItems

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:

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

To find out whether the rule has been successfully created, run the Get-TransportRule 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.
  • 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 we 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.


Did You Know? Managing Microsoft 365 applications is even easier with automation. Try our Graph PowerShell scripts to automate tasks like generating reports, cleaning up inactive Teams, or assigning licenses efficiently.

Ready to get the most out of Microsoft 365 tools? Explore our free Microsoft 365 administration tools to simplify your administrative tasks and boost productivity.

© Your Site Name. All Rights Reserved. Design by HTML Codex