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

Get user profiles (V2)

(0) ShareShare
ReportReport
Posted on by

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,194 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

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
Michael E. Gernaey Profile Picture

Michael E. Gernaey 503 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 321 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard