cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
TheCalebG
Frequent Visitor

Show HTML text here (only on first submission)

Problem: First email from PowerApps form is showing "Show HTML text here". The odd part is this is only happening on the first submission. Any other submissions go through as expected.

I've created a powerapps form for internal use. The form is basic requiring certain fields to be selected before a response can be sent. From there, I have conditions based on what is selected to send an email using "Office365Outlook.SendEmail". I made a separate page to draft the body of the email using an HTML textbox, and referencing them in the OnSelect property of Submit Button.

 

Below is the HTML body that is getting sent:

TheCalebG_0-1596819560404.png

Below is OnSelect Submit Button:

TheCalebG_1-1596819702978.png

 

Has anyone else had any issues with this and how can I fix? I was originally using Flow to send an email when a new item was created in sharepoint; however, the emails were coming from my own since I setup the flow with the submitter copied. I would prefer the powerapps option if I can get it to work 100% of the time! 

Please help!

6 REPLIES 6
krishnags
Responsive Resident
Responsive Resident

@TheCalebG when a flow is configured with "standard trigger" (apart from Manual or Power Apps) all the actions inside the flow would be static. So, for you emails were sending from your account. If you want to go with a standard approach - you can use "send an email using shared mailbox" action to send emails from a shared mailbox action.

 

Regarding sending email from Power Apps - elaborate the issue you are facing "only on first submission"

Thanks for the quick response! The issue regarding emails coming from PowerApps - the email body is not coming through, only "Show your HTML text here." (example below). The issue seems to only occur on the first email sent, so some emails come through fine.

TheCalebG_0-1596820975408.png

 

Hi @TheCalebG ,

 

I've had this issue, and my workaround is to save the HTML to the variable, and then apply the variable into Office365Outlook function.

 

Please try this.

If(DataCardValue3.Text= "Stand Off", Set(varHTML_standoff, "Your HTML Script"); Office365Outlook.SendEmail("Email", "Subject",varHTML_standoff, {isHtml:true}),
...

Hope this helps.
Sik

I tried this but it can't help, sorry

What I did was to copy the html scripts directly into the "onselect" setting for email button and it works. I know this may not be the most beautiful solution but it works for now.

"Office365Outlook.SendEmail(User().Email,"Your email subject", "Your HTML Scripts", {IsHtml: true})"

PowerAppRookie
New Member

Dear @TheCalebG did you find a solution/work around?

Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Top Kudoed Authors
Users online (1,726)