cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
hochman
Level: Powered On

Using the Body (HTML) from a OneNote Page in an email. Issue with formatting.

Hey everyone,

 

I have created a flow that sends a daily email to a large group and the content is retrieved from a OneNote page.

 

Everything is working well but sometimes we have problems with the formatting of the emails.

 

Scenario: Information looks OK inside OneNote. I trigger the flow and the email comes with wrong formatting.

 

My question is: if the content in OneNote looks ok, why it messes up when we use in an email?

 

Based on my investigation it looks like the main block of information is inside the following tag (UL) but this is not something I can see in OneNote.

 

Thoughts?

 

1A Daily Email 2019-07-01 16-48-57(1).pngInbox • nelson.hochman@qantas.com.au 2019-07-01 16-50-26(1)(1)(1).pnguntitled 2019-07-01 16-52-51(1).pngEdit your flow  Microsoft Flow 2019-07-01 16-54-54(1).png

2 REPLIES 2
Community Support Team
Community Support Team

Re: Using the Body (HTML) from a OneNote Page in an email. Issue with formatting.

Hi @hochman ,

 

I am afraid I don't fully understand what the problem you are currently experiencing.

Is the content missing in the Email body or the format not in line with expectations?

I did the test on my side, the format and content are in line with expectations.

11.PNG10.PNG

Please provide more details so that we can analyze the problem.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
hochman
Level: Powered On

Re: Using the Body (HTML) from a OneNote Page in an email. Issue with formatting.

Hi @v-bacao-msft ,

 

I ended up figuring out the pattern for this issue I have been facing for a long time.

 

Let me see if I can make it clear for you. Below, the steps we follow every day.

 

Every day we receive an email from our vendor giving updates for the releases/issues we are testing.

As our vendor is in a completely different timezone, this email arrives early morning and the first person that arrives in the office creates a new page with the current date as the page title, following the pattern "dd MMMM yyyy" (26 August 2019).

 

He/She will copy the email to this page (copy/paste) and then everyone will use this page to request/communicate how the tests are going with the releases (UAT/PROD).

 

Then, at the end of the day, I run my flow that finds which page I have to use and gets the content of that page (title: 26 August 2019) and sends an email to a list of people. The problem starts here!

 

This is what I see in One Note:

Please pay attention to the arrow, indicating an extra space there.

1A Daily Email 2019-08-26 14-50-11(1).jpg

 

When I open the page in a web browser, this is what I can see in the HTML:

 

<div class="OutlineElement Ltr" style="margin-left: 0px;">
   <div class="ParaWrappingDiv">
      <p class="Paragraph" xml:lang="EN-IE" lang="EN-IE" style="font-weight: normal; font-style: normal; vertical-align: baseline; font-family: &quot;Segoe UI&quot;, Tahoma, Verdana, Sans-Serif; background-color: transparent; color: windowtext; text-align: left; font-size: 6pt; margin-top: 0px; margin-bottom: 0px;">
         <span data-contrast="auto" class="TextRun" xml:lang="EN-IE" lang="EN-IE" style="color: windowtext; background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; font-size: 11pt; font-family: Calibri, Calibri_MSFontService, sans-serif; font-kerning: none; line-height: 18px;">
            <span class="NormalTextRun" style="background-color: inherit;">No load on SA today but see following updated:</span>
         </span>
         <span class="EOP" style="font-size: 11pt; line-height: 18px; font-family: Calibri, Calibri_MSFontService, sans-serif;">&nbsp;</span>
      </p>
   </div>
   <div class="OutlineElement Ltr" style="margin-left: 36px;">
      <div id="WACViewPanel_EditingElement_WrappingDiv" style="height: 19.001px; width: 588px; display: block; position: absolute; z-index: -1000; visibility: visible; max-height: none; opacity: 0; top: 0px; left: 0px;">
         <div id="WACViewPanel_EditingElement" contenteditable="true" spellcheck="false" class="Safari usehover WACEditing EditMode EditingSurfaceBody" style="overflow: hidden; visibility: visible; position: absolute; width: 100%; clip: rect(0px, 588px, 19.001px, 0px); direction: ltr;">
            <div class="OutlineElement Ltr  BCX0 SCXO145738666" style="margin-left: 0px; direction: ltr;">
               <p class="Paragraph SCXO145738666 BCX0" xml:lang="EN-IE" lang="EN-IE" style="font-weight: normal; font-style: normal; vertical-align: baseline; background-color: transparent; color: windowtext; text-align: left;">
                  <span data-contrast="auto" class="TextRun SCXO145738666 BCX0" xml:lang="EN-IE" lang="EN-IE" style="color: windowtext; background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; font-size: 11pt; font-family: Calibri, Calibri_MSFontService, sans-serif; font-kerning: none; line-height: 18px;">
                     <span class="NormalTextRun SCXO145738666 BCX0" style="background-color: inherit;"> </span>
                  </span>
                  <span class="EOP SCXO145738666 BCX0" style="font-size: 11pt; line-height: 18px; font-family: Calibri, Calibri_MSFontService, sans-serif;">&nbsp;</span>
               </p>
            </div>
         </div>
      </div>
      <div class="ParaWrappingDiv">
         <p class="Paragraph" xml:lang="EN-IE" lang="EN-IE" style="font-weight: normal; font-style: normal; vertical-align: baseline; font-family: &quot;Segoe UI&quot;, Tahoma, Verdana, Sans-Serif; background-color: transparent; color: windowtext; text-align: left; font-size: 6pt; margin-top: 0px;">
            <span data-contrast="auto" class="TextRun" xml:lang="EN-IE" lang="EN-IE" style="color: windowtext; background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; font-size: 11pt; font-family: Calibri, Calibri_MSFontService, sans-serif; font-kerning: none; line-height: 18px;">
               <span class="Selected"> </span>
            </span>
            <span class="EOP Selected" style="font-size: 11pt; line-height: 18px; font-family: Calibri, Calibri_MSFontService, sans-serif;">&nbsp;</span>
         </p>
      </div>
   </div>
