Have you ever wanted to easily export files you have created with OneNote and add these files into Dropbox, or your favorite cloud storage application? Well you can now easily do this using our Documents Hub! Cloud Elements is proud to announce the new addition of OneNote API to our Documents Hub. Since OneNote is primarily a note taking application, how does this Element integrate with our cloud storage providers or “Elements” like Dropbox?
At first it might feel like this digital note taking app doesn’t belong in a documents management Hub with cloud storage providers like Box, Dropbox and Google Drive, but if you were to take away the file editing option in OneNote, you would be left with file management. Which is what applications like Dropbox and Box are all about.
Let’s take a closer look at how we integrated OneNote API into our system.
OneNote is an application that consists of Notebooks, Sections, and Pages. Where each Notebook can have Sections inside it, just like how Pages can be inside Sections. A very interesting idea, designing an application to resemble the organization of a spiral notebook, but this design can be limiting when comparing this structure to the directory system of Dropbox or even your own computer. Let’s compare how OneNote’s file tree would look like in Dropbox:
/<Notebook Name>/<Section Name>/<Page Name>
/<Folder A>/<Sub_Folder 1>/<Document 1>
You can see how it is pretty similar. It is important to note that even though OneNote API can easily map to other systems, other systems would not easily map to OneNote. Just like the saying “A square is always a rectangle, but a rectangle is not always a square.” The same applies here because OneNote does not allow for files to exist in the first folder level, ‘Folder A’.
Discovering this similarity in file structure allowed for us to determine how we could integrate endpoints like GET /folder/contents and POST /folder.
The only thing left is how would we integrate creating new files? This was challenging because OneNote requires users to upload files in HTML to their API. Plus we couldn’t simply upload files and not allow them to be editable in an application that is based around editing files.
So we went to the drawing board and researched the different ways we could convert different types of files to HTML. We ended up with a solution that would not only allow users to upload .doc, .jpg, .png, .txt, but users could also upload a .pdf in two different ways! That’s right, users are now able upload .pdf files to OneNote as either an embedded file or as an editable file.
So what does we mean a user can upload a .pdf as an editable file? It means, you can give us a .pdf and we will pull out the text from the file and add it to the OneNote page, allowing users to edit the contents of the uploaded file. Pretty cool right? Check this new Element out in our Documents Hub, a category of cloud storage providers.