Skip to main content

Cursor + Dreamlit

You’re in flow with Cursor. AI writes your code, suggests fixes, keeps you moving. Then you need to add email: welcome messages, notifications, reminders. Suddenly you’re wiring up SMTP, writing templates, and configuring webhooks. Flow broken. Dreamlit brings the same AI-first approach to email. Describe what you want, and the AI builds the workflow. Your Cursor-built app stays focused on your product. Dreamlit handles the notifications. The key concept: Dreamlit watches your database, not your code. When data changes, Dreamlit triggers emails automatically. No SDK, no API calls, no deployment changes.

Who this guide is for

  • Cursor developers who want email without the infrastructure headache
  • Anyone with a Postgres database (Supabase, Neon, Railway, Render, RDS, or self-hosted)
  • Vibe coders who want professional notifications in minutes

Why can’t I just ask Cursor to build email?

You could. Ask Cursor to send a welcome email when someone signs up. It’ll wire up an email provider and write the integration code. But then:
  1. How do you preview that email with real user data before it goes out?
  2. How do you track who opened it? Who clicked?
  3. What happens when emails bounce?
  4. Are you setting up DKIM and SPF records for deliverability?
  5. What about retry logic when the provider has an outage?
  6. What about scheduled emails? Recurring digests? Drip sequences?
  7. After you’ve built a few workflows, how do you see how they’re all performing in one place?
  8. How do you iterate on email copy without redeploying your app?
Or just use Dreamlit and skip all of that. We handle it end-to-end.

Prerequisites

  • A PostgreSQL database for your app (Supabase, Neon, Railway, Render, AWS RDS, Google Cloud SQL, or any Postgres)
  • 5 minutes

Connect Dreamlit to your database

Dreamlit works with any PostgreSQL database. The setup depends on which provider you’re using.
If your Cursor app uses Supabase, connecting is two clicks:
1

Create a Dreamlit account

Go to app.dreamlit.ai and sign up.
2

Connect via OAuth

Click Connect Supabase and authorize the connection. Dreamlit securely connects to your Supabase project.
Connecting Supabase via OAuth
That’s it. 2 clicks and you’re connected.
Need auth emails? (password reset, magic links, email verification) Check out our Supabase Auth Emails guide for one-click setup.

Example: Welcome email workflow

Let’s walk through creating a welcome email that sends when someone signs up.

Step 1: Create the workflow

Click Create Workflow and describe what you want:
“Send a welcome email when a new user signs up”
The AI generates everything: the database trigger, email template, and copy.
AI generating a welcome email workflow

Step 2: Preview with live data

Click any step to open the preview panel and see real data from your database flowing through the workflow.
  • Query steps show the data being fetched or filtered
  • Email steps show the fully rendered email with actual user data
Click Preview with different data to test different scenarios.

Step 3: Customize your email

The AI generates a starting point, but you can refine it:
  • Hover to edit: Hover over any text in the email preview and click to edit inline. Change headlines, body copy, or button text directly.
  • Brand kits: Go to Settings → Brand Kits to define your logo, colors, fonts, and tone of voice. The AI will automatically apply your brand to new emails. Learn more about brand kits →
  • Chat with AI: Ask Dreamlit to make changes: “Make the tone more casual” or “Add a section about our mobile app.”

Step 4: Publish

Once you’re happy with the preview, click Publish. Dreamlit installs a lightweight trigger on your database and starts watching for new signups.

Writing code that triggers emails

Dreamlit triggers emails based on database changes. When building with Cursor, focus on getting data into your database. Dreamlit handles the notification logic. Common patterns:
You want…Write code that…
Welcome emailsInserts a row into users on signup
Order confirmationsInserts a row into orders on checkout
Comment notificationsInserts a row into comments with the author and post
Payment receiptsInserts or updates a row in payments when payment succeeds
Activity alertsLogs actions to an activity or events table
You don’t need to write any email code. Just make sure the data lands in your database, and Dreamlit takes it from there.
Pro tip: Ask Cursor to help you add the database write. Try prompting: “When a user completes checkout, insert the order details into an orders table.”

Deploy anywhere, emails still work

Dreamlit connects to your database, not your hosting provider. Whether you deploy to:
  • Vercel
  • Railway
  • Render
  • Fly.io
  • AWS / GCP / Azure
  • Self-hosted
Your email workflows keep running. Change hosting providers, spin up new environments. Dreamlit watches the database and handles the rest.

More workflow ideas

Looking for inspiration? Check out our use cases for example prompts across welcome emails, order confirmations, reminders, internal alerts, and more.

Send from your own domain

By default, emails send from Dreamlit’s domain. To send from your own domain (like [email protected]), you can set up a custom email domain in minutes.
1

Add your domain

Go to Settings → Email Domains and click Add domain. Enter your domain (we recommend a subdomain like mail.yourapp.com).
2

Verify automatically

Dreamlit can automatically configure your DNS records for you. Just click Verify with your DNS provider, sign in to your provider, and authorize the changes.
Automated DNS verification flow
If your DNS provider isn’t supported for automatic setup, you can add the records manually. Dreamlit shows you exactly what to add.
3

Start sending

Once verified, select your domain when creating email workflows. Your emails will now come from your own brand.
This improves deliverability and looks more professional to your users. Full domain setup guide →

FAQ

Dreamlit works with any PostgreSQL-compatible database: Supabase, Neon, Railway, Render, AWS RDS, Google Cloud SQL, Azure Database for PostgreSQL, CockroachDB, and self-hosted Postgres. Support for additional databases is coming soon.
A few things to check:
  1. Is your workflow published? Saved workflows don’t run until you click Publish.
  2. Is the trigger table correct? Make sure it matches where your app actually writes data.
  3. Is data being written? Check your database to confirm rows are being created.
  4. Try the preview. Use the preview to test with sample data and verify the workflow runs.
No. Dreamlit connects to your database, not your hosting. Deploy your Cursor-built app anywhere: Vercel, Railway, Render, AWS, or self-hosted. As long as Dreamlit can reach your database, your email workflows will run.
Yes. Dreamlit works with Next.js, React, Vue, SvelteKit, Express, FastAPI, Django, Rails, and any other framework that writes to a Postgres database. The framework doesn’t matter. The database does.
No, and that’s the point. Your email workflows live in Dreamlit, separate from your codebase. This means you can iterate on emails without touching code, and non-technical teammates can make changes too.
Yes. Dreamlit supports Slack alongside email. Just describe what you want: “Notify our team on Slack when a new order comes in.” Learn more about Slack →
Use the preview feature to send test emails to yourself with real data from your database. Your workflow won’t email actual users until you publish it.
Dreamlit works alongside traditional email providers. Since we take a fundamentally different approach (database-driven, AI-generated workflows), you don’t need to migrate off your existing setup. Try Dreamlit for your next workflow and keep using your current provider for everything else.

You’re all set

Describe what you want. Dreamlit builds it. Now get back to building with Cursor.