</div>

So, visually, it looks ok inside One Note (web version and app installed in my Mac).

 

When I run the Flow, this is what we get from the "Get Page Content" feature in my flow, inserted in an email:

Test Run - Monday 26 August - Daily Communication (automated) - Inbox 2019-08-26 16-18-07(3).png

 

So, this text (No load on SA today but see following update:) is exactly above the "extra" space that I indicated in the first image above (IMAGE 1). The text was pushed to the bottom of the email, not sure why.

 

To fix this issue, I just need to DELETE this extra space from One Note.

Microsoft Teams Notification 2019-08-26 16-25-08(2).png

 

Deleting this extra space, the HTML (from web version) is the one below:

<div class="OutlineElement Ltr" style="margin-left: 0px;">
   <div class="ParaWrappingDiv">
      <p class="Paragraph" xml:lang="EN-IE" lang="EN-IE" style="font-weight: normal; font-style: normal; vertical-align: baseline; font-family: &quot;Segoe UI&quot;, Tahoma, Verdana, Sans-Serif; background-color: transparent; color: windowtext; text-align: left; font-size: 6pt; margin-top: 0px; margin-bottom: 0px;">
      	<span data-contrast="auto" class="TextRun" xml:lang="EN-IE" lang="EN-IE" style="color: windowtext; background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; font-size: 11pt; font-family: Calibri, Calibri_MSFontService, sans-serif; font-kerning: none; line-height: 18px;">
      		<span class="NormalTextRun" style="background-color: inherit;">No load on SA today but see following updated:</span>
      	</span>
      	<span class="EOP" style="font-size: 11pt; line-height: 18px; font-family: Calibri, Calibri_MSFontService, sans-serif;">&nbsp;</span>
      </p>
   </div>
</div>

Comparing both HTML:

content_with_space.html - content_without_space.html — Downloads 2019-08-26 16-32-41.png

 

When I run my flow again, the email comes in the right format as you can see below.

Test Run - Monday 26 August - Daily Communication (automated) - Inbox 2019-08-26 16-40-15(1).png

In the image above, the text that was pushed to the bottom of the email is in the right position.

 

So, because of that, I have to check the content before I send. That's why I created a "Test Run" flow within my flow to see if there is any issue with the content.

Edit your flow  Microsoft Flow 2019-08-26 16-43-39.png

 

Now, if I try to replicate this issue, I just go below the text (No load on SA today but see following update:) and add extra space, pressing TAB once and the issue will happen again. I couldn't replicate the issue if I start a blank page but I can replicate with the pages I have.

 

My question is.... Why the content looks ok in One Note and doesn't look ok in an email? 

What can I do to avoid this issue?

 

Is that clear now? Do you need anything from my end to reproduce the same issue?

 

Thanks!

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (5,003)