Your Inbox, Intelligently Managed
Live: https://hellotria.vercel.app/
Before you begin, make sure you have:
- Node.js (v18 or higher)
- Docker and Docker Compose
- Git
- A Gmail account (for email fetching)
- Gemini API Key (Google AI Studio)
- Resend API Key (optional β for sending replies)
- Slack Webhook URL (optional β for notifications)
git clone https://github.com/yourusername/tria.git cd tria- Copy the example env file:
cp .env.example .env.local- Open
.env.localand add your credentials:
# Supabase NEXT_PUBLIC_SUPABASE_URL=your_supabase_url SUPABASE_SERVICE_ROLE_KEY=your_service_role_key # NextAuth NEXTAUTH_URL=http://localhost:3000 NEXTAUTH_SECRET=your_nextauth_secret # Google OAuth (Gmail) AUTH_GOOGLE_ID=your_google_client_id AUTH_GOOGLE_SECRET=your_google_client_secret # Kestra KESTRA_API_URL=http://localhost:8080 # Webhook Keys (must match Kestra secrets) TRIA_EMAIL_TRIAGE_WEBHOOK_KEY=your_webhook_key SEND_EMAIL_WEBHOOK_KEY=your_send_email_key UPDATE_SETTINGS_WEBHOOK_KEY=your_update_settings_key GET_SETTINGS_WEBHOOK_KEY=your_get_settings_key SLACK_WEBHOOK_KEY=your_slack_webhook_key REPLY_EMAIL_WEBHOOK_KEY=your_reply_email_keyKestra expects secrets in base64 format.
echo -n "your_gmail_client_id" | base64 echo -n "your_gmail_client_secret" | base64 echo -n "your_gmail_refresh_token" | base64 echo -n "your_gemini_api_key" | base64 echo -n "your_resend_api_key" | base64 echo -n "your_slack_webhook_url" | base64Save these encoded values β youβll need them next.
docker-compose up -dVerify:
docker psAccess Kestra UI: http://localhost:8080
Default credentials
- Username:
admin@kestra.io - Password:
kestra
If volume mapping is correct, flows auto-load.
Check:
- Kestra UI β Flows
- Namespace:
tria
Expected flows:
hi-triasend-email-via-gmailget-user-settingsupdate-user-settingsslack-notificationreply-email-via-resend
- Kestra UI β Flows β Create
- Copy
.ymlfiles from/flows - Paste into editor
- Save each flow
Edit docker-compose.yml:
services: kestra: image: kestra/kestra:latest environment: GMAIL_CLIENT_ID: "base64_client_id" GMAIL_CLIENT_SECRET: "base64_client_secret" GMAIL_REFRESH_TOKEN: "base64_refresh_token" GEMINI_API_KEY: "base64_gemini_key" RESEND_API_KEY: "base64_resend_key" SLACK_WEBHOOK_URL: "base64_slack_webhook" TRIA_EMAIL_TRIAGE_WEBHOOK_KEY: "tria-email-triage-key" SEND_EMAIL_WEBHOOK_KEY: "send-email-webhook-key" UPDATE_SETTINGS_WEBHOOK_KEY: "update-settings-webhook-key" GET_SETTINGS_WEBHOOK_KEY: "get-settings-webhook-key" SLACK_WEBHOOK_KEY: "slack-key" REPLY_EMAIL_WEBHOOK_KEY: "reply-email-webhook-key"Restart Kestra:
docker-compose down docker-compose up -dKestra β Namespaces β tria β KV Store
Add:
| Key | Type | Example |
|---|---|---|
user_tria_FULL_NAME | STRING | Shivam Kumar |
user_tria_ROLE | STRING | Software Developer |
user_tria_EMAIL_INTERESTS | STRING | AI, newsletters, tech updates |
user_tria_COMMUNICATION_STYLES | STRING | Professional, concise |
user_tria_KEY_CONSTRAINTS | STRING | Never reply to no-reply emails |
Optional via API:
curl -X PUT http://localhost:8080/api/v1/namespaces/tria/kv/user_tria_FULL_NAME \ -H "Content-Type: text/plain" \ -d "Shivam Kumar"npm install npm run devOpen: http://localhost:3000
- Ensure Kestra is publicly reachable
- Set
KESTRA_API_URLin Vercel env vars
If Kestra is unreachable, Tria falls back to mock data.
- Can only send to verified emails
- Add your email in Resend dashboard
- Verify domain in Resend
- Send from
noreply@yourdomain.com
Alternative: use Gmail sending flow (no domain required).
- Open
/dashboard - Check summaries, badges, and drafts
- Click Send to Slack
- Verify notification
- Open an email
- Review draft
- Send reply
- Update preferences
- Save
- Refresh dashboard
- Re-trigger fetch
-
Check volume mapping:
- ./flows:/app/flows -
Restart Kestra
- Ensure base64 encoding
- Restart containers
- Check logs
- Confirm Kestra is running
- Verify
KESTRA_API_URL - Check browser console
- Validate OAuth credentials
- Refresh token validity
- Manually run
hi-triaflow
- Verify API key
- Verify recipient or domain
- Use Gmail fallback
Tria is now ready to:
- β Triage emails automatically
- β Show AI summaries
- β Draft and send replies
- β Notify via Slack
- β Personalize scoring
- β Compose new emails
- Kestra: https://kestra.io/docs
- Resend: https://resend.com/docs
- Gmail API: https://developers.google.com/gmail/api
- Gemini API: https://ai.google.dev