How to Extract Onenote Object Data and Attach that file to a new Sharepoint List Item?

Christiano, John 0 Reputation points
2023-04-05T06:35:19.5+00:00

I have a OneNote Notebook, and I have a Power Automate Flow that detects when a new page is created and after an initialization delay attempts to locate an attached file to the new page. If there is an attachment, there will only be one, and it needs to be auto-saved to a new sharepoint item.

https://github.com/microsoftgraph/microsoft-graph-docs/blob/main/concepts/onenote-get-content.md#image-or-other-file-resource

accessing the file resources seems straight forward, but I cannot for the life of me figure out how to build a proper call or otherwise finagle powerautomate to function as expected to pull the file (PDF) from OneNote and attach to sharepoint.

FYI both the notebook and the sharepoint list are own by my org, and I have proper endpoints from what I can tell. Its very rough right now, and I feel having to discover the object URL and then transform it with multiple 'replace' functions to make it usable for a graph call is just overkill and overthinking the problem.

I would love a solution here, been overthinking this for a couple weeks now. Any direction would be great (that does not use premium powerautomate connectors please- they shouldnt be necessary)

OneNote
OneNote
A family of Microsoft products that enable users to capture, organize, and reuse notes electronically.
168 questions
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,839 questions
SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
9,865 questions
Office Development
Office Development
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Development: The process of researching, productizing, and refining new or existing technologies.
3,583 questions
SharePoint Development
SharePoint Development
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Development: The process of researching, productizing, and refining new or existing technologies.
2,713 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. RaytheonXie_MSFT 32,166 Reputation points Microsoft Vendor
    2023-04-05T09:29:00.46+00:00

    Hi @Christiano, John, Since our forum focus on C# and your issue is about power automate. I will recommend you to raise a new ticket on Microsoft Power Automate Community. This is a forum dedicated to Power AutoMate. You will get some more professional advice there.

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment". Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.