Inspiration
Draftpal was inspired by a simple pain point: writing and sending high-quality emails at scale is still too manual. Teams often jump between AI writing tools, spreadsheets, and email clients, which causes delays, mistakes, and inconsistent messaging. The goal was to build one workspace where users can generate better email content, personalize it from sheet data, and automate recurring outreach.
What it does
Draftpal is an AI-assisted email and automation platform that lets users:
- Sign in with Google and send emails through Gmail permissions.
- Compose rich email content with an editor and AI-generated suggestions.
- Send one-off emails or bulk campaigns using Google Sheet CSV data.
- Personalize subject/body using dynamic tokens from sheet columns.
- Upload and embed assets (like images) for polished templates.
- Build automation workflows (timer, sheet check, condition, send, log).
- Schedule recurring runs and trigger manual runs.
- Track run history and sheet-level sent-email logs for visibility.
How we built it
- Frontend: Next.js + React app with authenticated pages for compose, automation, and logs.
- Authentication: Google OAuth with NextAuth plus backend token handling for API access.
- Backend: Node.js + Express APIs for auth, email send, sheet preview/send, and automation.
- Data layer: MongoDB + Mongoose models for users, automation events, runs, and logs.
- Email delivery: Nodemailer with Gmail OAuth2 tokens (including refresh handling).
- AI generation: Gemini (and optional OpenRouter fallback) for content/template assistance.
- Automation engine: Workflow graph validation, scheduling, event execution, and logging.
- Sheet pipeline: CSV parsing, header normalization, row validation, token replacement, attachment URL handling, and recipient filtering.
Challenges we ran into
- OAuth complexity: managing Gmail scopes, refresh tokens, and cross-origin cookie behavior reliably.
- Google unverified app friction during sign-in/testing in hackathon mode.
- Converting many sheet link formats into stable CSV exports and handling redirects.
- Keeping personalization safe and predictable when tokens/columns are missing or malformed.
- Designing automation graph rules (valid nodes/edges, no cycles, one timer) while keeping UX simple.
- Avoiding duplicate sends and adding useful operational logs for debugging.
Accomplishments that we're proud of
- End-to-end product flow from auth to AI drafting to delivery to observability.
- Bulk send preview that catches invalid rows before execution.
- Tokenized personalization that works in both subject and rich HTML body.
- A visual automation experience with real event runs and execution logs.
- Sheet-level and account-level send history that gives practical auditability.
- Resilient architecture with token refresh logic and server-side scheduling.
What we learned
- Email products are as much about trust and reliability as they are about generation quality.
- OAuth and permissions UX can make or break onboarding.
- Guardrails (preview, validation, limits, logs) are essential for safe automation.
- Structured workflow execution plus detailed logs drastically improves debuggability.
- AI output is strongest when paired with deterministic systems like templates and sheet-driven personalization.
What's next for Draftpal
- Add smarter anti-duplicate safeguards and recipient suppression lists.
- Expand workflow nodes (A/B subject tests, delays, webhooks, conditional branches).
- Introduce team features: shared workspaces, roles, approvals, and activity trails.
- Improve analytics: open/click tracking and campaign-level performance dashboards.
- Strengthen deliverability tooling (domain alignment checks, quality scoring).
- Polish onboarding with a verified OAuth app flow and guided template setup.
- Add more AI assist modes: tone controls, audience targeting, and auto follow-up drafts.
Log in or sign up for Devpost to join the conversation.