web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Send an email with One...
Power Automate
Unanswered

Send an email with OneNote pages that have been recently modified

(0) ShareShare
ReportReport
Posted on by 9

Hi

I'm looking for an experienced Power Automate user who would be able to help me with creating a more advanced version of this template:

 

DesmondDekker_1-1616168080489.png

 

So this template works fine, but there is one problem - it sends a modified page in this way:

 

DesmondDekker_2-1616168105002.png

 

I would like to create a flow which could detect if the same page was modified a few times and send an email only with one unique name of a page and one link to it - so the "Ideas - Test 4" wouldn't be repeated 4 times. Now, as I understand, the flow is taking into account all changes made in the page.

 

I'm also sending screenshots of the whole flow:

 

DesmondDekker_3-1616168136406.png

 

DesmondDekker_4-1616168147824.png

 

DesmondDekker_5-1616168154084.png

 

DesmondDekker_6-1616168160122.png

DesmondDekker_7-1616168203864.png


Really appreciate any help!

 

Categories:
I have the same question (0)
  • Verified answer
    danrobson Profile Picture
    119 on at

    In the Iterate current OneNote section you need to modify the compose action in the Yes branch of the condition to add a delimiter to the end of the string, in my case I used a ~ it needs to be something that won't appear in your page names.

    robofski_0-1616760334385.png

     

    Then before you send the email you want to add two compose actions, the first will split the list of pages into an Array based on the delimiter we used earlier and the second will take the output from that action and merge to leave only unique records:

    robofski_0-1616767653024.png

     

    For clarity, the expression used for the split was:

    split(substring(variables('ListOfPages'),0,sub(length(variables('ListOfPages')),1)),'~')

     

    and for the union:

    union(outputs('Compose_2'),outputs('Compose_2'))

     

    After this we need to clear out the ListofPages Variable by using a set variable action and just entering a space (it insists on entering something for the value

    robofski_1-1616767789301.png

     

    Finally we want to populate the ListofPages variable with the results from the Union so we can use an apply to each loop to loop through the output of the union and just append that as text to the variable.

    robofski_2-1616767958256.png

     

    Hopefully you can follow but if you need any clarity, please let me know. 

     

     

     

     

  • DesmondDekker Profile Picture
    9 on at

    Everything is working! Thank you very much and have a nice weekend 😃

  • lucasto Profile Picture
    2 on at

    Thank you for this!! I have a question, what if I want to send a notification to a team of associates (I know I can add the email addresses) but for only one folder in a OneNote book, not any others? What would I change in this? I would appreciate any help you can offer. 

  • bcharette Profile Picture
    2 on at

    Hi,

     

    Can you give me more info, Where to add this part of your solution :

    "Then before you send the email you want to add two compose actions, the first will split the list of pages into an Array based on the delimiter we used earlier and the second will take the output from that action and merge to leave only unique records:"

     

    Is it also in the Iterate current OneNote section. Same for this part : 

     

    "After this we need to clear out the ListofPages Variable by using a set variable action and just entering a space (it insists on entering something for the value"

     

    and the last one : 

    "Finally we want to populate the ListofPages variable with the results from the Union so we can use an apply to each loop to loop through the output of the union and just append that as text to the variable."

     

    Also, you have a "Compose 5" in your answer, but what is the compose 4 ?

     

    Thanks a lot

     

  • ga1nz Profile Picture
    Microsoft Employee on at

    Hi @robofski, I am trying to fix a similar issue in a notebook with multiple sections. I tried your fix above, but I get:


    The execution of template action 'Apply_to_each_2' failed: the result of the evaluation of 'foreach' expression '@outputs('Compose_3')' is of type 'String'. The result must be a valid array.

     

    Any tips on how to fix this?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard