I am using Power Automate (PA) Desktop and am performing a simple mail merge using data from an excel spreadsheet. After defining my variables (from Excel), I use the "Send email message through Outlook" item. To allow formatting, I have written the body of the email in html. When the body includes the html shown immediately below in blue italicized text, PA finds no errors and executes the flow as expected.
"<p>Good Evening %name%,</p>
<p>As of the end of this week (end of the day on Wednesday), your week at a glance stats show you have:</p>
<ul><li><span style="color: #000000;"><strong>%nstudents%</strong></span> students active</li>
<li><span style="color: #000000;"><strong>%nars%</strong></span> at-risk students</li>
<li><span style="color: #000000;"><strong>%narn%</strong></span> at-risk notes submitted</li>
<li><span style="color: #ba372a;"><strong>%narnn%</strong></span> at-risk notes needing to be submitted still</li>
<li><span style="color: #000000;"><strong>%nua%</strong></span> unsubmitted assignments (across all your courses)</li>
<li><span style="color: #ba372a;"><strong>%nlgar%</strong></span> late-graded assignments (0 is the goal)</li>
<li><span style="color: #000000;"><strong>%nannoun%</strong></span> course announcements made within the past week</li>
<li><strong><span style="color: #ba372a;">%nannounneeded%</span></strong> course announcements that needed to have been made last week (1 per course per week is the goal)</li>
<li><span style="color: #000000;"><strong>%ndslcacc%</strong></span> day(s) since your last canvas access</li>
<li><span style="color: #000000;"><strong>%ndslcactive%</strong></span> day(s) since your last canvas activity</li>
<p>Attached is a copy of the excel file containing the details behind your weekly stats. If you have any questions or need anything, please never hesitate to let me know!</p>
<p>Sincerely,</p>"
However, when the body is modified by adding one more list item (colored in red, bold text below), PA gives a syntax error just below the "Body" field of the "Send email message through Outlook" item.
"<p>Good Evening %name%,</p>
<p>As of the end of this week (end of the day on Wednesday), your week at a glance stats show you have:</p>
<ul><li><span style="color: #000000;"><strong>%nstudents%</strong></span> students active</li>
<li><span style="color: #000000;"><strong>%nars%</strong></span> at-risk students</li>
<li><span style="color: #000000;"><strong>%narn%</strong></span> at-risk notes submitted</li>
<li><span style="color: #ba372a;"><strong>%narnn%</strong></span> at-risk notes needing to be submitted still</li>
<li><span style="color: #000000;"><strong>%nua%</strong></span> unsubmitted assignments (across all your courses)</li>
<li><span style="color: #ba372a;"><strong>%nlgar%</strong></span> late-graded assignments (0 is the goal)</li>
<li><span style="color: #000000;"><strong>%nannoun%</strong></span> course announcements made within the past week</li>
<li><strong><span style="color: #ba372a;">%nannounneeded%</span></strong> course announcements that needed to have been made last week (1 per course per week is the goal)</li>
<li><span style="color: #000000;"><strong>%ndslcacc%</strong></span> day(s) since your last canvas access</li>
<li><span style="color: #000000;"><strong>%ndslcactive%</strong></span> day(s) since your last canvas activity</li>
<li>Courses with average student score below 80% is/are: <strong>%lcs%</strong>.(None is the goal).</li></ul>
<p>Attached is a copy of the excel file containing the details behind your weekly stats. If you have any questions or need anything, please never hesitate to let me know!</p>
<p>Sincerely,</p>"
I thought perhaps the variable was the problem. Even if I remove the<strong>%lcs%</strong> excerpt, I still receive the error. Because the error is present, I cannot run the flow. If one of you have a moment to spare, may I ask if you can share some insight?
Thank you very, very much for your time.
-matt