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

Trigger email from user raising SharePoint request

Hello,

I have created PowerApps application to trigger email whenever any new item is added to SharePoint list. BUT, this email is coming out of my email id or outlook. I am now moving out of the role and would like to see the emails being triggered from users adding the request to SharePoint list i.e. created by. Cannot use "Mail" connector as it is blocked under organization policies.

To summarise, process should be
1. User open PowerApps (already in place)

2. Fills form and submit request (already in place)

3. Form is linked to SharePoint list which creates new item. All data updated in PowerApps is saved to new item in SharePoint list. (already in place)

4. Notification email is triggered to requestor. At present mail is being triggered from my outlook (needs update to trigger email from requestor inbox)

5. Based on scenario mentioned in form, approval email is triggered to Approver.

6. Approver comments send to group. Currently my outlook is being used to process this. ( Needs update to send it from item created by user)

Do let me know if there are any doubts.

Thanks,
AK
1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Trigger email from user raising SharePoint request

@AKB_2K 

My suggestion would be to setup what is called a "Service Account" in Office 365 to handle all email notifications from your apps.  Instead of emails coming out of your Outlook account they can come from a generic mailbox such as  "AppNotifcations@yourcompany.com".  If the receiver must know who the notification was "sent by" you can put this information in the body of the email.  Doing this will future-proof your Flows because you do not have to change the mailbox each time a person switches into a new roles.

 

To implement this you will need to build a SharePoint List called "(Your App Name) Messages".  There should be at least 5 columns: EmailTo, EmailCC, EmailBCC, Email Title, EmailBody.  To generate an email you would PATCH a new record into the messages list.  Then you would setup a Flow with the trigger "When A New Item Is Created In A SharePoint List" and send an email using information contained within that item.  The Outlook 365 Connector would be used to handle emails in the Flow.

 

Let me know your thoughts on this.

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

4 REPLIES 4
Dual Super User
Dual Super User

Re: Trigger email from user raising SharePoint request

I assume you are using Power Automate to send the email.  If you are then there is no way to change who the email is sent by. It will be send by whatever user creates the flow and authenticates the connector.  The only time you can choose who sends the email is to use the action that sends the email from a shared mailbox. 



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Super User
Super User

Re: Trigger email from user raising SharePoint request

@AKB_2K 

My suggestion would be to setup what is called a "Service Account" in Office 365 to handle all email notifications from your apps.  Instead of emails coming out of your Outlook account they can come from a generic mailbox such as  "AppNotifcations@yourcompany.com".  If the receiver must know who the notification was "sent by" you can put this information in the body of the email.  Doing this will future-proof your Flows because you do not have to change the mailbox each time a person switches into a new roles.

 

To implement this you will need to build a SharePoint List called "(Your App Name) Messages".  There should be at least 5 columns: EmailTo, EmailCC, EmailBCC, Email Title, EmailBody.  To generate an email you would PATCH a new record into the messages list.  Then you would setup a Flow with the trigger "When A New Item Is Created In A SharePoint List" and send an email using information contained within that item.  The Outlook 365 Connector would be used to handle emails in the Flow.

 

Let me know your thoughts on this.

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

AKB_2K
Level: Powered On

Re: Trigger email from user raising SharePoint request

Looks like this is the only way out. It's quite surprising that when I trigger the flow directly from PowerApps for a scenario like Item update in that list, it sends email from user making the change but in this case we have to go via the service account route. Microsoft should have made it consistent across the board.

 

Thanks for your help though.

 

AK

Dual Super User
Dual Super User

Re: Trigger email from user raising SharePoint request

If the Flow is triggered directly from Power Apps then it runs in the context of the user who triggered the flow.  If it is triggered automatically by something like creating a record then it runs in the context of the user who created the flow.  That's why the email is sent out under that account.  It is consistent.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

New Badges

Check it out!

thirdimage

Power Apps Community User Group Member Badge

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

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors
Users online (6,113)