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 / Get user profiles (V2)
Power Automate
Unanswered

Get user profiles (V2)

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi,

 

I'm creating a flow to save email attachments and trying to name them after one of the people CC'd. However, when I try to get the user profiles, the flow fails as the string values for the parameters are null. Ultimately, I want to get the two email addresses that are CC'd, and remove one of them to get just one profile (this one to be removed is always the same). Any suggestions on what to do? 

 

hhilla_0-1641388018271.png

 

 

Categories:
I have the same question (0)
  • Expiscornovus Profile Picture
    33,874 Most Valuable Professional on at

    Hi @Anonymous,

     

    In this example you could use a split function to split the two e-mail addresses based on the ; character.

     

    Below is an example:

    In this example I am retrieving the second item by using index [1]. The first could be retrieved via [0]

     

     

     

    split(triggerOutputs()?['body/ccRecipients'], ';')[1]

     

     

     

     

    split_secondcc.png

     

    However, this expression only works if the CC field always contains 2 email addresses. If you want to get a working expression for only 1 e-mail in CC or even when it is empty it needs to be an expression like below.

     

    In this example I am using an empty to check if it is empty and an indexOf to check if there is a ; character (which means it has at least two e-mail addresses).

     

     

    if(empty(triggerOutputs()?['body/ccRecipients']), 'Empty', if(equals(indexOf(triggerOutputs()?['body/ccRecipients'], ';'), -1), triggerOutputs()?['body/ccRecipients'], split(triggerOutputs()?['body/ccRecipients'], ';')[1]))

     

     

     

     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 976

#2
Valantis Profile Picture

Valantis 863

#3
Haque Profile Picture

Haque 547

Last 30 days Overall leaderboard