The Strategic "Free-Tier" Stack
To build a production-ready email workflow with no running costs, this architecture relies on a specific set of services with the most generous free tiers. Each service is selected to handle a critical part of the workflow, from receiving emails to processing data and sending the final quote.
1. Inbound Routing
Cloudflare
Free, unlimited email routing captures inbound user emails.
2. Automation Layer
Make.com
Acts as the "brain," connecting services with a free 1,000-op/mo plan.
3. Backend & Storage
Supabase
The native database for mapping users and storing estimate data.
4. Outbound Sending
Resend
Sends the final email to the client with a 3,000-email/mo free tier.
Architecture Part 1: The 'Ingest' Workflow
The first workflow is triggered when a user forwards a client's email to the app. The system must catch this email, identify the registered user from the "From" address, parse the forwarded body to find the *original client's* email, and save everything to the database.
User (user@company.com) forwards client email
Sends to: parse@in.rapidestimate.io
Cloudflare Email Routing
Catches the email and forwards it to a Make.com Mailhook.
Make.com (Ingest Scenario)
A) Receives email at Mailhook.
B) Searches Supabase for user matching From address.
Text Parser & Supabase (Save)
A) Make.com parses email body to find client@example.com.
B) Inserts a new row in pending_estimates table with user_id and client_email.
Architecture Part 2: The 'Send' Workflow
The second workflow is triggered by the user *inside* the app. After reviewing the pending estimate and creating a quote, the user clicks "Send." This triggers a second, separate workflow to send the final, branded email to the client.
User Clicks "Send Estimate" in App
App sends a Webhook to Make.com with estimate_id and quote_details.
Make.com (Send Scenario)
A) Receives webhook data.
B) Uses estimate_id to get the client_email from Supabase.
Resend API Call
Make.com sends the formatted quote_details to the client_email via Resend.
Client (client@example.com) Receives Quote
A new, branded email with the estimate is delivered.
Justification: The "Free-Tier" Showdown
The choice of this stack is not arbitrary. It's based on a cost-benefit analysis of competing free tiers. Other platforms have fatal flaws (like hard limits on routes or a 10x smaller task allowance) that make them non-viable for a scalable application.
Automation Ops (Per Month)
Make.com's free tier offers 10x the operational capacity of Zapier, making it the clear choice for a scalable application.
Inbound Routes/Webhooks
Cloudflare's unlimited routing is a fatal-flaw eliminator. Competing services limit their free tiers to a single route, making them useless for this architecture.
Outbound Emails (Per Month)
Resend is the verified integration for lovable.dev, but other services like Brevo also offer a competitive free tier, providing flexibility.