Inspiration
The second I had heard about this onboard AI hackathon I had the idea. It struck me instantly. How useful would it be to have a chrome extension that gave you a quick summary of what's going on in your inbox? While there are indeed extensions on the web store that summarize individual emails, nothing has the ability to summarize the entire inbox. The problem? I have almost zero webdev experience and its finals season.
What it does
Crystal injects itself into the inbox page and gives the user a summary of the available emails.
How I built it
Let me tell you, with no webdev experience other than an introductory course two years ago there was a ton of throwing myself against the metaphorical wall until I got things to work. This is how Crystal currently functions: when chrome loads gmail.com it injects the extension script into the webpage. Once inside gmail.js is used to get the email contents on the current page. Each email is summarized to allow the API to get as much info as possible and then added to a string. That string is then summarized to get a short blurb to be displayed at the top of the email tab.
Challenges we ran into
As you may be able to tell by the github page there were 3 main iterations of Crystal that I went through until I was able to get it properly functioning. The first iteration was made from scratch attempting to get the summary API and the gmail-js to play together and trying to use the gmail API. That proved an insurmountable hurdle and so the next attempt used the demo summary extension as the base. I managed to get that working with gmail-js until I realized I had gotten it to work inside of the side panel and that html obviously had no data from the main gmail page. Finally I realized that instead of using the summary chrome extension demo code I could reverse that and use the gmail.js boilerplate which I had working by then and add the summary API system into that, the rest is history.
Accomplishments that we're proud of
Honestly given my lack of experience in webdev every single uptick in progress was a massive accomplishment to me. When I first got the summary API to work after a day of no success I got stuck in a loop of saying "okay okay okay" repeatedly for so long my roommate got worried. Finally getting the gmail.js and summary API to work together gave me a dopamine spike that would make a neurologist have an aneurism. Every programmer however stands on the shoulders of giants and once again I need to say this project simply would not have been possible without Jostein Kjønigsen's fantastic gmailjs library.
What we learned
Every step I took was a learning experience. I can honestly say that I learned a vast amount about javascript in this process and how to use it to interact with web pages and their style sheets. I'm incredibly thankful for this hackathon for demystifying the process of creating chrome extensions. I love tinkering and experimenting with things so this baseline knowledge unlocks an infinite number of possibilities in the future.
What's next for Crystal
I believe this project has a future and offers something that other people would be interested in using. I plan on taking the knowledge I have gained during this hackathon and reinvesting it into Crystal and work towards publishing it to the chrome webstore. I plan on finding the ways to further optimize the text I am putting into the summarizer and hopefully the character limit will be lifted or significantly increased in the future. Check in again in a few months by looking up "Crystal" in the chrome web store :)
Built With
- gmail.js
- javascript
Log in or sign up for Devpost to join the conversation.