Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Business phone with get User profil V2 for a welcome mail

(0) ShareShare
ReportReport
Posted on 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 at
    Re: Business phone with get User profil V2 for a welcome mail

    Perfect, TYVM

  • Verified answer
    Expiscornovus Profile Picture
    31,889 Most Valuable Professional on at
    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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 566 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 516 Super User 2025 Season 1

#3
stampcoin Profile Picture

stampcoin 492