Spark to Box Upload
Numerous companies out there use some form of cloud storage for sharing documents between employees, which most times is sensitive data and you definitely want a secure transport for these documents. Box has been a great application for secure cloud-based document sharing in corporate environments. If you also use Cisco Spark for document sharing in rooms, these documents can most times get lost in the conversation trail. It is definitely nice to have a way to upload the document to a certain box folder so that its safely stored in that share.
#boxit is a bot that was created under 2 hours of coding. The idea is to have a bot that when activated in a Cisco spark room, after someone posts a document (PDF, WORD, PPTX, XLS, JPG or any other supported by Cisco Spark) , the bot will then go back into the last 3 messages posted in that Spark room and retrieve the file and post it in a shared box folder. The bot command also requires that you specify a box file name of your choice and file type of the upload. So the command will look like #boxit filename extn This will ensure that the file is uploaded as filename.extn. As you can see in the screenshot below i am uploading a PDF document and want to upload this document into box with the name "abarth" with extension "pdf"
Cisco Spark APIs can be utilized for retrieving text messages and file attachments. These file attachments are not easily revealed by Spark. You still have to go through Oauth2 authentication to retrieve the actual file. Secure enough huh ?.
Box uses oauth2 authentication too so you have to procure a token before uploading to any folder with in box. Every box folder is identified by a folder ID. Once you know the folder ID, then upload is easy. Box file upload also allows retrieving a share-able link to that file or folder but again this link is usually extremely long, so it may make sense to shorten the url using BMP.IO or something similar and then post that link back to the Spark room for reference.
There are more refinements to be made to this bot, but for a start any one can simply type #boxit and upload the file to their box share. Again keep in mind, on the back end, you still need Kortana as a bot in the room, so please remember to add snair.snair@gmail.com to your room to access this function.
Let me know what you think about this bot and blog entry..Feel free to leave a comment.
Enhancements added :
1. Since my last post i have removed the requirement to specify a filename. Now you can simply type #boxit to upload the file as it is. The file name is retrieved from Spark as you post it and reuploaded with the same filename to the Box share.
2. Multiple file uploads are now supported. Bot will go back into the room and look at the last 7 messages (essentially 5, since last 2 messages are generated from the command you typed). If there are multiple files, it will upload individually each file and post a separate link to either files.
3. Box files uploaded are tagged with a description stating who originally uploaded the file into the room. This does not change ownership of the document, but merely a description that states the history of the document.
4. Boxit can add tags to your files. If you type #boxit <tagname> it will create a box tag for you. As you can see below i uploaded a file (PPTX) and typed #boxit with a tag name called bid assurance. The bot uploaded the file to Box and posted the link back into the room like it usually does.
If you were log into box.com and look at the same file, you can now see a tag attached to that file. Tags in Box can be very informative for other readers while searching for a document or it can also be helpful to provide a informative description about a document.
5. This is 100% internal bot command. If any one exterior to the company tries to access this bot function, you may get a similar message as below :)