issues with html email templates

Hi,

I created an email template but was getting a bunch of errors when pasting the html into a send email action in the email body field. errors along the lines of "The 'meta' start tag on line 1 position 14 does not match the end tag of 'head'. Line 1, position 7495"

I then saw a few posts saying its best to create a template in google docs, export it as html and use that. So I recreated my email template from scratch in good docs, exported it, to then find basically the same error.

Any suggestions would be great, really unsure where to go from here. Thank you!

Edit: I removed the html from the body field, and selected the google docs file in the email body template field. This half works but introduces new issues. It loads fairly correctly, however the link to the note in the app doesn't work and i'm unable to work out how to fix it.

This is the link I put in the google doc:
https://www.appsheet.com/start/e8d6f26b-6aca-4e7f-9552-380b3d3da7a8#view=Note%20Detail&row= <<[Note ID]>>

When I receive the email this is the link it has (note the end of the url << >> changed to %3C%3C  %3E%3E :
https://www.appsheet.com/start/e8d6f26b-6aca-4e7f-9552-380b3d3da7a8#view=Note%20Detail&row=%3C%3C[Note%20ID]%3E%3E  

I then changed the url in the google doc to be - using &lt;&lt; and &gt;&gt; 
https://www.appsheet.com/start/e8d6f26b-6aca-4e7f-9552-380b3d3da7a8#view=Note%20Detail&row=&lt;&lt;[Note%20ID]&gt;&gt;  

Second Edit:
I have half got the link working in the google doc, I think there something not playing nice between hyperlinks in the google doc and Appsheet, so I removed the hyperlink and made it plain text, using the hyperlink() function in Appsheet to build the hyperlink. This does make the hyperlink work, however it removes all formatting and makes it look ugly. It underlines it and makes it blue or purple if visited. as its an email template that I want to have it looking nice, I want it to not be underlined and be orange in colour. So I still want to get the hyperlink working through google docs, or more so I want to get html templates working as that will also fix my issue and have hyperlinks working with proper formatting.
<<HYPERLINK(CONCATENATE(โ€œhttps://www.appsheet.com/start/e8d6f26b-6aca-4e7f-9552-380b3d3da7a8#view=Note%20Detail&row=โ€,[Note ID]), โ€œView In The ITC PM Appโ€)>>

However this didn't do anything. In all cases [Note ID] isn't being replaced as it should be. I also don't like how google hijacks the urls entered into google docs and runs it through their redirector first. This adds extra load time and looks unprofessional with redirects flashing on the page

This is the html code im trying to use: (removed when I posted this a second time as the first time got marked as spam, assuming it was the code?)

 

 

 

clintinthecode_0-1660636993908.png

 

0 15 1,562
15 REPLIES 15

Here's the code I used

<html><head><meta content="text/html; charset=UTF-8" http-equiv="content-type"><style type="text/css">.lst-kix_88nc28csb4ce-8>li:before{content:"\0025cf  "}ul.lst-kix_88nc28csb4ce-5{list-style-type:none}ul.lst-kix_88nc28csb4ce-4{list-style-type:none}ul.lst-kix_88nc28csb4ce-3{list-style-type:none}ul.lst-kix_88nc28csb4ce-2{list-style-type:none}ul.lst-kix_88nc28csb4ce-8{list-style-type:none}ul.lst-kix_88nc28csb4ce-7{list-style-type:none}ul.lst-kix_88nc28csb4ce-6{list-style-type:none}.lst-kix_88nc28csb4ce-3>li:before{content:"\0025cf  "}.lst-kix_88nc28csb4ce-4>li:before{content:"\0025cf  "}.lst-kix_88nc28csb4ce-7>li:before{content:"\0025cf  "}.lst-kix_88nc28csb4ce-5>li:before{content:"\0025cf  "}.lst-kix_88nc28csb4ce-6>li:before{content:"\0025cf  "}.lst-kix_z9dwfft3qmwx-1>li:before{content:"\0025cb  "}.lst-kix_z9dwfft3qmwx-2>li:before{content:"\0025a0  "}ul.lst-kix_z9dwfft3qmwx-2{list-style-type:none}.lst-kix_z9dwfft3qmwx-0>li:before{content:"\0025cf  "}ul.lst-kix_z9dwfft3qmwx-1{list-style-type:none}.lst-kix_z9dwfft3qmwx-3>li:before{content:"\0025cf  "}.lst-kix_z9dwfft3qmwx-4>li:before{content:"\0025cb  "}ul.lst-kix_z9dwfft3qmwx-0{list-style-type:none}.lst-kix_z9dwfft3qmwx-5>li:before{content:"\0025a0  "}.lst-kix_z9dwfft3qmwx-6>li:before{content:"\0025cf  "}.lst-kix_88nc28csb4ce-1>li:before{content:"\0025cf  "}.lst-kix_88nc28csb4ce-2>li:before{content:"\0025cf  "}ul.lst-kix_88nc28csb4ce-1{list-style-type:none}.lst-kix_z9dwfft3qmwx-7>li:before{content:"\0025cb  "}.lst-kix_z9dwfft3qmwx-8>li:before{content:"\0025a0  "}ul.lst-kix_88nc28csb4ce-0{list-style-type:none}.lst-kix_88nc28csb4ce-0>li:before{content:"\0025cf  "}ul.lst-kix_z9dwfft3qmwx-6{list-style-type:none}ul.lst-kix_z9dwfft3qmwx-5{list-style-type:none}ul.lst-kix_z9dwfft3qmwx-4{list-style-type:none}ul.lst-kix_z9dwfft3qmwx-3{list-style-type:none}ul.lst-kix_z9dwfft3qmwx-8{list-style-type:none}ul.lst-kix_z9dwfft3qmwx-7{list-style-type:none}ol{margin:0;padding:0}table td,table th{padding:0}.c22{border-right-style:solid;padding:5pt 5pt 5pt 5pt;border-bottom-color:#ffecd1;border-top-width:1pt;border-right-width:1pt;border-left-color:#ffecd1;vertical-align:top;border-right-color:#ffecd1;border-left-width:1pt;border-top-style:solid;background-color:#ffecd1;border-left-style:solid;border-bottom-width:1pt;width:479.2pt;border-top-color:#ffecd1;border-bottom-style:solid}.c35{border-right-style:solid;padding:5pt 5pt 5pt 5pt;border-bottom-color:#ffffff;border-top-width:1pt;border-right-width:1pt;border-left-color:#ffffff;vertical-align:top;border-right-color:#ffffff;border-left-width:1pt;border-top-style:solid;background-color:#ffffff;border-left-style:solid;border-bottom-width:1pt;width:479.2pt;border-top-color:#ffffff;border-bottom-style:solid}.c23{border-right-style:solid;padding:5pt 5pt 5pt 5pt;border-bottom-color:#ffecd1;border-top-width:1pt;border-right-width:1pt;border-left-color:#f4f4f4;vertical-align:top;border-right-color:#f3f3f3;border-left-width:1pt;border-top-style:solid;border-left-style:solid;border-bottom-width:1pt;width:479.2pt;border-top-color:#ffffff;border-bottom-style:solid}.c19{border-right-style:solid;padding:5pt 5pt 5pt 5pt;border-bottom-color:#ffa73b;border-top-width:1pt;border-right-width:1pt;border-left-color:#ffa73b;vertical-align:top;border-right-color:#ffa73b;border-left-width:1pt;border-top-style:solid;border-left-style:solid;border-bottom-width:1pt;width:612pt;border-top-color:#ffa73b;border-bottom-style:solid}.c10{color:#666666;font-weight:400;text-decoration:none;vertical-align:baseline;font-size:10.5pt;font-family:"Arial";font-style:normal}.c5{color:#666666;font-weight:400;text-decoration:none;vertical-align:baseline;font-size:11pt;font-family:"Arial";font-style:normal}.c4{color:#ffa73b;font-weight:400;text-decoration:none;vertical-align:baseline;font-size:9pt;font-family:"Arial";font-style:normal}.c8{color:#000000;font-weight:400;text-decoration:none;vertical-align:baseline;font-size:11pt;font-family:"Arial";font-style:normal}.c17{color:#999999;font-weight:400;text-decoration:none;vertical-align:baseline;font-size:9pt;font-family:"Arial";font-style:normal}.c25{color:#ffa73b;font-weight:700;text-decoration:none;vertical-align:baseline;font-size:15pt;font-family:"Arial";font-style:normal}.c14{color:#999999;font-weight:400;text-decoration:none;vertical-align:baseline;font-size:8pt;font-family:"Arial";font-style:normal}.c21{color:#666666;font-weight:700;text-decoration:none;vertical-align:baseline;font-size:13.5pt;font-family:"Arial";font-style:normal}.c31{color:#ffa73b;font-weight:400;text-decoration:none;vertical-align:baseline;font-size:8pt;font-family:"Arial";font-style:normal}.c34{color:#000000;font-weight:400;text-decoration:none;vertical-align:baseline;font-size:6pt;font-family:"Arial";font-style:normal}.c1{padding-top:0pt;padding-bottom:0pt;line-height:1.15;orphans:2;widows:2;text-align:left}.c24{background-color:#ffffff;padding-top:0pt;padding-bottom:0pt;line-height:1.15;text-align:left}.c18{background-color:#ffffff;padding-top:0pt;padding-bottom:0pt;line-height:1.5;text-align:left}.c7{text-decoration-skip-ink:none;font-size:8pt;-webkit-text-decoration-skip:none;color:#ffa73b;text-decoration:underline}.c15{text-decoration-skip-ink:none;font-size:9pt;-webkit-text-decoration-skip:none;color:#ffa73b;text-decoration:underline}.c9{border-spacing:0;border-collapse:collapse;margin-right:auto}.c27{padding-top:0pt;padding-bottom:0pt;line-height:1.0;text-align:center}.c32{margin-left:66.8pt;border-spacing:0;border-collapse:collapse;margin-right:auto}.c28{padding-top:0pt;padding-bottom:0pt;line-height:1.0;text-align:left}.c6{background-color:#f3f3f3;max-width:612pt;padding:0pt 0pt 0pt 0pt}.c29{font-size:15pt;color:#ffa73b;font-weight:700}.c3{font-size:9pt;color:#999999;font-weight:700}.c11{color:#999999;font-size:6pt}.c16{color:#999999;font-size:8pt}.c20{color:#666666;font-size:10pt}.c0{color:inherit;text-decoration:inherit}.c12{color:#666666;font-size:10.5pt}.c13{background-color:#ffa73b}.c30{font-size:5pt}.c26{height:0pt}.c2{height:11pt}.c33{font-weight:700}.title{padding-top:0pt;color:#000000;font-size:26pt;padding-bottom:3pt;font-family:"Arial";line-height:1.15;page-break-after:avoid;orphans:2;widows:2;text-align:left}.subtitle{padding-top:0pt;color:#666666;font-size:15pt;padding-bottom:16pt;font-family:"Arial";line-height:1.15;page-break-after:avoid;orphans:2;widows:2;text-align:left}li{color:#000000;font-size:11pt;font-family:"Arial"}p{margin:0;color:#000000;font-size:11pt;font-family:"Arial"}h1{padding-top:20pt;color:#000000;font-size:20pt;padding-bottom:6pt;font-family:"Arial";line-height:1.15;page-break-after:avoid;orphans:2;widows:2;text-align:left}h2{padding-top:18pt;color:#000000;font-size:16pt;padding-bottom:6pt;font-family:"Arial";line-height:1.15;page-break-after:avoid;orphans:2;widows:2;text-align:left}h3{padding-top:16pt;color:#434343;font-size:14pt;padding-bottom:4pt;font-family:"Arial";line-height:1.15;page-break-after:avoid;orphans:2;widows:2;text-align:left}h4{padding-top:14pt;color:#666666;font-size:12pt;padding-bottom:4pt;font-family:"Arial";line-height:1.15;page-break-after:avoid;orphans:2;widows:2;text-align:left}h5{padding-top:12pt;color:#666666;font-size:11pt;padding-bottom:4pt;font-family:"Arial";line-height:1.15;page-break-after:avoid;orphans:2;widows:2;text-align:left}h6{padding-top:12pt;color:#666666;font-size:11pt;padding-bottom:4pt;font-family:"Arial";line-height:1.15;page-break-after:avoid;font-style:italic;orphans:2;widows:2;text-align:left}</style></head><body class="c6 doc-content"><p class="c1"><span class="c30"><br></span><span class="c20"><a class="c0" href="https://www.google.com/url?q=https://www.appsheet.com/start/e8d6f26b-6aca-4e7f-9552-380b3d3da7a8%23appName%3DITCPM-309106607&amp;sa=D&amp;source=editors&amp;ust=1660638037546505&amp;usg=AOvVaw2CSkI91papVH4I61mYwRsf">In The Code Project Management App</a></span></p><p class="c1 c2"><span class="c34"></span></p><a id="t.3c9232b2d5d9ea2a259f8403ad80b64e9db35916"></a><a id="t.0"></a><table class="c9"><tr class="c26"><td class="c13 c19" colspan="1" rowspan="1"><p class="c27"><span style="overflow: hidden; display: inline-block; margin: 0.00px 0.00px; border: 0.00px solid #000000; transform: rotate(0.00rad) translateZ(0px); -webkit-transform: rotate(0.00rad) translateZ(0px); width: 201.50px; height: 53.12px;"><img alt="" src="https://inthecode.com.au/wp-content/uploads/2021/03/cropped-itc-logo.png" style="width: 201.50px; height: 53.12px; margin-left: 0.00px; margin-top: 0.00px; transform: rotate(0.00rad) translateZ(0px); -webkit-transform: rotate(0.00rad) translateZ(0px);" title=""></span></p></td></tr></table><p class="c1 c2"><span class="c8"></span></p><p class="c1 c2"><span class="c8"></span></p><a id="t.07f229e91f2dd7db773a9794855cc64dc5a40233"></a><a id="t.1"></a><table class="c32"><tr class="c26"><td class="c35" colspan="1" rowspan="1"><p class="c18"><span class="c21">New note on &lt;&lt;[Ticket ID].[Story Type]&gt;&gt;:<br>&lt;&lt;[Ticket ID].[Title]&gt;&gt;</span></p><p class="c24"><span class="c12 c33">&lt;&lt;[User ID].[Full Name]&gt;&gt;</span><span class="c10">&nbsp; &nbsp; &nbsp;&lt;&lt;[DateTime]&gt;&gt;</span></p><p class="c24"><span class="c10">&lt;&lt;[Note Status]&gt;&gt;</span></p><p class="c2 c18"><span class="c10"></span></p><p class="c18"><span class="c10">&lt;&lt;[Note]&gt;&gt;</span></p><p class="c18 c2"><span class="c10"></span></p><p class="c18"><span class="c12">Assigned To: &lt;&lt;[Assigned To].[Full Name]&gt;&gt;</span></p></td></tr><tr class="c26"><td class="c23" colspan="1" rowspan="1"><p class="c2 c28"><span class="c8"></span></p></td></tr><tr class="c26"><td class="c22" colspan="1" rowspan="1"><p class="c27"><span class="c29"><a class="c0" href="https://www.google.com/url?q=https://inthecode.com.au/app&amp;sa=D&amp;source=editors&amp;ust=1660638037549436&amp;usg=AOvVaw1w0TWWptzs4inDnSz-18x0">View In The ITC PM App</a></span></p></td></tr></table><p class="c1 c2"><span class="c14"></span></p><p class="c1 c2"><span class="c14"></span></p><p class="c1 c2"><span class="c14"></span></p><p class="c1"><span class="c16">Haven&rsquo;t got the app yet?<br>Click to install the ITC PM app on </span><span class="c7"><a class="c0" href="https://www.google.com/url?q=https://apps.apple.com/us/app/itc-pm/id1639536564&amp;sa=D&amp;source=editors&amp;ust=1660638037550062&amp;usg=AOvVaw1c7owH61Opjqxt0jmqzeI2">iOS</a></span><span class="c16">&nbsp;or </span><span class="c7"><a class="c0" href="https://www.google.com/url?q=https://play.google.com/store/apps/details?id%3Dcom.appsheet.whitelabel.guid_e8d6f26b_6aca_4e7f_9552_380b3d3da7a8&amp;sa=D&amp;source=editors&amp;ust=1660638037550311&amp;usg=AOvVaw37LsWLPKTRdsrbNUvLNlQg">Android</a></span></p><p class="c1 c2"><span class="c14"></span></p><p class="c1"><span class="c3">In The Code</span><span class="c17">&nbsp;Office: 07 5609 8411</span></p><p class="c1"><span class="c17">Suite A1, Ground Floor, 140 Bundall Road, Bundall, Qld, 4217, Australia</span></p><p class="c1"><span class="c15"><a class="c0" href="https://www.google.com/url?q=https://inthecode.com.au&amp;sa=D&amp;source=editors&amp;ust=1660638037550853&amp;usg=AOvVaw1HeGdjSx-lMnnfg5avfVb8">inthecode.com.au</a></span></p><p class="c1 c2"><span class="c14"></span></p><p class="c1"><span class="c11">This e-mail message may contain confidential or legally privileged information and is intended only for the use of the intended recipient(s). Any unauthorized disclosure, dissemination, distribution, copying or the taking of any action in reliance on the information herein is prohibited. E-mails are not secure and cannot be guaranteed to be error free as they can be intercepted, amended, or contain viruses. Anyone who communicates with us by e-mail is deemed to have accepted these risks. In The Code Pty Ltd is not responsible for errors or omissions in this message and denies any responsibility for any damage arising from the use of e-mail. Any opinion and other statement contained in this message and any attachment are solely those of the author and do not necessarily represent those of the company.</span></p></body></html>โ€‹

No can do, google docs won't let me.

clintinthecode_0-1660648655710.png

 

As @Suvrutt_Gurjar suggests, try using an AppSheet expression to create the hyperlink rather than use GDoc functionality. For instance, you can combine CONCATENATE with HYPERLINK

Yeah ive done that, and updated the original post with the result, it half works. It does functionally work, however cosmetically it doesn't. When doing it this way Appsheet removes all formatting and makes the text underlined with blue or purple text colour, whereas I don't want underlined and I always want orange.

How I want it:

clintinthecode_0-1660650596827.png

How it looks with appsheet hyperlink() formula

clintinthecode_1-1660650622434.png

 

Potentially, you need to define style attributes in the html. I havenโ€™t tried using GDoc to create an html template for an email like youโ€™re doing, but Iโ€™ve had success using an html editor to create the html I need, including plenty of style markup, and then I paste that into the taskโ€™s body property. 

The core issue im facing is app sheet isn't working with the html code that is output from google docs. This url issue is only related to using a google doc with the send email task.

If I could put html info app sheet, then It would all work great, would be styled and looking how I want.

For whatever reason as the original post mentions, its throwing an error when putting html code in. I have done exactly as I have read app sheet staff say to do, created a google doc, made the template, then in google docs go to file > download > web page html zipped, then copy and paste the html code into app sheet. It throws errors and doesn't work.

Oh okay. In what type of document you are creating the report? Is it correct understanding that your template is G doc and the end report created by the app is PDF?

template is a google doc, im using a send email task with the document selected as the template for the email

Okay, got it. Please do not try to insert the hyperlink in Google template in that manner. Please simply try the expression below just like other expressions you have in the template. The expression itself will take care of the hyperlink.

<<HYPERLINK(CONCATENATE("https://www.appsheet.com/start/e8d6f26b-6aca-4e7f-9552-380b3d3da7a8#view=Note%20Detail&row=", ENCODEURL([Note ID])), "View In the ITC PM App")>>

 

Yeah ive done that, and updated the original post with the result, it half works. It does functionally work, however cosmetically it doesn't. When doing it this way Appsheet removes all formatting and makes the text underlined with blue or purple text colour, whereas I don't want underlined and I always want orange.

How I want it:

clintinthecode_0-1660650868014.png

How it looks with appsheet hyperlink() formula

clintinthecode_1-1660650868058.png

 

 

Okay. Got it.

AppSheet does have certain limitations , especially on UX side as one mostly configures rather than codes an app.  So we mostly try to achieve the best possible with available functionality with available features/options. Sorry, I have no more suggestions.  

I also did try to change the color of the hyperlink but , yes, it stays blue in the email body.

the core issue here to fix is why app sheet is throwing errors when trying to import the html code. if that worked then I wouldn't have this issue


@clintinthecode wrote:

"The 'meta' start tag on line 1 position 14 does not match the end tag of 'head'. Line 1, position 7495"


I have encountered similar confounding errors. See if anything in  Problem with SNAPSHOT in Email Body HTML - Google Cloud Community  happens to help you.

 

Its a weird one. reading your thread it seemed to be a syntax error, whereas I know the syntax is all correct in mine because it works if I link to the google doc, but if I export the google doc to html and insert the html, it fails. Because it works as a google doc thats linked, I know all of my syntax in the template is correct.

Top Labels in this Space