All guides

Ship them

Lovable apps

Put your designs into a Lovable project with one prompt, including emails in edge functions.

Before you start

In Lovable, set up your email domain under Cloud → Emails so your app can send from your own address. The export works for both kinds of email a Lovable app sends:

  • Lovable's built-in emails: the auth emails (sign-up, reset password…) and app emails Lovable manages for you.
  • Emails in your own edge function: emails your project builds itself in a Supabase edge function, for example with Resend.

Connect TemplatePort to Lovable

Instead of copying prompts, you can let Lovable's agent fetch your emails itself. TemplatePort works as an MCP server: a connector Lovable (and apps like Claude Code or Cursor) can talk to.

  1. 1In TemplatePort, open Providers and scroll to Use TemplatePort from Lovable. Copy the server URL and choose Create key. The key is shown once.
  2. 2In Lovable, open Connectors, select + and choose MCP server. Name it TemplatePort and paste the server URL.
  3. 3Choose Bearer token as the authentication and paste the key.
  4. 4In your project chat, ask for what you need, such as Use TemplatePort to update my auth emails or Which TemplatePort emails changed since I last updated them?

The agent can list your templates, read your brand kit, browse the gallery, add a gallery design to your templates and get any email as code with the same rules as the export prompt. Every email it fetches counts as an export, so Re-export and the out-of-sync labels keep working.

On the Free plan the agent can browse. Fetching emails as code comes with the Launch Pack and Pro. Each key allows 60 calls an hour; revoke a key on the Providers page and it stops working right away.

Exporting several emails at once

  1. 1On the Templates page, choose Export to Lovable.
  2. 2Tick the emails, or Select all.
  3. 3For each one, pick where it goes: an app email, one of the auth emails, or an email in an edge function.
  4. 4Copy the prompt and paste it into your Lovable project's chat. Long exports are split into parts: paste them one after the other.

The prompt tells Lovable to keep your sign-in links and variables working, use a white background, and leave other emails alone. For one email, the editor's Export → Lovable tab does the same.

Emails in an edge function

Choose Email in an edge function and enter the function's name (its folder in supabase/functions, such as send-notification-email) and the email's name inside it (such as booking_confirmation).

  • If the email was pushed to Resend, Lovable changes the function to send that Resend template. From then on, design changes are just a push from TemplatePort: no code change, no Lovable credits.
  • Otherwise the prompt includes a small file with the subject and HTML, and Lovable uses it for that email.

Lovable only changes the email you named. Checks on who can send, the data, the recipients and the sender address stay as they are.

Updating later

Exported emails show a Lovable label on the Templates page. When you change one, or your brand kit, it shows as out of sync and Re-export to Lovable opens the export with those emails ticked.

Each exported file starts with a "Made with TemplatePort" comment, so you (and Lovable) know where to change it.

Something unclear or missing? Email support@template.app.