cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
phearin
Helper III
Helper III

Building PowerApps Email Template

Dear Team,

 

I want to create email template where I could allow to click on SEND button and it will send the email to respective recipient.

Is it doable in the PowerApps? 

To: {the email address}

 Title: {Text}

Body:{Text}

 

phearin_0-1595988007741.png

 

 

Thanks,

Phearin

2 ACCEPTED SOLUTIONS

Accepted Solutions

Hi @phearin ,

 

Use this email structure see if that works for you or not:

Microsoft365Outlook.SendEmail(
       "email address here",
       "Subject", 
       "<font size=10> Bell Customer Report</font><br> <b>Customer ForeName: </b>"& textInput1.Text & "<br><b>Customer Surname: </b>"& customerName.Text, 
        {
           IsHtml:true,
           Importance: "Normal"
       }
)


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
Krishna
If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
KrishnaV
Business Applications MVP, Microsoft Certified Trainer
Twitter | Linkedin | YouTube | GitHub
If this post helps you give a and if it solved your issue consider Accept it as the solution to help the other members / new members of the community.

View solution in original post

v-xida-msft
Community Support
Community Support

Hi @phearin ,

Does the "To" ComboBox connect to a Person column in your SP List?

Do you want to generate your email content automatically based on the selected option within the ComboBox, the Title Text Input value, and Details Text Input Box?

 

I have made a test on my side, please consider try the following workaround:

8.JPG

 

9.JPG

 

10.JPG

Set the OnSelect property of the "Send Email" button to following:

Microsoft365Outlook.SendEmailV2(
                                ComboBox1.Selected.Email,
                                SubjectBox.Text,
                                "Dear " & ComboBox1.Selected.DisplayName & ", <br/>" & RichTextEditor1.HtmlText
)

 

If you want to select multiple person in your "To" ComboBox, please modify above formula as below:

Microsoft365Outlook.SendEmailV2(
                                Concat(ComboBox1.SelectedItems, Email & ";"),
                                SubjectBox.Text,
                                "Dear " & Left(
                                                Concat(ComboBox1.SelectedItems, Email & "&"),
                                                Len(Concat(ComboBox1.SelectedItems, Email & "&"))-1
                                          ) & ", <br/>" & RichTextEditor1.HtmlText
)

 

Please try above solution, hope it could solve your problem.

 

Regards,

Community Support Team _ Kris Dai
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
KrishnaV
Super User III
Super User III

Hi @phearin ,

 

Yes, you can 100% do it.

Add Microsoft365Outlook connector.

Microsoft365Outlook.SendEmailV2("email","subject","Body")

 
I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
Krishna
If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
KrishnaV
Business Applications MVP, Microsoft Certified Trainer
Twitter | Linkedin | YouTube | GitHub
If this post helps you give a and if it solved your issue consider Accept it as the solution to help the other members / new members of the community.

@KrishnaV ,

 

Thank you for your solution, but I want to make our email template more dynamic where we can customize the body content, not just only text? 

 

For example, Dear Sir/Madam, in this section we want to use data from email or SP list content instead of typing manually. 

The body section also can break the line, as in the example for the solution, it will send with single line of text without hierarchy. 

I meant the format of email not professional.

 

Please advise.


Thanks,

Phearin

Hi @phearin ,

 

Use this email structure see if that works for you or not:

Microsoft365Outlook.SendEmail(
       "email address here",
       "Subject", 
       "<font size=10> Bell Customer Report</font><br> <b>Customer ForeName: </b>"& textInput1.Text & "<br><b>Customer Surname: </b>"& customerName.Text, 
        {
           IsHtml:true,
           Importance: "Normal"
       }
)


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
Krishna
If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
KrishnaV
Business Applications MVP, Microsoft Certified Trainer
Twitter | Linkedin | YouTube | GitHub
If this post helps you give a and if it solved your issue consider Accept it as the solution to help the other members / new members of the community.

View solution in original post

v-xida-msft
Community Support
Community Support

Hi @phearin ,

Does the "To" ComboBox connect to a Person column in your SP List?

Do you want to generate your email content automatically based on the selected option within the ComboBox, the Title Text Input value, and Details Text Input Box?

 

I have made a test on my side, please consider try the following workaround:

8.JPG

 

9.JPG

 

10.JPG

Set the OnSelect property of the "Send Email" button to following:

Microsoft365Outlook.SendEmailV2(
                                ComboBox1.Selected.Email,
                                SubjectBox.Text,
                                "Dear " & ComboBox1.Selected.DisplayName & ", <br/>" & RichTextEditor1.HtmlText
)

 

If you want to select multiple person in your "To" ComboBox, please modify above formula as below:

Microsoft365Outlook.SendEmailV2(
                                Concat(ComboBox1.SelectedItems, Email & ";"),
                                SubjectBox.Text,
                                "Dear " & Left(
                                                Concat(ComboBox1.SelectedItems, Email & "&"),
                                                Len(Concat(ComboBox1.SelectedItems, Email & "&"))-1
                                          ) & ", <br/>" & RichTextEditor1.HtmlText
)

 

Please try above solution, hope it could solve your problem.

 

Regards,

Community Support Team _ Kris Dai
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

@KrishnaV 

 

Thank for your enhancement, the solution works. 


Thanks,

Phearin

@v-xida-msft 

 

Could you please assist me if I use richtext editor, is there anyways to put the hyperlink where it is able to link with dynamic filed in SP list? 

 

If not, is there anyways to get it done?  

 

 

Thanks,

Phearin

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

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.

Carousel April Dunnam Updated 768x460.jpg

Urdu Hindi D365 Bootcamp

Dont miss our very own April Dunnam’s The Developer Guide to the Galaxy! Find out what the Power Platform has to offer for the traditional developer.

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