Back to Blog
Automation Workflows

Route New Supabase Users to Resend with n8n

n8n
n8n Resources Team
April 20, 2026

Ready to automate?

Browse 5,000+ copy-paste n8n workflow templates.

When someone signs up for your product, the first few minutes matter. A welcome email sent within seconds of registration sets expectations, surfaces key features, and reduces early drop-off. But if your user auth lives in Supabase and your transactional email runs through Resend, connecting them typically means writing server-side code that handles the webhook, formats the payload, calls the Resend API, and handles retries when the request fails.

That code works — until you need to change your welcome copy, add a condition to skip test accounts, or route different plan tiers to different email templates. At that point you're back in the codebase, writing tests, and deploying changes for what should be a simple configuration update.

n8n moves this logic out of your application. A small workflow handles the connection between Supabase and Resend without any custom code, and you can update email content, conditions, or routing rules from the n8n canvas at any time.

What You'll Build

This workflow listens for new user registrations in your Supabase project. When a new account is created, n8n receives the event, extracts the user's details, and sends a personalized welcome email through the Resend API. Optionally, it logs the delivery back to your database so you have an audit trail.

It fits well for:

  • SaaS products that use Supabase Auth for sign-up and login
  • Developer tools where users register with an email and password
  • Internal platforms where new accounts should trigger an onboarding notification

How Supabase and Resend Connect

Supabase is an open-source Firebase alternative built on PostgreSQL. Its Auth service records every new user in an auth.users table and includes a built-in Database Webhooks feature that fires an HTTP POST request to any URL when a row is inserted, updated, or deleted.

Resend is a transactional email API aimed at developers. It accepts POST requests to a single endpoint, supports HTML and plain-text email bodies, and provides delivery tracking through a dashboard or webhook events. It has become a popular choice among developers building on modern stacks because its API is straightforward and its free tier is generous.

The two services connect at the Supabase Database Webhook: Supabase fires a POST to n8n when a new user row appears, and n8n forwards the relevant data to Resend as a send request.

The n8n Workflow: Step by Step

Step 1: Webhook Trigger Node

Add a Webhook node to your workflow and set the HTTP method to POST. Copy the generated webhook URL — you will need it in the next step.

In your Supabase project, navigate to Database → Webhooks and create a new webhook. Set the table to auth.users, the event to INSERT, and the endpoint URL to the n8n webhook address you just copied. Save the webhook. From this point forward, every new user registration will fire a POST request to your n8n workflow.

Step 2: Set Node — Extract User Fields

The Supabase webhook payload wraps the new user data inside a record object. Add a Set node to pull out the fields you need: id, email, and created_at. Mapping these to flat variables early keeps every downstream node clean and makes the workflow easier to read when you return to it later.

Step 3: IF Node — Filter Out Test and System Accounts

Not every row inserted into auth.users represents a real signup. Service accounts, automated test users, and anonymous auth sessions can all create rows. Add an IF node that checks two conditions: the email field must be present, and it must not match a pattern like @example.com or @test.com.

If either condition fails, route the execution to a No Operation node — this ends the workflow silently without sending an email or logging an error. If both conditions pass, continue to the email step.

Step 4: HTTP Request Node — Send via Resend

Add an HTTP Request node with the following settings:

  • Method: POST
  • URL: https://api.resend.com/emails
  • Authentication: Header Auth, with your Resend API key passed as a Bearer token
  • Body type: JSON

In the request body, include four fields:

  • from — your verified sender address (must be a domain you have configured in Resend)
  • to — the email value extracted in Step 2
  • subject — your welcome email subject line
  • html — the email body, where you can reference the user's email using an n8n expression such as Welcome to the platform, {{ $json.email }}

This single HTTP Request node is the entire send step. Resend's API accepts the payload, queues the message, and delivers it — no SDK required.

Step 5 (Optional): Supabase Node — Log Delivery Status

If you want to track which users have received the welcome email, add a Supabase node configured to upsert a row in a profiles table. Set a welcome_email_sent_at column to the current timestamp using n8n's $now expression.

This creates a lightweight audit trail and lets you build follow-up automations later — for example, a second workflow that identifies users who have not received the email and retries delivery after a set interval.

Step 6 (Optional): Error Workflow

Enable the Error Workflow setting on your main workflow and point it to a secondary n8n workflow. That secondary workflow can catch any execution failures and either log the failed payload to a Supabase table or send an alert to a developer notification channel. Silent failures in transactional email are easy to miss without this.

Tips for Production Use

Test with Resend's sandbox mode. Resend accepts API requests in test mode without delivering emails. Use a test API key while you iterate on the workflow to avoid sending partial welcome emails to real users.

Parameterize your email content. Store the subject line and HTML body in n8n Workflow Variables or a configuration table in Supabase rather than hardcoding them inside the HTTP Request node. This lets you update copy without opening the workflow editor.

Handle email confirmation delays. If your project requires users to verify their email before their account is active, consider triggering the workflow on the email_confirmed_at field update rather than the initial INSERT. You can configure the Supabase webhook to fire on UPDATE events and add an IF node that checks whether email_confirmed_at changed from null to a timestamp.

Extend to multiple email types. Once this workflow is running, the same pattern handles other transactional triggers — password reset confirmations, plan upgrade notifications, or trial expiration warnings. Each is a new workflow with a different Supabase event and a different Resend payload.

Why This Belongs Outside Your Application

Transactional email logic that lives inside application code changes more frequently than infrastructure code. Subject lines get A/B tested, conditions get refined, and new user segments get added. Keeping this logic in n8n means those changes happen in a visual workflow editor rather than a pull request cycle.

It also means the integration survives a stack migration. If you move from Resend to another email provider, or add a second email step for a different user segment, you update the workflow — not the application. For teams building on Supabase who want to keep their codebase lean, this separation is practical rather than theoretical.

Ready-to-Use Templates

If you want to skip the manual setup, n8nresources.dev/templates includes pre-built workflow templates for Supabase webhook integrations and Resend email delivery. Import the workflow, add your API keys, and the signup-to-email pipeline is live in minutes. The library covers hundreds of other tool combinations across CRM, DevOps, analytics, and product automation — ready to deploy and adapt.

Enjoyed this article?

Share it with others who might find it useful