Use our new Office 365 Groups Mail Connector!

A key ask from our Power Automate community has been the ability to use triggers and actions off events and data within an Office 365 Group mailbox; for example, triggering a flow when a new email is received in a Group mailbox.

While it was previously possible to set up a trigger in a personal mailbox for when a received email was also sent “To:” a group email, there were several limitations to this experience and a dependency on the personal mailbox. With this feedback, we have been working on a Groups mailbox connector which works independently from a single user’s personal mailbox.

We are excited to announce the release of a new connector which unlocks these key scenarios – the Office 365 Groups Mail connector! This connector contains operations which work with a specified Group mailbox and unblocks many business scenarios around automating workflows with Group mailboxes. The connector works off the Microsoft Graph API, and uses terminology (conversation, thread, post) specified in the Graph API Groups documentation.

Read the connector documentation and look up the operations of the connector here.

Here is a sample scenario that this new connector makes possible:

Save attachments sent to an Office 365 Group to a SharePoint folder

1) Search for the new Office 365 Groups Mail connector.

2) Start off a new flow by adding the trigger for “When a new email arrives to a group” and creating a connection.

3) Select a specific Group from the provided dropdown menu. The dropdown should contain all Groups the account associated with the authenticated connection is a member of. You can also opt to specify a custom Group ID to access any Public Group within your organization; see the connector documentation for instructions on how to do so.

4) Attachments are located within the thread post data. To use the “Get a thread post” operation, in addition to the Group ID, we need the Thread ID, and Post Id which is returned when the original trigger fires.

5) When specifying the Conversation thread ID, Power Automate will automatically convert the operation in to an “Apply to each” loop operation to handle the threads. This is done as there could be more than one new thread for Power Automate to handle.

6) Simply reopen the operation dialog to enter the Post Id, and similarly, Power Automate will convert the operation to a loop to handle the posts.

7) Now that we have the post, we are ready to extract the attachment and save it to SharePoint. We can do this using the “Create file” operation of the SharePoint connector. Within the inner loop, add a “Create file” operation and select the SharePoint site and folder path. We can use the post data from the previous action to select the File Name (Attachment name) and File Content (Attachment content bytes). When you select the “Attachment name”, Power Automate will convert it into another loop to handle all the attachments. Your final flow should look like this.

As you can see, when a new email arrives to a Group mailbox, for every new post in every new thread, the flow will take each attachment and create a new file in SharePoint.

We are excited to hear how you use this connector to deliver impact in your businesses!