Skip to main content
Community site session details

Community site session details

Session Id : mxKg8naYr+S8aeN69/9z/8
Power Automate - Building Flows
Answered

Business phone with get User profil V2 for a welcome mail

Like (0) ShareShare
ReportReport
Posted on 13 Oct 2023 07:48:42 by 162

Hello,

 

i have two issue with business phone in Get users profil

 

  1. How to convert the array to a single string, i have only one number by user,  i don't find for get only the number 04 72 10 30 29 without {" "} (example)
  2. Business_phone.JPG

     For my welcome mail i need to give if the phone number is a direct line or only interne line.

A Business phone number with 10 characters is a direct line, a Business phone with only 4 characters is only a interne line.

 

in my message i need to write :

 

Business Phone {Variable Directe or Interne} : 04 72 10 30 29 or only 20 39

 

How to create this variable for write direct or interne ? i think i can use if Business phone number > 4 characters, but how to do this ?

 

Need help please

 

 

 

  • GreguS Profile Picture
    162 on 17 Oct 2023 at 13:26:55
    Re: Business phone with get User profil V2 for a welcome mail

    Perfect, TYVM

  • Verified answer
    Expiscornovus Profile Picture
    32,182 Most Valuable Professional on 17 Oct 2023 at 10:23:10
    Re: Business phone with get User profil V2 for a welcome mail

    Hi @GreguS,

     

    That Business Phones field can contain multiple phone numbers, that is why it is displayed as an array and not as regular text (string).

     

    You can retrieve the first phone number from that array by using an expression with the first function like below:

     

    first(outputs('Get_user_profile_(V2)')?['body/businessPhones'])

     

     

    firstphonenumber.png

     

    You can use a length function (and combine it with ifequals and concat functions) to check how many characters the phone number has and display if it is a direct line or an internal number. I am also using a replace to remove white spaces of the number (makes counting the numbers of the phone number a bit easier).

     

     

    if(equals(length(replace(first(outputs('Get_user_profile_(V2)')?['body/businessPhones']), ' ', '')), 4), concat('Business Phone Interne: ', first(outputs('Get_user_profile_(V2)')?['body/businessPhones'])), concat('Business Phone Direct: ', first(outputs('Get_user_profile_(V2)')?['body/businessPhones'])))

     

     

    direct_intern_if.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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Tomac Profile Picture

Tomac 986 Moderator

#2
stampcoin Profile Picture

stampcoin 699 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 577 Super User 2025 Season 2

Loading complete