Inspiration

I work a job that’s heavy on customer emails, especially tracking payments. Manually opening each e-transfer email just to grab the reference number is a hassle. I figured — if I’m already pulling emails with the Gmail API, why not automate it and add AI for flexibility down the line?

What it does

InboxMiner takes two prompts from the user:

What emails to fetch (e.g. “unread emails from last 7 days”).

What data fields to extract — each defined by [data_name], [description], [type]. Example:

"summary", "a short summary of what the email is about", "string".

It then fetches matching emails, parses them with Gemini, and exports the results into a structured CSV.

How we built it

The app is built on Next.js with serverless API routes. It uses NextAuth with Google OAuth to authenticate into Gmail. Emails are fetched via the Gmail API, then passed into the Gemini API with a strict prompt and schema for structured extraction. The results are validated, converted to JSON, and exported as CSV for download. The UI is intentionally minimal — just a query box, run button, and CSV export link.

Challenges we ran into

First time using the Gemini API

First time using the Gmail API

First time at Hack the North

First time doing a hackathon solo

Accomplishments that we're proud of

At my first hackathon, my team finished but I didn’t feel like I contributed much. This time, I stuck it out, worked solo, and built the whole project myself. That’s something I’m really proud of.

What we learned

“Vibe coding” (just building and figuring things out) works surprisingly well. But I also learned how important it is to design prompts carefully and understand how APIs and services connect. Setting up and experimenting with the Gemini API and Gmail API was both challenging and rewarding.

What's next for InboxMiner

Right now, I’ll be using it at my job to track e-transfer payments. The next step I’d like to explore is adding support for searching and translating foreign-language emails, so the tool isn’t limited to English inboxes. Beyond that, I’d love feedback on how to extend it further — I built it for a narrow purpose (and with very little sleep), so I’m curious what broader use cases others can see. Some potential ideas: Multi-language support – not just translation, but also extraction of key fields (like amounts, names, reference numbers) from non-English emails.

Smart categorization & tagging – auto-tagging emails (e.g. payment, invoice, customer request) to help with faster triage and reporting.

CRM/Sheets integration – exporting extracted data directly into Google Sheets, Airtable, or a CRM instead of just CSV, so it fits into existing workflows.

Built With

  • geminiapi
  • gmailapi
  • next.js
  • nextauth
  • oauth
  • serverlessapi
Share this project:

Updates