HowTo create a daily onenote page with content using power automate

What are we going to build?

This flow creates a daily OneNote page within a OneNote Section(In my Case: „Daily Notes“ with the title of today’s date and the day of the week with the content you want in the page.

Final look at OneNote after successfull Flow run

Final look at the Flow

  1. Create a Flow at http://www.flow.microsoft.com and give it a name.
  2. Choose „recurrence“ as a trigger. In our Case we will trigger the flow every day at 7:00
Set recurrence for your Flow

3. Initialize a variable as array for each weekday

Jeweilige Tage findest du später in dem Titel deiner OneNote Seite

Create a „Compose“ Action and use the Function:

utcNow()
Get UTC TIme

4. Create another „Compose“ Action with following expression to get a „number“ for the week. This will help „calculate“ the Weekday for the OneNote title.

dayOfWeek(outputs('Get_UTC_Date_and_Time_now'))

5. Another LAST „Compose“ for getting the weekday as an output:

variables('Days of the Week')[sub(outputs('Get_Day_of_the_Week_(Number)'), 1)]

5. new action: „Create Page in OneNote Section“ using the OneNote Connector.

use this action

the content inside the action is now classical HTML – https://html-online.com/editor/ This site is a HTML Editor.

If you want to use my Input and the Title with todays date and the weekday – be aware to insert the output of get day of the week:

<html>

<head>

<title>@{formatDateTime(utcNow(), ‚dd-MM-yyyy‘)

}, @{outputs(‚Get_Day_of_the_week__(Name)‘)}</title>

</head>

<body>

<p>&nbsp;</p>

<p style=“margin: 0in; font-family: ‚Segoe UI‘; font-size: 12.0pt;“><span style=“font-weight: bold;“>Goals / Agenda</span></p>

<ul style=“direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in;“ type=“disc“>

<li style=“margin-top: 0; margin-bottom: 0; vertical-align: middle;“>&nbsp;</li>

</ul>P

<p style=“margin: 0in; font-family: ‚Segoe UI‘; font-size: 12.0pt;“><span style=“font-weight: bold;“>Discussion Notes</span></p>

<ul style=“direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in;“ type=“disc“>

<li style=“margin-top: 0; margin-bottom: 0; vertical-align: middle;“>&nbsp;</li>

</ul>

<p style=“margin: 0in; font-family: ‚Segoe UI‘; font-size: 12.0pt;“><span style=“font-weight: bold;“>Action items</span></p>

<p>&nbsp;</p>

use following function to get todays date:

formatDateTime(utcNow(), 'dd-MM-yyyy')

Feedback & what’s next?

Let me know what you think 😊 Let’s connect ➡️https://linktr.ee/rahmanuenal

Kommentar verfassen

Trage deine Daten unten ein oder klicke ein Icon um dich einzuloggen:

WordPress.com-Logo

Du kommentierst mit deinem WordPress.com-Konto. Abmelden /  Ändern )

Facebook-Foto

Du kommentierst mit deinem Facebook-Konto. Abmelden /  Ändern )

Verbinde mit %s