cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
cmurray
Advocate I
Advocate I

Send email from shared mailbox with PowerApps trigger

Hi there,

 

I've searched the community but haven't found a solution that works.

 

I have a button in my PowerApp that triggers a flow to send an email from a shared mailbox. I've used the "Send an email from a shared mailbox (V2)" action (see below). I (and the other two flow owners) have permissions to send from this shared mailbox and are owners of the flow.

cmurray_0-1595903622860.png

When one of us shared mailbox owners trigger the flow in the PowerApp, it sends (fine). BUT, when anyone else triggers the flow in the PowerApp, it throws a '404 - Specified folder not found' error (see below).

cmurray_1-1595903658684.png

I have tried changing the action to "Send an email (V2)" and adding the shared mailbox to the 'From (send as)" section, but when someone who doesn't have access to the shared mailbox triggers the flow in the PowerApp, it throws a '403 - You are not authorized to send mail on behalf of the specified sending account' error (see below).

cmurray_2-1595903864658.png

How can I construct my flow so that emails are sent from a shared mailbox, when triggered in a PowerApp by someone who does not have access to the shared mailbox?

 

Any and all advice would be greatly appreciated, this has stumped me, thanks.

 

Thanks,

Carla

1 ACCEPTED SOLUTION

Accepted Solutions
cmurray
Advocate I
Advocate I

So this was my workaround:

* In PowerApps canvas app, I patch an identifier for the required email template at various button clicks into a the main SharePoint list, into an extra column called "FlowEmail". The identifiers are simply Flow1, Flow2, Flow3a, Flow3b, etc.

* I have a Power Automate flow triggered using "When an existing item is modified" in SharePoint.

* I have a condition that checks if the "FlowEmail" column is null or equal to 'NoEmail'. If yes, then cancel the flow. If no, then switch based on the value in "FlowEmail", and each case has an action to "Send an email from a shared mailbox (V2)".

* After the email is sent, then update the item, changing "FlowEmail" column to 'NoEmail'.

* Not a pretty solution, and runs and cancels a heck of a lot, but it's working. A couple of screenshots are below in case it helps anyone.

 

cmurray_0-1596667845219.png

cmurray_2-1596667954202.png

View solution in original post

4 REPLIES 4
manuelstgomes
Super User II
Super User II

HI @cmurray 

 

The users that are receiving error messages probably don't have access to the shared mailbox and can't send emails from there. 

 

Can you check if that's the case?

 

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

Cheers
Manuel

Hi @manuelstgomes that's correct, they don't have shared mailbox access. Is there still a way (hack / workaround) to achieve this? My whole organisation uses the PowerApp and we want to email notifications/actions/decisions from a shared, central mailbox at key points throughout the app experience.

Hi @cmurray 

 

Yes, I can think of a workaround. It's not pretty, but it could work.

 

When you want to send an email, instead of sending it, store all relevant information in a SharePoint list. Then, have another Power Automate running on the account of a person that has access to that shared account and trigger once a new item is created.

 

Then you can have your emails being sent by everyone. Don't forget to grant access to everyone needed to that list.

 

Please note that this may be a source of trouble since inserting in a list will trigger an email to everyone. Be aware of this.

 

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

Cheers
Manuel

cmurray
Advocate I
Advocate I

So this was my workaround:

* In PowerApps canvas app, I patch an identifier for the required email template at various button clicks into a the main SharePoint list, into an extra column called "FlowEmail". The identifiers are simply Flow1, Flow2, Flow3a, Flow3b, etc.

* I have a Power Automate flow triggered using "When an existing item is modified" in SharePoint.

* I have a condition that checks if the "FlowEmail" column is null or equal to 'NoEmail'. If yes, then cancel the flow. If no, then switch based on the value in "FlowEmail", and each case has an action to "Send an email from a shared mailbox (V2)".

* After the email is sent, then update the item, changing "FlowEmail" column to 'NoEmail'.

* Not a pretty solution, and runs and cancels a heck of a lot, but it's working. A couple of screenshots are below in case it helps anyone.

 

cmurray_0-1596667845219.png

cmurray_2-1596667954202.png

View solution in original post

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

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.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,557)