Integración de Resend para emails transaccionales y seguimientos
Clase 20 de 27 • Curso de lanzamiento y monetización de webs con Lovable
Resumen
Level up your app’s email workflow with a clean Resend setup that covers password resets, transactional emails, and targeted follow-ups for canceled subscriptions. Learn how to verify a domain, turn on Supabase email confirmations, create an API key, and trigger emails from an edge function using Lovable’s chat-driven workflow.
How to set up Resend integration for transactional emails?
Getting started is straightforward. Resend is a developer-friendly SaaS for sending emails that integrates smoothly with Supabase. Ensure your domain is verified and your authentication flow in Supabase is ready to send emails again.
- Log in to Resend with Google and choose an existing account or set up a new one.
- Click Add Domain and verify DNS records for your app’s domain.
- In Supabase: go to Authentication > Sign in and providers, re-enable confirm email.
- In Resend: go to project settings > Integrations, connect the Supabase integration.
- Start on the free plan. Pricing is low and friendly for testing.
What domain verification steps matter in Resend?
You must add and verify a domain before sending. Set DNS records as instructed by Resend. This domain becomes your sending domain, which must match the domain used when sending via API or edge function.
How to enable confirm email in Supabase authentication?
Previously disabled for testing, now turn it back on. Under emails, review settings so password resets and confirmations can be delivered through Resend once integrated.
Where to find the Supabase integration in Resend?
Open your project settings. On the right side panel, locate Integrations and select Supabase. Click integrate and connect your Supabase project. That’s it.
How to send follow-up emails with an edge function and API key?
Beyond password resets, you can automate lifecycle messaging. Create a Resend API key and wire it to an edge function that sends a follow-up to users in a canceled subscriptions table.
- In Resend: create an API key (example name: “Platzidemo”), grant full access, and include all domains. Copy it.
- In your Lovable project: declare you will use Resend.
- Open the follow-ups page and plan a Send email button for the canceled subscriptions table.
- Add a test row with your own email to validate the flow.
- Use Lovable’s chat mode: ask it to add the button, create the edge function, and wire the API key.
- When prompted, paste the API key securely.
What workflow in Lovable sets up the follow-up button?
Lovable scans the codebase, proposes a plan, and generates an edge function to send the follow-up email. It also enables adding rows to the canceled subscribers table so you can test the end-to-end path quickly.
How to fix a non-200 edge function error by setting a sending domain?
If the edge function fails with a non-200 status, verify the sending domain. Update it to the exact domain verified in Resend (for example, a specific domain connected to your Resend account). Checking Supabase logs can reveal a domain mismatch. Apply the quick fix and re-run the action.
What results and lifecycle benefits does this Resend setup provide?
After fixing the sending domain, the follow-up email sends successfully. The message can include a friendly template like “We’re sorry to see you go,” and optional items such as feedback prompts or a special offer. It’s a powerful way to improve user lifecycle communications.
- Warm up churned users with follow-up emails.
- Send password resets and confirmations reliably via Resend.
- Share product updates or blog posts to keep users engaged.
- Centralize email sending with a verified sending domain and Supabase integration.
Have questions or want to share how you’d personalize the follow-up template? Drop a comment and let’s iterate together.