I have a Flow that uses the OneNote Get Page Content Action to retrieve the body of a OneNote page. The Action uses the OneNote Page Id as a custom value. I supply the Notebook Key and the Notebook Section during design (selected from the pick-list), then supply the custom value using a lookup from an Excel table holding the Page Ids. This has worked up until about a week ago when it started failing. Now the Flow is producing a 404 Not Found.
I created a very simplified flow for testing purposes to demonstrate what I'm trying to do. Here I just supply the Page Id as a string variable.
This errors out with NotFound and outputs status code 404.
I can use the Get Pages for a Specific Section Action to retrieve the keys and compare them against my string input.
I have even created a simple Flow for testing purposes that looks at each Page Id resulting from the Get Pages Action and tries to call the Get Page Action - passing in the Page Id directly from the Apply to Each value from Get Pages. This still results in a NotFound status code 404. The goal was to pass the object directly instead of passing a string variable - in case I had a typo or some extra padding in the string. Still no success. At this point, I have no way of passing a custom value to the OneNote Get Page Action.
Question: How can I programatically pass the Page Id as a custom value to the OneNote Get Page Action?
Solved! Go to Solution.
I think I figured it out....
I saw in the documentation (known issues and limitations section) the following text:
Notebook section. If you want to provide a custom value for the Notebook Section parameter, please specify it in the API URL format. The api url pattern:https://www.onenote.com/api/v1.0/myOrganization/siteCollections/{siteCollectionsId}/sites/{SiteId}/n...}
Which made me think that they have changed the format of the PageId value as well.
I tested with the "contentUrl" property returned from the activity that lists all pages in a section. It DID WORK
It is in this format if you need to compose it manually:
https://www.onenote.com/api/v1.0/myOrganization/siteCollections/{SiteCollectionId}/notes/pages/{PageID}/content
Here is screenshot of my flow: https://imge.to/i/mwlWw
Hi @jclewis,
The error is 404 not found means the OneNote Page hasn't exist, may be some user have changed the page in the OneNote, you can confirm the page id whether correct.
If the page id is correct, you can recreate the connection of OneNote, then try it again.
Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @v-litu-msft,
I am having exactly the same problem as @jclewis is having.
My flow iterates through all sections and picks the current month based on the name of the section (MMMM YYYY format).
After "selecting" current month, I get all pages under that section.
Then I iterate through all pages (under the current month section) to find the current daily page (14 August 2019 / DD MMMM YYYY format). As soon as I find the page, I get the page ID to get its content.
This flow was working 100% for months till last week when the last step, where it tries to get the page by page ID fails.
Now I had to create another flow that does the same but every day I have to manually point to the latest page to run my flow.
Can someone please have a look and see why this is happening?
Thanks!
Thank you for the suggestion of refreshing the connection. I removed the existing connection and added a new connection to OneNote to make sure things were working properly. Unfortunately, this did not fix the problem.
I put together a test to see if the Page Id was being properly passed to the OneNote Get Page Action. As you can see here, I was able to use the One Note Get Section Action to process all PageIds directly into the OneNote Get Page Action - this still results in a 404 error. Since this was working a few weeks ago, it would seem something is malfunctioning in the OneNote Get Page Action now.
What's interesting about this test is that it clearly matches on the PageId using the Get Section Action, but not with the Get Page Action. I know this because the condition is met and the match on PageId is working, yet the One Note Get Page Action still yields a 404 for the match condition. As you can see, I'm passing the exact parameter into both Actions. Get Section yelds True, yet Get Page yields 404.
Am I missing something here?
Hi @Anonymous, sorry to see you are having the same issue. I've had to add manual workarounds to my production flows to get around this problem. Hope we can figure it out soon.
I have the very same problem.
I have one flow that gets all pages in a section and then tries to find the one generated today. It uses the Id returned by the "List Pages in section" activity to load the content. https://imge.to/i/OyeH4
It failes consistently since 1sf of August.
Is this a regression and when is expected to be fixed?
I think I figured it out....
I saw in the documentation (known issues and limitations section) the following text:
Notebook section. If you want to provide a custom value for the Notebook Section parameter, please specify it in the API URL format. The api url pattern:https://www.onenote.com/api/v1.0/myOrganization/siteCollections/{siteCollectionsId}/sites/{SiteId}/n...}
Which made me think that they have changed the format of the PageId value as well.
I tested with the "contentUrl" property returned from the activity that lists all pages in a section. It DID WORK
It is in this format if you need to compose it manually:
https://www.onenote.com/api/v1.0/myOrganization/siteCollections/{SiteCollectionId}/notes/pages/{PageID}/content
Here is screenshot of my flow: https://imge.to/i/mwlWw
Hi @knikolov , you are a LEGEND!!!!
I have just updated my flows and now everything is working fine!!!
Thanks a lot for digging into it and discovering how to fix the issue!!!
I owe you a few beers!!! 🙂
I confirmed this with Microsoft support. Around the 1st of August, the format for supplying the Page Id changed from this:
Hi @knikolov I really need this flow, Could you please share again your screenshot for this flow, seems the screeenshot link given has been gone.
Thanks.
OK, I have a question. I have the PageID, but where do I get the site URL?
Check out new user group experience and if you are a leader please create your group
See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.
User | Count |
---|---|
50 | |
39 | |
39 | |
34 | |
33 |
User | Count |
---|---|
69 | |
64 | |
61 | |
54 | |
50 |