cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
GiZmO
Level: Powered On

triggerBody()?['DisplayName']) ?

Hi

 

I create 2 folders in flow with the following expression

 

concat('/Site/',utcNow('dd-MM-yyyy'),'/',triggerBody()?['From'])

 

Is it possible to change the ['From'] which is creating a folder called EmailAddress to DisplayName instead? This particular SharePoint site will be shared with a partner but I dont want them seeing personal email addresses

 

I thought this would work from reading another post

concat('/Site/',utcNow('dd-MM-yyyy'),'/',triggerBody()?['DisplayName'])

 

But that part of the expression is skipped.

 

Thanks in advance

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: triggerBody()?['DisplayName']) ?

Hi @GiZmO ,

 

To get the DisplayName, you need another action Get user profile (V2). Then replace the dynamic content “From” with “DisplayName” from the action Get user profile (V2).

 

Function used in the Compose action is:

concat('/Library11/',utcNow('yyyy-MM-dd'),'/',body('Get_user_profile_(V2)')?['displayName'])

 

An image for your reference:

1.PNG

 

Best regards,

Mabel

 

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Super User
Super User

Re: triggerBody()?['DisplayName']) ?

Please review the Reference for trigger and action types in Workflow Definition Language for Azure Logic Apps and the Functions reference documentation.  

triggerBody() returns literally the body of the action that initiated the logic app (behind the scenes those triggers will be an web request, with headers, and body). Please review the Flow Syntax for SharePoint Columns (blog post) which will hopefully shed some light on what syntax you can use with triggerbody()

If you could provide an expanded screenshot of your Flow and steps, and of any detailed error messages you're receiving we could likely better assist you.

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Community Support Team
Community Support Team

Re: triggerBody()?['DisplayName']) ?

Hi @GiZmO ,

 

To get the DisplayName, you need another action Get user profile (V2). Then replace the dynamic content “From” with “DisplayName” from the action Get user profile (V2).

 

Function used in the Compose action is:

concat('/Library11/',utcNow('yyyy-MM-dd'),'/',body('Get_user_profile_(V2)')?['displayName'])

 

An image for your reference:

1.PNG

 

Best regards,

Mabel

 

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 169 members 5,453 guests
Please welcome our newest community members: