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 / Index Of expression l ...
Power Automate
Answered

Index Of expression l To get company name from sender's email

(0) ShareShare
ReportReport
Posted on by 26

Hi!

 

I would like to get company name from the sender's mail. I've been using 'indexOf' expression, but it is giving me a number as result, instead of the name. By any chance, is there any other expression I can use?

 

Example:

-Email: flor.flores@random.com

-Expected result: random

-Result: 11

 

Any help would be greatly appreciated

Thank you, best regards!

 

My flow:

KorinaHdz24_6-1717533746558.png

 

KorinaHdz24_0-1717533544816.png

 

KorinaHdz24_2-1717533558859.png

 

KorinaHdz24_3-1717533572478.png

 

KorinaHdz24_4-1717533586786.png

Expression: sub(outputs('Last_IndexOF_(Compose)'),outputs('IndexOF_(Compose)'))

 

KorinaHdz24_5-1717533596906.png

Expression: substring(variables('varTexto'),outputs('IndexOF_(Compose)'),outputs('Characters_number_(Compose)'))

Categories:
I have the same question (0)
  • Chriddle Profile Picture
    8,464 Super User 2025 Season 2 on at

    Email addresses are tricky 😉 

     

    Some issues that you might encounter:

     

    Address with subdomains:

     

    jim@salesdepartment.example.com
    jim@example.co.uk

     

     Do you want the 2nd level domain or the 3rd level?

     

    Address with IP:

     

    jim@[192.168.2.1]

     

    Fortunately, this does not happen often.

     

    Address with International domain name (->Punycode)
    I have no experience with this, but it looks like a lot of fun🤣

     

    And many more

     

    What I'm trying to say is: don't always expect to get the result you want.

  • Verified answer
    SudeepGhatakNZ Profile Picture
    14,394 Most Valuable Professional on at

    @KorinaHdz24 

    Use this expression

    first(split(last(split(variables('MyString'),'@')),'.'))
     

    SudeepGhatakNZ_0-1717537333062.png

     

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
David_MA Profile Picture

David_MA 245 Super User 2025 Season 2

#2
Expiscornovus Profile Picture

Expiscornovus 207 Most Valuable Professional

#3
trice602 Profile Picture

trice602 185 Super User 2025 Season 2

Last 30 days Overall leaderboard