web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Get email "from" when ...
Power Automate
Unanswered

Get email "from" when alias was used.

(0) ShareShare
ReportReport
Posted on by

Hi,

I have a shared mailbox with multiple alias. When someone send an e-mail to the shared mailbox using one of the alias, I would like to know which alias was used to send email. My flow receive the email but return the primary shared mailbox address as the "To" and not the alias used by the sender. Is there a way to get this info? 

 

Thanks.

Categories:
I have the same question (0)
  • Verified answer
    MC-09121519-0 Profile Picture
    on at

    Ok, I found 2 solutions. 1 is to use the "export mail content activity" where I can find the "To: [alias]". However, the syntax is not always consistent from different mail providers so can be hard to parse correctly.

    2. I decided to create a distribution list for each of my alias and put the shared mailbox address in them. Now if someone send an email to the distribution list address, the new mail action will return the distribution list email address instead of the shared mailbox address.  

  • VictorIvanidze Profile Picture
    13,073 on at

    Hi @CoupalM, you wrote:

    > However, the syntax is not always consistent from different mail providers so can be hard to parse correctly. 

    The syntax of what? The SMTP address syntax is quite "consistent".

  • MC-09121519-0 Profile Picture
    on at

    There are just some small differences, nothing major but need to take into account when parsing the email address.

     

    Here is what the export activity is returning from an outlook/exchange message:

    \r\nTo: \"alias@contoso.com\" <alias@contoso.com>\r\n

     

    Here is what the export activity is returning from a GMail message
    \r\nTo: alias@contoso.com\r\n

  • VictorIvanidze Profile Picture
    13,073 on at

    You can always find last @ in the string and after that detect start and end of SMTP address.

  • PaulCONeil Profile Picture
    6 on at

    It's been a while but I was wondering if you would provide more details/clariifications.    

    1. Are you referring to the Export mail (exchange connector) action?  If so, I seem to be getting Forbidden when attempting to use that action, despite being a member of the group that owns the mailbox, did you have to make any permissions changes to group/exchange to get that to work?

    2. What is the mail ID that you're using when fetching the mail?  ConversationID, ThreadID, PostID?

  • VictorIvanidze Profile Picture
    13,073 on at

    Hi @PaulCONeil

    could you please show your flow with "forbidden" error? 

  • PaulCONeil Profile Picture
    6 on at

    See attached.  The I've tried to use the Conversation ID, Thread ID, and Thread Post ID and am getting the same result (Forbidden/group shard).   All I'm trying to do is determine the "To" address (would be an alias for the group) that the email is coming in with because I wanted to have the flow branch depending on which email address was used.

  • VictorIvanidze Profile Picture
    13,073 on at

    It looks you are trying to retrieve something from a group mailbox., not from a shared mailbox.

    Correct?

  • PaulCONeil Profile Picture
    6 on at

    Yes that is correct.    Was hoping that I could give a group mailbox a few aliases and that the flow would trigger on receipt of an email to any of them.    Then I could determine which alias the email was sent to and have different logic/targets based on the alias it was sent to.   I can't find any actions that would allow me to determine the alias of the email so I thought I would try the export suggestion provided here.

  • VictorIvanidze Profile Picture
    13,073 on at

    I think the only way to do what you want is using GRAPH API.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard