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 / Dynamic Content for Gi...
Power Automate
Answered

Dynamic Content for Givenname

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello, everybody,

I am currently revising the PowerApps "Expense Report" and the associated flow "ApproveExpense".

If the approver receives a new expense report for approval and then approves or rejects it, an automatically generated e-mail is sent to the employee.

In this e-mail I would like to address the employee by his or her first name,

so "Hello Mike" and not "Hello Mike Miller"

But at the moment only the Dynamic Content items('Applay_to_each')?['Author']?['DisplayName'] is available to me.

How can I create a new Dynamic Content with items('Applay_to_each')?['Author']?['GivenName']?

Or is it possible to address a variable that I set in PowerApps again in the flow:

Set(varGivenName; ‘Office365Users’.MyProfile().GivenName)

Thanks a lot

 

Herb

Categories:
  • efialttes Profile Picture
    14,756 on at

    Hi!

    You can get email address by means of 

    items('Apply_to_each')?['Author']?['Email']

    right?

    If so I would suggest to add 'Get user profile' action block

    https://docs.microsoft.com/en-us/connectors/office365users/#get-user-profile-(v2)

    assign email as its input, look for 'Given name' in the Dynamic content menu since it is one of 'Get user profile' outputs

    Not with my laptop, couldn't test it yet

    Hope this helps

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    I don't quite understand your approach yet. I have now inserted myself between "Get items" and "Apply to each" -> Get user profile and selected givenname as field. How do I proceed now, what do I enter in the e-mail text after the "hello ...." concretely to ? Sorry, I am still a complete beginner with PowerApps and Flow.

  • efialttes Profile Picture
    14,756 on at

    Hi!

    You almost got it

    Move 'Get user profile' inside 'Apply to each, please

    Thanx!

  • efialttes Profile Picture
    14,756 on at

    Flow_GivenNames.png

    Hope this helps

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Frustration !
    I have played through both variants several times now, but I keep getting an error message.

    I work with a German Office365 account and enter the German word for given name,
    but I have also tried different spellings in English (Givenname, GivenName, Given Name).

    One bug ???

    Error.JPG

     

  • efialttes Profile Picture
    14,756 on at

    I think th error means... you need to save and force flow execution from new real data, if you try to run it from Test->'From previous runs' it will not work since you added a new connector and you need to approve its addition

    Hope this helps

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    I give up now!

    I've spent hours now trying all kinds of things: Flow saved, app saved, PC restarted, Flow only accessed via the app etc., everything multiple times.

    I get the same error message over and over again. Such a waste of time for such a trivial thing.🤔

    I am now convinced that this is a bug in the conversion from English to German. It would be good if a Microsoft developer could have a look at it.

    I'm now planning on weeks instead of days for the completion of my flow.🙄

    But thanks again for your support.

     

    Herb

  • Verified answer
    efialttes Profile Picture
    14,756 on at

    Hi!

    Not sure if the solution to the problem you found is the same as the one one reported here

    https://powerusers.microsoft.com/t5/General-Power-Automate/ERROR-IN-FLOW-WHEN-I-CREATE-AN-APPROVAL-ACTION/td-p/213410

    Hope this helps

  • v-bacao-msft Profile Picture
    Microsoft Employee on at

     

    Hi @Anonymous ,

     

    It is a common issue when we add a new connector in the existing flow which uses a PowerApps button as the trigger.

    You could remove the flow from the app and re-add it again, the problem will be solved.

    Please check this similar thread:

    https://powerusers.microsoft.com/t5/General-Power-Automate/Flow-Error/td-p/352714

    Please try again and feel free to let us know if you have any other questions.

     

    Best Regards,

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @efialttes and @v-bacao-msft,

    That's how it worked now. Flow once out and back in, now it works.

    I was this close to giving that up.

    Thanks again for your help.

    Now I'm going to move on to the next task. Read a SharePoint list, filter it at "Get Items" and put it into an array, then read the array in a For..each loop and output it in the approval email. Will be fun for sure.

    I will get back to you if I can't handle it.

     

    Herb

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 321 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 244

#3
Henil Profile Picture

Henil 102

Last 30 days Overall leaderboard