Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
ATB1999
Regular Visitor

Setting up a draft email dynamically on each user's clicking on a Power Automate Button

Hi there.

 

For the past days, I have been assessing the feasibility of a workflow on a Power BI report on which I would like your input. Basically speaking:

 

  • I have a Power BI report with a table of data I would like to have into a draft email, in order for incoming users to send the data at their own convenience.
  • The problem is that in setting up the flow, it is not possible to dynamically get the user's clicking on the Power Automate button inbox, always going as a draft into the user that created the flow regardless of who clicks on such button.
  • I have tried other methods such as HTTP draft emails (vs the action Draft Email), but it gets increasingly complex and it is not even able to fetch my own email to send the draft anymore.
  • Would there be a way for such Power Automate button to dynamically get the user' clicking on the button email, so that the person clicking on the Power Automate button receives in its own Outlook a draft message with the table data?

 

Personally speaking, I have browsed the web for quite some time and it looks as if what I am trying to achieve is impossible / has no information anywhere. Nonetheless, I would really appreciate your guidance. For our own sake, let's say my starting ground is the following simple flow:

 

 

Screenshot 2025-05-30 151708.png

 

Achieving such a change would be massive for me, and I'd kindly appreciate any help. Is what I am trying to achieve somehow feasible by any mean? I would love to hear your thoughts!

 

Thank you.

1 ACCEPTED SOLUTION
v-hashadapu
Community Support
Community Support

Hi @ATB1999 , Thank you for reaching out to the Microsoft Community Forum.

 

This isn’t possible using Power BI and Power Automate alone, because flows run under the creator’s account, so actions like drafting an email will always affect your mailbox, not the user's.

 

The only way to draft the email in the clicking user’s inbox is by using the Microsoft Graph API with delegated permissions, which allows actions to run as the signed-in user. You can capture the user’s email in Power BI using USERPRINCIPALNAME(), then pass it to a flow via a button parameter. Inside the flow, format your table as HTML and use an HTTP action to call: POST https://graph.microsoft.com/v1.0/me/messages with a request body that sets isDraft: true. This creates the draft in the signed-in user’s mailbox.

 

To make this work, you'll need to register an Azure AD app with Mail.ReadWrite (delegated) permission and either use a custom connector or trigger the flow from Power Apps, which runs in the user’s context.

 

If this helped solve the issue, please consider marking it “Accept as Solution” and giving a ‘Kudos’ so others with similar queries may find it more easily. If not, please share the details, always happy to help.
Thank you.

View solution in original post

5 REPLIES 5
v-hashadapu
Community Support
Community Support

Hi @ATB1999 , I hope you're doing well! Just checking in to see if you had a chance to review the details shared earlier. If any of the information addressed your needs, feel free to mark it as "Accept as Solution" or give it a 'Kudos' to help others in the community. Please let me know if you have any further questions!

v-hashadapu
Community Support
Community Support

Hi @ATB1999 ,
I hope the information shared was helpful. If you have any additional questions or would like to explore the topic further, feel free to reach out. If any of the responses resolved your issue, please mark it "Accept as solution" and give it a 'Kudos' to support other members in the community.
Thank you!

v-hashadapu
Community Support
Community Support

Hi @ATB1999 ,
I wanted to follow up and see if you’ve had a chance to review the information provided here.
If any of the responses helped solve your issue, please consider marking it "Accept as Solution" and giving it a 'Kudos' to help others easily find it.
Let me know if you have any further questions!

v-hashadapu
Community Support
Community Support

Hi @ATB1999 , Thank you for reaching out to the Microsoft Community Forum.

 

This isn’t possible using Power BI and Power Automate alone, because flows run under the creator’s account, so actions like drafting an email will always affect your mailbox, not the user's.

 

The only way to draft the email in the clicking user’s inbox is by using the Microsoft Graph API with delegated permissions, which allows actions to run as the signed-in user. You can capture the user’s email in Power BI using USERPRINCIPALNAME(), then pass it to a flow via a button parameter. Inside the flow, format your table as HTML and use an HTTP action to call: POST https://graph.microsoft.com/v1.0/me/messages with a request body that sets isDraft: true. This creates the draft in the signed-in user’s mailbox.

 

To make this work, you'll need to register an Azure AD app with Mail.ReadWrite (delegated) permission and either use a custom connector or trigger the flow from Power Apps, which runs in the user’s context.

 

If this helped solve the issue, please consider marking it “Accept as Solution” and giving a ‘Kudos’ so others with similar queries may find it more easily. If not, please share the details, always happy to help.
Thank you.

ibarrau
Super User
Super User

Hi. This is interesting. I'm really not sure if this will work but I was thinking about getting data from the dataset directly after the button. Once the button was clicked, call for executing a query to the semantic model. The DAX query executed could be just

EVALUATE {[MeasureWithUserName]}

That might bring the email back.

The measure it's just MeasureName = USERNAME() or try MeasureName = USERPRINCIPALNAME()

As guide to get started you can check this article (translate it to english) for understanding how query datasets from Power Automate to Power Bi works.

https://blog.ladataweb.com.ar/post/746743853368918016/powerbipowerautomate-enviar-notificación-de

I hope that helps,


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Happy to help!

LaDataWeb Blog

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors
Top Kudoed Authors