See llms.txt for all machine-readable content.

Back to Templates

Enrich and score LinkedIn inbound leads with OpenAI, Slack and Gmail

Quick overview

When someone fills in your form, this finds them on LinkedIn, confirms they work where they say, reads their company page, and has AI score the lead against your ideal customer. Every lead lands in Google Sheets; hot leads ping Slack and warm leads get a Gmail reply draft.

How it works

  1. The built-in n8n form collects first name, last name, company, work email and a message.
  2. A Set node holds your ideal customer, what you sell, and the Hot and Warm score cut-offs.
  3. The first Actor searches public LinkedIn profiles for that name at that company and keeps up to three.
  4. If nobody is found, or the search fails, the lead is logged as Check by hand.
  5. The second Actor reads all three profiles, and only one whose current employer matches the form is used.
  6. The third Actor reads the company's LinkedIn page for size, industry and headquarters.
  7. The Information Extractor scores fit from 0 to 100, names the role, gives reasons and writes an opener.
  8. A Code node sets the tier from your cut-offs and shapes one row per lead for Google Sheets.
  9. A Switch sends Hot leads to Slack and Warm leads to a Gmail draft. Cold leads are logged only.

Setup

  1. Create a free Apify account, copy the API token from Settings, Integrations, and add it as an Apify credential on the three Actor nodes.
  2. Add an OpenAI credential on the chat model node, or swap in any other chat model.
  3. Connect Google Sheets and pick a spreadsheet and tab.
  4. Connect Slack and pick a channel, and connect Gmail for the drafts.
  5. Describe your ideal customer and what you sell, in plain words, in the Set node.
  6. Activate the workflow and share the form URL from the trigger node, or embed it on your site.

Requirements

  • An Apify account; the free tier covers hundreds of leads a month
  • An OpenAI API key, or any chat model credential n8n supports
  • Google Sheets, Slack and Gmail credentials
  • No Apollo, Clearbit, Hunter or LinkedIn account

Customization

  • idealCustomer is plain text, so describe company size, region, industry and the buyer's role the way you would to a new rep
  • hotScore and warmScore move leads between tiers without touching the prompt
  • Swap the form for the optional webhook to take leads from Typeform, Webflow or your own site
  • Add the optional filter to skip free email domains before any search runs
  • Use the optional colleague search to find two more people at a hot account
  • Replace Google Sheets with your CRM node; the row already has every field a CRM contact needs

Additional info

How do I enrich a lead with LinkedIn data without Apollo or Clearbit? This template reads public LinkedIn pages through three Actors: a people search to find the person, a profile read to confirm their employer, and a company page read for firmographics. There is no data-vendor contract and no LinkedIn login.

How does it know it found the right person? A name match proves very little, so the workflow reads each candidate's public profile and only counts one whose current employer matches the company on the form. When none matches, the lead is scored on the company alone and the row says Employer not confirmed.

How is a lead scored? The model gets one short card with the form answers, the profile facts and the company facts, plus your ideal customer description. It returns a 0 to 100 fit score, a role (decision maker, influencer, user or unknown), its reasons and an opening line. The tier comes from your own two cut-offs, not from the model.

What happens when the person is not on LinkedIn? The lead is still logged with Tier Check by hand and the reason, so nobody falls through. The same happens if the people search fails on that run.

What does it cost? About a cent per lead at most in Apify charges, plus one small model call. Profile and company reads cost a fraction of a cent; the people search is about $0.0006 per person returned.

What else can these Actors do? LinkedIn People Search API finds people by name, title, company, school or location. LinkedIn Profile API returns public profile data: current company, experience, education and followers. LinkedIn Company API returns company size, industry, headquarters and similar companies. If you self-host n8n, n8n-nodes-linkedin-profile-api and n8n-nodes-linkedin-company-api wrap two of them as community nodes.

About Apify. LinkedIn Profile API runs on Apify, a platform of ready-made scrapers and APIs for sources that have no usable public API. Actors are pay per use with no subscription, and they run in the cloud, so nothing runs on your machine and nothing breaks when the source changes its markup.

New to Apify? You can set up a free account and get the API token this template needs in a couple of minutes.