🔓 Unlock all 10,000+ workflows & prompts free Join Newsletter →
✅ Full access unlocked — explore all 10,000 AI workflow and prompt templates Browse Templates →
Home n8n Workflow
January 22, 2026

OpenAI + Supabase, enriched leads you can trust

Lisa Granqvist Partner Workflow Automation Expert

Your lead list looks “fine” until you actually try to use it. Missing job titles. Vague company fields. Notes that say “met at conference” and nothing else. Lead enrichment automation fixes that gap before it turns into bad routing and awkward outreach.

Marketing Ops gets stuck cleaning spreadsheets instead of building campaigns. Sales reps lose time researching basics before they can write a decent first email. And founders doing their own outbound feel it too, because every mistake is personal (and visible).

This workflow takes the contact data you already have, asks OpenAI to fill what’s missing and generate buyer insights, then logs both the input and the AI output into Supabase so you can trust what happened later. You will see how it works, what you need, and where teams usually trip up.

How This Automation Works

The full n8n workflow, from trigger to final output:

n8n Workflow Template: OpenAI + Supabase, enriched leads you can trust

The Problem: Incomplete leads create messy outreach

Most “lead problems” aren’t volume problems. They’re quality problems. You import contacts from forms, events, list pulls, referrals, or a CRM export, and half the fields are blank or inconsistent. One contact has “VP Marketing,” another has “Marketing Lead,” another has nothing. Then you try to segment, score, or route leads and it turns into guesswork. People patch the data manually, which is slow, and honestly it still leaves you with questionable profiles.

It adds up fast. Here’s where it breaks down in real life.

  • Reps spend about 10 minutes per lead researching basics before sending anything.
  • Bad titles and missing roles cause misrouted leads, so the wrong person follows up (or nobody does).
  • Personalization variables end up empty, which makes campaigns look sloppy and “spray-and-pray.”
  • You can’t audit what changed later, because the enrichment happened in someone’s browser tabs.

The Solution: AI enrichment with Supabase logging

This n8n workflow gives you a clean, repeatable way to enrich contact records as they arrive. It starts with a webhook that receives basic lead info (email or name at minimum, plus whatever else you have like company, LinkedIn URL, website, notes). n8n standardizes that payload, adds a unique ID and timestamp, then composes an AI request that tells OpenAI what to infer and how to respond (structured JSON). After the AI returns enrichment data, the workflow writes the original input and the AI output into Supabase, creating an audit trail you can query later. Finally, it replies with a simple success response so the system that sent the lead knows it worked.

The flow is simple: a webhook receives a lead, OpenAI generates missing details and buyer insights, and Supabase stores both sides of the exchange. That storage piece is the difference between “AI guessed something” and “we can prove what happened and improve it.”

What You Get: Automation vs. Results

Example: What This Looks Like

Say you add 30 new leads a week from a form and a list upload. If a rep spends about 10 minutes per lead to find a likely title, seniority, pain points, and a few personalization ideas, that’s about 5 hours weekly. With this workflow, you push each lead into the webhook in under a minute, wait roughly a minute for the AI response, and it’s logged in Supabase automatically. You get those hours back, and the data is consistent across the whole team.

What You’ll Need

  • n8n instance (try n8n Cloud free)
  • Self-hosting option if you prefer (Hostinger works well)
  • OpenAI to generate enrichment and persona JSON
  • Supabase for audit logging and querying results
  • OpenAI API key (get it from the OpenAI dashboard)

Skill level: Intermediate. You will connect credentials, set a few environment variables, and test a webhook payload.

Don’t want to set this up yourself? Talk to an automation expert (free 15-minute consultation).

How It Works

A webhook receives a new lead. Your form, CRM, or internal tool sends JSON with an email or name (and ideally company plus LinkedIn URL). That single endpoint becomes your “front door” for enrichment.

The incoming data gets cleaned and packaged. n8n standardizes field names, adds a unique ID and timestamp, then prepares a structured prompt that asks for missing details, company context, and buyer insights in JSON format.

OpenAI enriches the contact. The workflow calls the OpenAI Chat model through an HTTP request, using environment variables for provider, model, and API key. If you later switch providers, you update the config once instead of rebuilding the whole flow.

Supabase stores an audit record and n8n replies. The workflow writes both the original payload and the AI response into a Supabase table (so you can review, query, and export). Then it returns a short “success” response to the system that sent the lead.

You can easily modify the enrichment prompt to match your ICP and tone based on your needs. See the full implementation guide below for customization options.

Step-by-Step Implementation Guide

Step 1: Configure the Webhook Trigger

This workflow starts when an external system calls your webhook endpoint.

  1. Add and open Incoming Webhook Start.
  2. Copy the webhook URL generated by Incoming Webhook Start and use it in your source system.
  3. Connect Incoming Webhook Start to Transform Input Payload to match the execution flow.

Tip: Test the webhook URL with a sample payload to validate that Incoming Webhook Start receives data before continuing.

