Trigger a notification in Microsoft Teams when an email is received into a shared Outlook mailbox with Power Automate
Besides our own private inbox, many of us also monitor shared mailboxes. My first task of any working day is to check my emails. However, I often get carried away with personal replies, and other subsequent tasks related to them. This results in failing to remember to check the shared inbox. Fortunately, a lot of the emails in that inbox are not related to my department, but it goes without saying that there are several occasions in which keeping up to date would have proved highly beneficial. I decided to create a Power Automate Flow that would trigger a notification in Microsoft Teams when an email with a specific subject line is received into the shared inbox.
This flow can be used by all departments. For example, sales teams can follow up with prospects, marketing teams can divide new contacts in the CRM system and support teams are able to effectively handle tickets.
Get in touch with our team if you have more complex Power Automate requirements. We are happy to assist.
Business scenario: Our CRM system is hosted in HubSpot, with contacts being added automatically when any kind of form is submitted on our website. We receive an email in the shared inbox whenever a new contact is added. Now I would like to get a notification about this in Microsoft Teams, (our Marketing Channel to be specific). This will help me to notify the whole marketing team of the new contact in our database and allow for someone to follow this up. One of the team members can allocate this contact to the appropriate marketing list depending on the request. Now the whole team is aware of any new contacts being added to our database, with the process becoming much easier to coordinate.
Please note: You will be required to have a Microsoft account set up. This can be a personal or work account (as Power Automate is available to everyone for free).
Create a new Flow
How do we create a Power Automate Flow to trigger a notification in Microsoft Teams when an email is received into a shared mailbox? First, navigate to https://flow.microsoft.com and sign in with your Microsoft account.
Step 1: From the left navigation, select Create.
Step 2: Select Automated cloud flow. You now have the basic start of your flow.
Step 3: Give your flow a name and select your trigger: ‘When a new email arrives in a shared mailbox’.
Step 4: Fill in the address of the shared mailbox and hit enter. Then choose the folder.
Step 5: Click on Show advanced options to fill out any additional data about the email. In my case, I set the From field to be the HubSpot address. I turned on the option to Include Attachments. For the Subject Filter I chose “New submission on HubSpot Form” because this is the subject line used by HubSpot, as seen in the email below. However, I could have chosen to include the name of a specific form if required. In this case, I want to receive a notification for every form submission.
Step 6: Hit + New step to select the next operation.
Step 7: Search for Post message in a chat or channel to add this to your flow.
Step 8: Fill out the specifics for the operation.
- Post as: Flow bot
- Post in: Channel
- Team: Marketing
- Channel: General
- Message: Add a message of your choice
Your flow should now look like this. Don’t forget to hit Save.
Testing your flow
You are now ready to test your flow to ensure a successful setup.
Step 9: Press Test in the top right corner and select Manually. Click Test.
Step 10: I will submit a form on our website to test the flow. I should receive a notification in the general Marketing Teams Channel within 5 minutes with the appropriate message.