cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ypetrov123
Regular Visitor

Setting user email who started a flow with powerapp as variable

Hello,

 

I have a simple PowerApp with a date picker and a submit button which triggers a PowerAutomate flow. In addition to the date selected in the app, I also need the email of the user who pressed the button that triggers the flow as variable in order to set them as a recipient of an email notification that occurs later in the flow.

 

I am drawing a blank on how to pull the user email so I would really appreciate some ideas on how to get this done.

 

Regards,

 

Yordan

1 ACCEPTED SOLUTION

Accepted Solutions
v-litu-msft
Community Support
Community Support

Hi @ypetrov123,

 

You could add the User().Email into the PowerAppsbutton.Run() expression, then accept the user email on the Power Automate side:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-user

 

There is a post with a similar requirement, you could refer to it:

https://powerusers.microsoft.com/t5/Building-Flows/Power-Apps-Flow-button-run-statement-problems/m-p...

 

Best Regards,
Community Support Team _ Lin Tu
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

6 REPLIES 6
ChristianAbata
Super User II
Super User II

hi @ypetrov123  you need to know how to get the email from the user who press the power automate button?



Did I answer your question? Please consider to Mark
my post as a solution! to guide others :winking_face:

Proud to be a Flownaut!


If you want you can follow me at www.christianabata.com Quieres contenido en español? Síguenos en Power Automate LA
v-litu-msft
Community Support
Community Support

Hi @ypetrov123,

 

You could add the User().Email into the PowerAppsbutton.Run() expression, then accept the user email on the Power Automate side:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-user

 

There is a post with a similar requirement, you could refer to it:

https://powerusers.microsoft.com/t5/Building-Flows/Power-Apps-Flow-button-run-statement-problems/m-p...

 

Best Regards,
Community Support Team _ Lin Tu
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

Hi @v-litu-msft,

 

My current OnSelect expression for the button is:

 

PA3_Task_Notification_orig2.Run(DatePicker1.SelectedDate);Notify("Notification process started sucessfully !!!");

 

Could you please tell me where I need to add the User().Email so that I can combine with the expression from above?

 

Regards,

 

Yordan

Hi @ypetrov123,

 

PA3_Task_Notification_orig2.Run(DatePicker1.SelectedDate,User().Email);Notify("Notification process started sucessfully !!!")

 

Before adding it, remove the Flow then add it back and past the above expression again.

 

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

Hi @v-litu-msft,

 

I get the following error when I paste the expression (after I have removed the connection to the flow and added it again):

ypetrov123_1-1597754597848.png

Regards,

 

Yordan

Hi @ypetrov123,

 

I assume the Flow just only one compose or variable action to accept the parameters get from powerApps, please add one more like this:

Annotation 2020-08-19 163707.jpg

 

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

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (1,703)