Step 2: Connect Supabase

Data from the AI enrichment is stored in Supabase.

  1. Add and open Persist to Supabase.
  2. Configure the destination table and fields to match your enrichment output.
  3. Ensure External AI Request connects to Persist to Supabase to preserve the execution flow.

Step 3: Set Up Processing and AI Preparation

These nodes normalize the incoming data and build the AI prompt.

  1. Open Transform Input Payload and add your input parsing logic.
  2. Open Compose AI Prompt and construct the prompt structure needed for enrichment.
  3. Confirm the sequence Transform Input PayloadCompose AI PromptExternal AI Request.

⚠️ Common Pitfall: If Compose AI Prompt outputs an empty prompt, External AI Request will return an error or low-quality enrichment.

Step 4: Configure the External AI Call and Output Response

Send the prompt to your AI provider, then format the final response back to the webhook caller.

  1. Open External AI Request and configure the HTTP request details required by your AI service.
  2. Map the prompt from Compose AI Prompt into the request body.
  3. Open Shape Output Reply and format the response returned to the webhook caller.
  4. Confirm the sequence Persist to SupabaseShape Output Reply to ensure the response includes stored enrichment data.

Step 5: Test and Activate Your Workflow

Validate the full execution chain from the webhook to storage and response.

  1. Click Execute Workflow and send a test payload to Incoming Webhook Start.
  2. Verify the data passes through Transform Input Payload, Compose AI Prompt, and External AI Request without errors.
  3. Confirm the enrichment record is created by Persist to Supabase and the output is formatted by Shape Output Reply.
  4. Toggle the workflow to Active for production use.
🔒

Unlock Full Step-by-Step Guide

Get the complete implementation guide + downloadable template

Common Gotchas

  • Supabase credentials can expire or need specific permissions. If things break, check your Supabase Project Settings → API keys and the n8n credential named “Supabase API” first.
  • If you’re using Wait nodes or external rendering, processing times vary. Bump up the wait duration if downstream nodes fail on empty responses.
  • Default prompts in AI nodes are generic. Add your brand voice early or you’ll be editing outputs forever.

Frequently Asked Questions

How long does it take to set up this lead enrichment automation?

About 30 minutes if your OpenAI and Supabase accounts are ready.

Do I need coding skills to automate lead enrichment?

No. You will paste credentials, set environment variables, and test a webhook payload.

Is n8n free to use for this lead enrichment automation workflow?

Yes. n8n has a free self-hosted option and a free trial on n8n Cloud. Cloud plans start at $20/month for higher volume. You’ll also need to factor in OpenAI API usage, which is usually small per contact but depends on your model and prompt size.

Where can I host n8n to run this automation?

Two options: n8n Cloud (managed, easiest setup) or self-hosting on a VPS. For self-hosting, Hostinger VPS is affordable and handles n8n well. Self-hosting gives you unlimited executions but requires basic server management.

Can I customize this lead enrichment automation workflow for my ICP and scoring?

Yes, and you should. Update the prompt in the “Compose AI Prompt” code node so it reflects your ICP, what “qualified” means, and the exact JSON fields you want back (like seniority, department, pain points, and a 1–10 lead score). If you prefer a different model, change the environment variables used to build the AI request. Many teams also add a simple validation rule after the AI response to reject outputs that contradict known fields.

Why is my Supabase connection failing in this workflow?

Usually it’s the Supabase URL or API key in the n8n credential, or the key doesn’t have permission to insert into your logging table. Double-check the credential named “Supabase API,” then confirm the table exists and your project key is the right one for server-side inserts. If you rotated keys recently, you need to update n8n too.

How many contacts can this lead enrichment automation handle?

On self-hosted n8n there’s no hard execution limit, so it mostly depends on your server and OpenAI rate limits.

Is this lead enrichment automation better than using Zapier or Make?

Often, yes, because this kind of enrichment benefits from flexible logic, structured JSON handling, and reliable logging. n8n makes it easier to store the full input and output as JSON, then branch based on conditions (like “only enrich if job_title is missing” or “skip suppressed domains”). It also gives you a self-hosting path when volume grows, which can matter a lot for list enrichment. Zapier or Make can be quicker for a basic two-step flow, but you may hit limits once you add validation, batching, and an audit trail. If you want a second opinion, Talk to an automation expert.

Once this is running, every lead arrives with context and a paper trail. The workflow handles the repetitive cleanup so your outreach can start strong.

Need Help Setting This Up?

Our automation experts can build and customize this workflow for your specific needs. Free 15-minute consultation—no commitment required.

Lisa Granqvist

Workflow Automation Expert

Expert in workflow automation and no-code tools.

×

Use template

Get instant access to this n8n workflow Json file

💬
Get a free quote today!
Get a free quote today!

Tell us what you need and we'll get back to you within one working day.

Get a free quote today!
Get a free quote today!

Tell us what you need and we'll get back to you within one working day.

Launch login modal Launch register modal