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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Parse Email body and i...
Power Automate
Unanswered

Parse Email body and identify Client Email

(0) ShareShare
ReportReport
Posted on by 1,123

My Email body could contain conversation between 1 client domain(ex @clientdomain.com) and 1 vendor domain(ex @vendordomain.com). We could have several emails in a day from different clients (@clientdomain1, @clientdomain2 etc) but each email conversation could have only 1 client. Vendor domain is always @vendordomain.com. I need to parse each email once forwarded to a shared mailbox and get the email of the client (ex clientname@clientdomain.com). The email can be initiated by anyone (client or vendor). I would like to separate vendor emails having @vendordomain.com and get the distinct and unique client email. It could be anything like client@clientdomain1.com, client@clientdomain2.com . 

 

I am struggling a bit to write down the expression to fetch client email. Can someone please help.

 

@RezaDorrani 

Categories:
I have the same question (0)
  • VictorIvanidze Profile Picture
    13,081 on at

    Could you provide an example of email?

  • rameshmukka Profile Picture
    1,123 on at
    From: Client Name <abc@clientdomain.com>
    Date: Monday, 4 November 2019 at 16:45
    To: Vendor Name <xyz@vendordomain.com>
    Cc: Vendor Name2 <xyz1@vendordomain.com>
    Subject: RE: A sample subject
    
    This is sample body
     
    Best regards,
    
     
     
    Client Name | COO & Managing Director
    Skype | abc@clientdomain.com
     
    From: Vendor Name <xyz@vendordomain.com> 
    Sent: 04 November 2019 09:11
    To: Client Name <abc@clientdomain.com>
    Cc: Vendor Name2 <xyz1@vendordomain.com>
    Subject: Re: A sample subject
     
    This is sample body
     
    Vänlig hälsning / Best regards, 
     
    Vendor Name 
    Partner 
    
    xyz@vendordomain.com
    vendordomain.com 
     
     
     
     
    Från: Vendor Name <xyz@vendordomain.com>
    Datum: torsdag 24 oktober 2019 11:31
    Till: Client Name <abc@clientdomain.com>
    Kopia: Vendor Name2 <xyz1@vendordomain.com>
    Ämne: Re: A sample subject
     
    This is sample body
     
    Vänlig hälsning / Best regards, 
     
    Vendor Name 
    Partner 
    
    xyz@vendordomain.com
    vendordomain.com 
     
     
     
    Från: Client Name <abc@clientdomain.com>
    Datum: torsdag 24 oktober 2019 11:10
    Till: Vendor Name <xyz@vendordomain.com>
    Kopia: Vendor Name2 <xyz1@vendordomain.com>
    Ämne: RE: A sample subject
     
    This is sample body
     
     
    Best regards,
    
     
     
    Client Name | COO & Managing Director
    Skype | abc@clientdomain.com
     
    From: Vendor Name <xyz@vendordomain.com> 
    Sent: 21 October 2019 13:48
    To: Client Name <abc@clientdomain.com>
    Cc: Vendor Name2 <xyz1@vendordomain.com>
    Subject: Re: A sample subject
     
    This is sample body
     
    Vendor Name 
    Partner 
    
    xyz@vendordomain.com
    vendordomain.com 
     
     
     
    Från: Vendor Name <xyz@vendordomain.com>
    Datum: onsdag 28 augusti 2019 09:47
    Till: Client Name <abc@clientdomain.com>, Vendor Name2 <xyz1@vendordomain.com>
    Kopia: Rema Abou Ali <rema.abo@vendordomain.com>, Vendor Payments <payments@clientdomain.com>
    Ämne: Re: A sample subject
     
    This is sample body
     
    Vendor Name 
    Partner 
    
    xyz@vendordomain.com
    vendordomain.com 
     
     
     
    Från: Client Name <abc@clientdomain.com>
    Datum: onsdag 28 augusti 2019 09:30
    Till: Vendor Name <xyz@vendordomain.com>, Vendor Name2 <xyz1@vendordomain.com>
    Kopia: Rema Abou Ali <rema.abo@vendordomain.com>, Vendor Payments <payments@clientdomain.com>
    Ämne: RE: A sample subject
     
    This is sample body
     
     
    Best regards,
    
     
     
    Client Name | COO & Managing Director
    Skype | abc@clientdomain.com
     
    From: Vendor Name <xyz@vendordomain.com> 
    Sent: 27 August 2019 16:28
    To: Vendor Name2 <xyz1@vendordomain.com>
    Cc: Client Name <abc@clientdomain.com>; Rema Abou Ali <rema.abo@vendordomain.com>; Vendor Payments <payments@clientdomain.com>
    Subject: Re: A sample subject
     
    This is sample body
     
    Thanks!
    Best regards, 
    Nils 

    Here is the sample email. The domain @clientdomain.com can be anywhere in the email (beginning, ending or somewhere in the middle). I just need the values "abc@clientname.com" and "clientname".

     

  • VictorIvanidze Profile Picture
    13,081 on at

    And what do you want to get after parsing this email thread -

    1) only abc@clientdomain.com

    or

    2) abc@clientdomain.com and payments@clientdomain.com

     

    One client address or more than one?

     

  • rameshmukka Profile Picture
    1,123 on at

    @VictorIvanidze Thank you for 1st of all looking into it. I would like to have abc@clientdomain.com

  • VictorIvanidze Profile Picture
    13,081 on at

    How can you distinguish  abc@clientdomain.com from payments@clientdomain.com?

    I mean after ignoring all addresses with domain part @vendirdomain.com you'll get 2 addresses with domain part @clientdomain.com. As in your example only abc@clientdomain.com is both in the From: and in the To:/CC: fields you can decide that only abc@clientdomain.com is what you want. Am I correct? 

  • rameshmukka Profile Picture
    1,123 on at

    You are correct! In the case where we see 2 client emails @clientdomain.com, I am ok to take 1st occurrence of it. Either of them should work.

  • VictorIvanidze Profile Picture
    13,081 on at

    Well, now you can start to create the flow - good luck!

  • rameshmukka Profile Picture
    1,123 on at

    I did not understand. Can you give me some steps here? How do I capture all emails and ignore @vendordomain.com?

  • VictorIvanidze Profile Picture
    13,081 on at

    Sorry I believe I gave you enough info. I haven't got enough  time to provide step-by-step instructions.

  • rameshmukka Profile Picture
    1,123 on at

    I think there is a confusion. What info you are talking about. I only described my issue. Did I miss any tip from you?

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 474

#2
11manish Profile Picture

11manish 268

#3
David_MA Profile Picture

David_MA 243 Super User 2026 Season 1

Last 30 days Overall leaderboard