> ## Documentation Index
> Fetch the complete documentation index at: https://docs.migma.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Lovable

> Use Migma from Lovable apps with server-side email sending.

Use Migma with Lovable when an AI-built app needs real email sending, campaign drafts, contacts, webhooks, or delivery logs.

## Recommended setup

<Steps>
  <Step title="Start from Migma handoff">
    In Migma, open **Create**, click **Set up Migma with agent**, and paste the copied `/setup` prompt into Lovable's agent.
  </Step>

  <Step title="Approve agent access">
    Use [agent registration](/agent-registration) first. Add `MIGMA_API_KEY` as a Lovable backend secret only if the agent cannot complete registration.
  </Step>

  <Step title="Add a fallback secret">
    Store `MIGMA_API_KEY` in Lovable's backend environment. Do not expose it in browser code.
  </Step>

  <Step title="Create or choose emails">
    Prepare emails in Migma and save returned `emailId` values in backend config.
  </Step>

  <Step title="Wire backend sends">
    Send from server routes, jobs, or trusted functions only.
  </Step>
</Steps>

## Prompt

Use this only if you cannot copy the in-app handoff prompt.

```text theme={null}
Use Migma's /setup workflow for this Lovable app.
Use agent registration before asking me for an API key.
Find signup, invite, billing, and notification email triggers.
Use existing Migma emailId values where available.
Wire sends only in backend code.
Add a dry-run path before live sending.
```

## Next

<CardGroup cols={2}>
  <Card title="AI App Builders" icon="cube" href="/agents/app-builders">
    Builder checklist and surface choice.
  </Card>

  <Card title="Agent Handoff" icon="copy" href="/agents/agent-handoff">
    In-app setup prompt and Copy for AI flow.
  </Card>

  <Card title="API Quickstart" icon="code-bracket-square" href="/quickstart">
    Send your first API request.
  </Card>
</CardGroup>
