Problem with Appsheet Automation - inserting an HTML table

Hello,

Iโ€™m experiencing an issue with the email body in my AppSheet automation process. Specifically, when I include a table in the email body, there is an excessive amount of white space before the table, and I have to scroll a lot to view it.

Hereโ€™s the HTML Iโ€™m using for the email body:

<table border="1" cellpadding="5" cellspacing="0" style="margin: 0; padding: 0; line-height: 1;">
<tr>
<th>Nr. Contract</th>
<th>Client</th>
<th>Nume Proiect</th>
<th>Raportare</th>
<th>Termen depunere</th>
</tr>
<<Start: SELECT(RaportariLog[ID_Raportare], AND([Status Raportare] = FALSE, [Data_notificare_ref] = TODAY()))>>
<tr>
<td><<[Contract_Link].[Nr.CTR]>></td>
<td><<[Contract_Link].[Client].[Nume]>></td>
<td><<[Contract_Link].[Nume Proiect]>></td>
<td><<[RaportariLog_TipRaportare].[Tip Raportare]>></td>
<td><<[RaportariLog_TipRaportare].[Termen limitฤƒ depunere]>></td>
</tr>
<<End>>
</table>

The table itself is fine, but there is a large amount of empty space before it appears in the email. I have tried adjusting the HTML using styles, but the extra space remains.

Has anyone encountered a similar issue or know how to remove this extra white space before the table? Additionally, Iโ€™ve considered using an Email Body Template, but Iโ€™m not sure it is suitable since the number of rows in the table can vary with each email.

Any suggestions on how to resolve this issue or alternative methods for inserting a table into the email body would be greatly appreciated! Thanks in advance!

I uploaded a photo of how the email looks

marius191_0-1732992928597.png

 

Solved Solved
0 2 157
1 ACCEPTED SOLUTION

Steve
Platinum 5
Platinum 5

If I recall correctly, all line breaks in the template are preserved. Remove the line breaks in your HTML:

<table border="1" cellpadding="5" cellspacing="0" style="margin: 0; padding: 0; line-height: 1;"><tr><th>Nr. Contract</th><th>Client</th><th>Nume Proiect</th><th>Raportare</th><th>Termen depunere</th></tr>
<<Start: SELECT(RaportariLog[ID_Raportare], AND([Status Raportare] = FALSE, [Data_notificare_ref] = TODAY()))>>
<tr><td><<[Contract_Link].[Nr.CTR]>></td><td><<[Contract_Link].[Client].[Nume]>></td><td><<[Contract_Link].[Nume Proiect]>></td><td><<[RaportariLog_TipRaportare].[Tip Raportare]>></td><td><<[RaportariLog_TipRaportare].[Termen limitฤƒ depunere]>></td></tr>
<<End>>
</table>

:

 

View solution in original post

2 REPLIES 2

Steve
Platinum 5
Platinum 5

If I recall correctly, all line breaks in the template are preserved. Remove the line breaks in your HTML:

<table border="1" cellpadding="5" cellspacing="0" style="margin: 0; padding: 0; line-height: 1;"><tr><th>Nr. Contract</th><th>Client</th><th>Nume Proiect</th><th>Raportare</th><th>Termen depunere</th></tr>
<<Start: SELECT(RaportariLog[ID_Raportare], AND([Status Raportare] = FALSE, [Data_notificare_ref] = TODAY()))>>
<tr><td><<[Contract_Link].[Nr.CTR]>></td><td><<[Contract_Link].[Client].[Nume]>></td><td><<[Contract_Link].[Nume Proiect]>></td><td><<[RaportariLog_TipRaportare].[Tip Raportare]>></td><td><<[RaportariLog_TipRaportare].[Termen limitฤƒ depunere]>></td></tr>
<<End>>
</table>

:

 

That solves it! Thank you a lot, sir!

Top Labels in this Space