n8n

How to Automate Supabase Social Link Enrichment?

Find social media profiles for a list of companies without manual research. The workflow reads websites from your database, visits the pages, and captures links to profiles like LinkedIn, Twitter, and Facebook. It fits marketing and sales teams that need clean social handles for account and lead enrichment.

Execution starts with a manual run. A Supabase node pulls company name and website, then an AI crawler uses two tools to fetch page text and all links. An OpenAI model extracts only social profile URLs and returns structured JSON that matches a defined schema. A URL pipeline splits results, removes duplicates, fixes missing protocols, filters invalid links, and aggregates clean outputs. The data is merged with company details and inserted back into a Supabase table. Optional HTML to Markdown conversion helps you review page content when needed.

You need working Supabase tables and an OpenAI API key. Map your name and website fields, review the AI prompt and parser schema, and test with a few domains to confirm results. Expect faster list enrichment, better data quality, and on demand runs whenever your input table updates. Use it for prospect research, partner checks, and profile cleanup across many sites.

What are the key features?

  • Pull company names and websites from a Supabase table and write results to a separate output table.
  • Use an OpenAI Chat Model with temperature set to zero to extract social profile links reliably.
  • Invoke two scraping tools to get page text and all URLs from each website for richer signals.
  • Enforce a strict JSON schema so the output includes a clean social_media array with platform and url.
  • Process links with split, remove duplicates, add protocol, filter invalid URLs, and aggregate steps.
  • Merge AI results with company records and insert rows back into the database automatically.
  • Convert HTML to Markdown for quick human review of crawled text when debugging.
  • Run on demand with a manual trigger for controlled, batch processing.

What are the benefits?

  • Reduce manual research from hours to minutes per batch
  • Automate up to 90% of social profile lookups
  • Improve data quality by removing invalid and duplicate links
  • Handle 10 times more domains with the same team size
  • Connect Supabase and OpenAI in one consistent flow

How do you set it up?

  1. Import the template into n8n: Create a new workflow in n8n > Click the three dots menu > Select 'Import from File' > Choose the downloaded JSON file.
  2. You'll need accounts with Supabase and OpenAI. See the Tools Required section above for links to create accounts with these services.
  3. In your Supabase project, create an input table (for example companies_input) with at least name and website columns, and an output table (for example companies_output) with fields for company_name, website, and a JSON field for social_media.
  4. Add a few sample rows to the input table so you can test the run with real domains.
  5. In the n8n credentials manager, create Supabase credentials. Then open the Get companies and Insert new row nodes, choose the credential, and verify the correct project URL and key are set.
  6. In the n8n credentials manager, create an OpenAI API Key credential. Double click the OpenAI Chat Model node, select Create new credential, and paste your API key from the OpenAI API page.
  7. Open the Select company name and website node and confirm it passes only the name and website fields. If your column names differ, update the field mapping.
  8. Review the AI prompt and the JSON Parser schema. Make sure the social_media array fields match what you want to store, such as platform and url.
  9. Click Execute workflow to run a test. Watch the Crawl website and Set social media array nodes to confirm the model returns the expected links.
  10. Inspect the URL pipeline nodes. If off domain links appear, adjust Filter out invalid URLs to keep only links from the target domain.
  11. Open your Supabase output table and confirm new rows were inserted with a populated social_media array. If empty, check that Add protocol and Remove duplicates are working as expected.
  12. If some sites block requests, consider adding a proxy as hinted in the tool notes, and rerun a small batch to validate improvements.

Tools Required

$24 / mo or $20 / mo billed annually to use n8n in the cloud. However, the local or self-hosted n8n Community Edition is free.

OpenAI

Sign up

Pay-as-you-go: GPT-5 at $1.25 per 1M input tokens and $10 per 1M output tokens

Supabase

Sign up

Free: $0 / mo — unlimited API requests; 500 MB database; 5 GB bandwidth; 1 GB storage; 50,000 MAUs.

Credits:
YouTube video by workfloows. YouTube channel

Similar Templates

Join Futurise to access 1,200+ automation templates

Get instant access to ready-made automation workflows for n8n, Make.com, AI agents, and more. Download, customise, and deploy in minutes.