cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jestes
New Member

Shoutouts Template - Hardcode an email receipient

I am customizing the Shoutouts Powerapp that MS provides. It is designed to send a shoutout to the receiver, and their manager from Active Directory. I want to hardcode in our Human Resources email into the process so she gets notified when someone sends a shoutout. how would I do this? I imagine it would just be as simple as adding something here on the confirm message screen button.

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
RezaDorrani
Dual Super User
Dual Super User

Hi @jestes 

 

The email is sent from the Confirmation screen and not on click of the button

 

On the OnVisible property of the SendConfirmationScreen

Add your hardcoded email(s) as shown below 

 

// Set email recipients. If shoutout recipient isn't internal, don't search for or include their manager
Set(_emailRecipients, _selectedUser.UserPrincipalName & ";hardcodedemail" &
If(_selectedUser.isInternal || Lower(_selectedUser.CompanyName) = Lower(_myProfile.CompanyName),
";" & Office365Users.Manager(_selectedUser.UserPrincipalName).UserPrincipalName
)
)

 --------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

View solution in original post

2 REPLIES 2
GarethPrisk
Resident Rockstar
Resident Rockstar

Are you sending the email using the Office 365 Outlook connector?

If so, add a CC line and hard-code in the HR email.

https://docs.microsoft.com/en-us/connectors/office365/#send-an-email-(v2)

RezaDorrani
Dual Super User
Dual Super User

Hi @jestes 

 

The email is sent from the Confirmation screen and not on click of the button

 

On the OnVisible property of the SendConfirmationScreen

Add your hardcoded email(s) as shown below 

 

// Set email recipients. If shoutout recipient isn't internal, don't search for or include their manager
Set(_emailRecipients, _selectedUser.UserPrincipalName & ";hardcodedemail" &
If(_selectedUser.isInternal || Lower(_selectedUser.CompanyName) = Lower(_myProfile.CompanyName),
";" & Office365Users.Manager(_selectedUser.UserPrincipalName).UserPrincipalName
)
)

 --------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

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

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (3,296)