Trigger a flow when an email is sent to an Office 365 group mailbox.
This will be helpful to:
- Save attachments sent to a group to team document library or one drive (something like incoming emails on SharePoint on prem)
- Automate creation of events based on email sent to a group mailbox
Hey folks -
Thank you for the responses.
I am following up with my team to see if we can add a trigger that allows you to trigger a flow off of a mailbox (irrespective of whether a given user is following / not following that mailbox.)
100% correct what srl says : I am also looking for a trigger that works indipendent from a users mailbox, it should trigger on the arrival of a new mail in the office 365 group mailbox itself. What Sunay describes is indeed a workaround that, I admit, works. But there's no garantee the personal mailbox will exist forever (if the user leaves the company...).
Srl seems to be correct here. The functionality I want is this:
No one is subscribed to the group email. When an email comes in to the group email I can use a flow to create handling for the email and any attachments.
Thsi is especially important for an invoices inbox. When you get dozens or hundreds of invoices coming in, you need to be able to handle them. We are currently using a shared mailbox for this, to use the shared mailbox trigger.
But I miss out on the rest of the groups functionality by doing this.
Right now I have to choose either/or. Do I want an unmonitored mailbox with automated mail handling, or do I want a group, which I can use in Teams, Sharepoint, etc.?
What we are asking for is not to have to choose.
@VikVerma wrote:Trigger a flow when an email is sent to an Office 365 group mailbox.This will be helpful to:- Save attachments sent to a group to team document library or one drive (something like incoming emails on SharePoint on prem)- Automate creation of events based on email sent to a group mailbox
Fully agree. Also if you use the suggested work-around how to determine that is was sent to the group?
@srl gets the issue. Please follow his feedback. What is being provided in the current-state is only a workaround.
Update: turns out group emails were going straight past to the junk email. There's no way to add rules to groups, so I can't avoid that from happening. I hope it will eventually learn to stop throwing things in junk, but when I set it to Not Spam it went to my inbox.
I tried the workaround and it doesn't work at all- emails are all going under the group name in the "Groups" section of my Office 365 inbox, so it is bypassing my inbox even with the checkmark on "follow on inbox". All this checkmark seems to do is keep this "groups" section available on outlook.
I need to trigger a flow when emails with file attachments come in so I can save those files somewhere else and right now that is impossible. It is not even possible to move these emails somewhere else with a rule - there's literally no way to reach those emails, save maybe for some powershell voodoo.
@arthurv - So based on you Spam change you at least got the 'workaround' to work? Again, not a solution, just the workaround?
@schreibman sorry for the delay, I was waiting to make sure it worked, and it does. After I set all the recipients to safe to avoid going to junk mail, the emails started going to inbox, and Microsoft Flow picked them up.
Has this idea gone anywhere? It was first requested over 18 months ago. Sunay's original response does not satisfy the request - Flow does not trigger off of the Group Inbox recieving the message, only triggering off of the 'Followers' receipt of the message. Why will Flow trigger off of a Shared Mailbox receiving an email, but not an Office 365 Group Inbox? Office 365 Groups would have a much better chance of replacing Shared Mailboxes (which we want because end-users can more easily maintain access to Office 365 Groups, whereas Shared Mailbox access always seems to need an IT admin, plus all of the Office 365 Group features besides email), if they had just a bit more functionality to actually 'do' something with the messages in the Office 365 Group Inbox - trigger a flow, right-click to create a task or any of the other multiple actions one can do on a normal mail message.
Providing more info, with respect to the 'Need more info' request below.* With the suggested way, the trigger is still tied to a user's account and hence dependent on that user being part of the group in question.
I solved it with a workaround.
First, I went into Exchange admin in office 365. I made a rule in "mailflow" that did the following : for every mail sent to the group mailbox, put a users's mailbox in bcc. I did this because my group mailbox is configured not to send the emails to the mailboxes of the members of that group. Then I made a flow that triggers on a new email in that user's mailbox with condition "TO = groupmailbox emailadres". It works!Of course, this is not perfect. It should not be dependant on an individual's mailbox. But as long as Microsoft does not make it possible to trigger a flow on a group mailbox, I think it's the only solution...