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
Super User

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.

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
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,386)