I have a list with a rich text column where users inserts table. The column saves an html code of the table.
I want to either:
1. Display the table in the workflow approval body
2. Save the html code to an html file and attach it to the list item which in turn attaches to the workflow approval
The code in the rich text column is
"<html>
<p>​​​</p>
<table class="ms-rteTable-default" width="100%" cellspacing="0"><tbody><tr><td style="width:25%;" class="ms-rteTable-default">​GL<br></td><td style="width:25%;" class="ms-rteTable-default">​Cost Center<br></td><td style="width:25%;" class="ms-rteTable-default">​​a<br></td><td style="width:25%;" class="ms-rteTable-default">​2<br></td></tr><tr><td class="ms-rteTable-default">​3<br></td><td class="ms-rteTable-default">​3<br></td><td class="ms-rteTable-default">​4<br></td><td class="ms-rteTable-default">​5<br></td></tr></tbody></table><p></p>
</html>"
I tried to put the html codes in front
"<!DOCTYPE html><html><head></head><body><html>
<p>​​​</p>
<table class="ms-rteTable-default" width="100%" cellspacing="0"><tbody><tr><td style="width:25%;" class="ms-rteTable-default">​GL<br></td><td style="width:25%;" class="ms-rteTable-default">​Cost Center<br></td><td style="width:25%;" class="ms-rteTable-default">​​a<br></td><td style="width:25%;" class="ms-rteTable-default">​2<br></td></tr><tr><td class="ms-rteTable-default">​3<br></td><td class="ms-rteTable-default">​3<br></td><td class="ms-rteTable-default">​4<br></td><td class="ms-rteTable-default">​5<br></td></tr></tbody></table><p></p>
</html></body></html>"
However this returns same error;
Unable to process template language expressions in action 'Create_file' inputs at line '1' and column '2863': 'The template language expression 'json(decodeBase64(triggerOutputs().headers['X-MS-APIM-Tokens']))['$connections']['shared_onedriveforbusiness']['connectionId']' cannot be evaluated because property 'shared_onedriveforbusiness' doesn't exist, available properties are 'shared_sharepointonline, shared_sharepointonline_3, shared_sharepointonline_1, shared_office365_3, shared_approvals'. Please see https://aka.ms/logicexpressions for usage details.'.
Are you trying to create the document from just the HTML table? Or are you adding the appropriate HTML codes to make it a full document? You have to add the following in front of the table code
<!DOCTYPE html><html><head></head><body>
And then this after
</body></html>
Otherwise you are trying to create a file from an HTML fragment, not an HTML file.
I have tried to create a file using the html code in the rich text tag using onedrive connector.
however, it has an error, I am bot sure if I am missing something.
The approval workflow uses custom markup rather than HTML, so there is no way to show an HTML table in the Approval body. You can easily save the HTML table as an html file in OneDrive and then attach that to the Approval email.
Michael E. Gernaey
497
Super User 2025 Season 1
David_MA
436
Super User 2025 Season 1
Riyaz_riz11
244
Super User 2025 Season 1