I tried to use a mail alias for my office 365 account in Flow.
Example: The mail account would be email@example.com, and the alias firstname.lastname@example.org.
Now I would like to create a flow that only starts an action when a mail is sent to email@example.com.
However, the "To" field in the Flow mail action or also in the condition only uses the full firstname.lastname@example.org.
Any ideas how to make use of a mail alias in Flow?
Which Email action you used?
Office 365 Outlook, or something else?
Would you please share your flow running details here for further investigation?
Thanks for your reply! Yes it is the Office 365 Outlook action. The flow itself does not fail, the action works fine.
There are actually two issues:
My first approach was in the Office 365 Outlook action to enter the alias (e.g. email@example.com) into the "to" field.
When I sent a mail to this address it will of course appear in my Outlook inbox. But the flow will not start as it does not use this alias as a trigger. By the way, "flowtest" would be the Office 365 tenant here. It seems although the alias is used to send mails to, in the inbox or by flow "To" appears as "firstname.lastname@example.org". Therefore, the trigger does not start the flow.
My second approach was to use the full mail address in the Flow Outlook action. Afterwards I added a condition where I added "To contains email@example.com". Same here, the condition check will result in "false", so again it seems that the "To" field contains the full mail address instead of the alias.
We would like to use one Office 365 account with three aliases to add SharePoint list items into three different lists (one for each country). Depending on the alias used the list item is created in the list for Germany, Austria or Switzerland.
(by the way - using this as a workaround for the missing functionality in SharePoint lists to enable mailing to a list. The customer used this in SharePoint 2013, now we have to find a replacement for this).
The To field should use the Alias.
In addition to the alias, have you tried to enter the firstname.lastname@example.org as the input to check?
Besides, if the email address is within the organization, we could just enter the full name of the person, and there would be dropdown to match Email Address as below:
Just choose the corresponding item listed should work here.
For the Email address that is out of your organization, type the full mail address (Alias) should work.
Let me know if this works.
sorry for the late answer - long weekend 😉
Actually the To field does not recognize the alias. If I use it and a mail is sent to the alias, the flow is not started. That's my main problem here. I will try to solve it differently for the customer now not trying to use an alias.
But thanks for your help anyway!
I created a workaround to make such flow possible:
First, you have to create folder/subfolder for each alias.
Second, using Mail settings create rules; I created a rule for each alias (partialy suggested here https://365lab.net/2014/01/02/quick-tip-mail-flow-rules-for-alias-email-addresses-in-exchange-online... but that scenario was not possible to implement in my case) using Settings -> Mail -> Mail/Automatic processing/Inbox and sweep rules,
with condition: message contains in the message header (your alias)
and action: move the message to folder (your folder/subfolder).
Then, we can pinpoint Flow to the subfolder where the message from above rule lands and voila!, it's working.
EDIT: Of course Flow will still not recognize alias in the [To] fields, so this condition should be removed on the Flow side (as it was processed pre-Flow).
But I have to say, it is unfortunate that Flow has so many limitations; one would think Mail/Exchange rules and access to available details (like Message-Header data) should be just simply copied from Mail settings.
Unfortunately it does not work (Mail/Exchange rules) when email is sent FROM Outlook/Office365 - it seems Microsoft replaces alias with main address on the fly and it is not included in the header. 😞
It is not a Flow/Azure logic problem, it is an Exchange Online behaviour; it simply replaces on the fly alias address with connected account address, so nowhere in the message header there is an alias name used, or at least it works that way within one organization - I had no problem with Account Mail Rules or MailFlow Exchange Rules working perfectly when email was sent from Google to the alias..
I kind of created a workaround:
Distribution list with one member - it is the only solution that works the same way and is simply managable.
I just did not want to create as many email accounts as aliases - it's againt how IT should work 🙂
There are still many early issues with Flow, though, like you can't set "Reply-To" header info, only "From" (which is depending on users being WITHIN domain and Exchange). I would also love for Flow to be able to also search the full email headers, not only those few fields it has right now, so I would not have to use MailFlow Exchange Rules in other flows.
But is is outside of this thread.
I have the same issue.
I need to create well over 100 aliases for one mailbox and make Flow put mail attachments in a Sharepoint folder named according to the alias used (I would like to create an email dropbox for department scanners that forwards attachments to the right SharePoint Online folder).
I'm not sure that is an Exchange On Line problem, in the raw email text I can find the right "To:email@example.com" row, but Flow parser populate the "To:" field with primary address. That's a bug, in my opinion. At least, OWA behaves in the expected way.
@v-micsh-msft could you please help me? Is Trigger behaviour buggy or the expected result? I need to create a flow that dinamically put attachment in the right SP directory, based on the destination address.
The only way i fount was "Export email" and there search the string To: MyAlias@myDomain.com
it is not possible to parse the Message/Internet Header
(the first TO: is the primarymailaddress from the Mailbox)
Three Super User rank tiers have been launched!
Features releasing from October 2020 through March 2021
We've updated and improved the layout and uploading format of the Power Automate Cookbook!
Fill out a quick form to claim your user group badge now!