Create HTML Table
For Link use
concat('<a href="', concat('https://shdev.sharepoint.com/sites/Steven-Test/Lists/Contract%20Renewals/DispForm.aspx?ID=',item()?['ID']), '">Click Here</a>')
Add HTML formatting
replace(
replace(
replace(
replace(
replace(
replace(
replace(
body('Create_HTML_table'),
'<',
'<'
),
'>',
'>'
),
'"',
'"'
),
'<th>Contract-Name</th>',
'<th>Contract Name</th>'
),
'<th>Agreement-Expiry</th>',
'<th>Agreement Expiry</th>'
),
'<th>Notice-Date</th>',
'<th style="background-color: red; color: white">Notice Date</th>'
),
'<th>Payment-Date</th>',
'<th>Payment Date</th>'
)
Add to Email action in HTML
Hi,
The below contracts are Expiring between @{formatDateTime(variables('CurrentDate'), 'dd-MM-yyyy')} & @{formatDateTime(variables('ThreeMonthsLater'), 'dd-MM-yyyy')}
@{concat(
'<style>',
'table { border-collapse: collapse; width: 100%; font-family: Arial, sans-serif; }',
'th, td { border: 1px solid #dddddd; text-align: left; padding: 8px; }',
'th { background-color: #f2f2f2; font-weight: bold; }',
'tr:nth-child(even) { background-color: #f2f2f2; }',
'tr:hover { background-color: #e0e0e0; }',
'</style>',
outputs('HTML_Formatting')
)}
Thanks
Steven
Output will be
No Comments