Skip to main content

Microsoft 365 Outlook

  • March 6, 2025
  • 6 replies
  • 492 views

Forum|alt.badge.img+22

I'm curious to know how your organization processes a high volume of emails in Outlook 365 mailboxes. Specifically, for mailboxes receiving more than 500-1000 emails per day, what best practices have you implemented using the Microsoft 365 Outlook package in Automation Anywhere? Feel free to share any limitations or recommendations.

6 replies

Oli.Morris
Automation Anywhere Team
Forum|alt.badge.img+12
  • Automation Anywhere Team
  • March 6, 2025

This is a timely post. Myself and the team have been busy building out API Tasks that leverage the Outlook 365 package. We’re using it to streamline the registration process for the Agentic Process Automation Training Camp. Our use case is slightly different to your ask as we’re sending out huge numbers of emails rather than receiving them...but my learnings are that if you can work with your IT and Infosec teams to allow you to have an OAuth2 connection and delegated mail permissions, in Azure, well that’s as close to an automation utopia as you can get 😂. (Sidenote: OAuth is a pain to initially setup but after that, a joy to work with).

My findings in building this way are that we can send out tens (sometimes even 100s) of emails in one go, in an API task that runs for less than 10 seconds. We can then also write any logging to Excel via the same OAuth connection and on error, easily send an email to the appropriate team (assuming it’s not the Outlook Graph APIs that are affected).

If you couple API Tasks with the new event triggers, whereby an Outlook email can trigger an API Task, then that could be a very efficient use case for a large volume of emails that I would imagine have peaks and troughs throughout the day.

In terms of practical tips, I’ve found the “connect” package to be the most “expensive” in terms of taking a lot of time to run. So I was super conscious to make sure we were only connecting once throughout the whole task. Make sure you give your Bot Runner or API Task Runner access to the OAuth connections. Also make sure they both have the ability to read and edit credential attributes (so they can save OAuth tokens in the CR).


Forum|alt.badge.img+8
  • Navigator | Tier 3
  • March 6, 2025

AA should publish their own Azure app which can be granted delegate access like other Automation Platforms.

AA bot agent already has access to infra, machine credentials, any data on that machine etc. and having delegate access should not be an issue. Being a low code tool, it should allow as easy setup as possible for users.


Forum|alt.badge.img+22
  • Author
  • Most Valuable Pathfinder
  • March 7, 2025

This is a timely post. Myself and the team have been busy building out API Tasks that leverage the Outlook 365 package. We’re using it to streamline the registration process for the Agentic Process Automation Training Camp. Our use case is slightly different to your ask as we’re sending out huge numbers of emails rather than receiving them...but my learnings are that if you can work with your IT and Infosec teams to allow you to have an OAuth2 connection and delegated mail permissions, in Azure, well that’s as close to an automation utopia as you can get 😂. (Sidenote: OAuth is a pain to initially setup but after that, a joy to work with).

My findings in building this way are that we can send out tens (sometimes even 100s) of emails in one go, in an API task that runs for less than 10 seconds. We can then also write any logging to Excel via the same OAuth connection and on error, easily send an email to the appropriate team (assuming it’s not the Outlook Graph APIs that are affected).

If you couple API Tasks with the new event triggers, whereby an Outlook email can trigger an API Task, then that could be a very efficient use case for a large volume of emails that I would imagine have peaks and troughs throughout the day.

In terms of practical tips, I’ve found the “connect” package to be the most “expensive” in terms of taking a lot of time to run. So I was super conscious to make sure we were only connecting once throughout the whole task. Make sure you give your Bot Runner or API Task Runner access to the OAuth connections. Also make sure they both have the ability to read and edit credential attributes (so they can save OAuth tokens in the CR).

Thanks ​@Oli.Morris for sharing your learnings. Very Insightful.

I am looking specifically for the following items:

  1. How to get the total count of emails from the mailbox or within a specific folder?
  2. Can I get more than 50 emails in one shot using this command package?

Forum|alt.badge.img+6
  • Navigator | Tier 3
  • March 5, 2026

@Oli.Morris , I am going through these motions right now, but I am struggling. The network team has provisioned an OAuth connection for me, which tested. I have that OAuth configured in the bot creator control room, which tested when created:

I wired up a simple web trigger test bot to listen for everything. I start it with “Run With Triggers”


After starting the listener, I forward an existing email from my personal inbox to the email account that the bot is monitoring. There is no indication the event was triggered as the bot continues to wait for an event.

 

I don’t know which side of the equation isn’t working properly. Is my AA OAuth not subscribed correctly? Is my network side not configured properly to present Outlook 365 events? 

Much appreciated to you or anyone else familiar with the web triggering that is willing to provide details and observations. I would like to get this working as the upside potential of this immense.


Oli.Morris
Automation Anywhere Team
Forum|alt.badge.img+12
  • Automation Anywhere Team
  • March 6, 2026

I’ll check-in with my colleague who made the video on triggers in the University and get back to you. I’ve not tried Outlook 365 Triggers myself, but had many customers who used Outlook Triggers in production.

Regarding, your comment “I forward an existing email from my personal inbox to the email account that the bot is monitoring”...is there anyway you can confirm that there are no rules in the email account which would invalidate the listeners?


Forum|alt.badge.img+6
  • Navigator | Tier 3
  • March 6, 2026

> ...which would invalidate the listeners

Interesting observation. There are no rules that impact that specific email. That email is left alone in the account’s Inbox. But there are numerous rules that act on other emails that come into the account.

Here is my observation. We had a standard that all emails coming into the account would be sorted to subfolders and then bots would pick up the emails from their particular subfolder. But while researching Power Automate, we found that emails that are moved are no longer considered New. They remain unread, but they are not New. And thus, Power Automate would not trigger on them.

Here is a second observation that just came in minutes ago...my first attempt with a File Create trigger failed to fire in production (unattended.) It works fine in dev (attended), but failed to fire in production. I’m wondering if this is more than just a coincidence. I will nag on the network guys some more.

Is there any licensing involved with triggers?