Mindket

LinkedIn comment lead qualifier

Newversion 1 · updated

Overview

An n8n workflow for LinkedIn posts that ask for a keyword in the comments. It scrapes the comments with Apify, keeps the people who used the keyword, has Gemini rate their company and draft a message, and saves each one to Airtable.

LinkedIn comment lead qualifier is an n8n workflow in the Marketing & SEO category, listed by Mindket. It is free. This is version 1, last updated on . Download it on this page or copy its JSON, then import it into an n8n canvas. Nothing runs until you activate it in n8n.

At a glance

Runs in
  • n8n Cloud: import the file into a new workflow there
  • Your own n8n server: the same file, with a webhook address Airtable can reach
  • Airtable: a Posts table you run it from and a Results table it fills
  • LinkedIn: the drafts are yours to send by hand, from your own account

Platform

Connects 3 apps

How it works

Trigger

Airtable post row

It starts when its webhook receives a POST from an Airtable script with:

  • The id of a row in your Posts table, in the field id
  • That row’s Post field holds the LinkedIn post’s address

Actions

  1. Reads the post’s row, then scrapes the post and up to 100 of its latest comments through Apify
  2. Drops the author’s own comments, and Gemini checks each one for the keyword the post asked for
  3. For each match, reads the commenter’s profile and skips anyone already in Results or with no company page
  4. Reads the company’s page, and Gemini marks it YES or NO against your fit rules
  5. Gemini drafts a short message, and the row is saved to Results with its YES or NO

Result

A Results table of commenters, each with company details, a YES or NO and a drafted message to review

Integrations

What you need before you start.

Apify

Web scraping

Runs four scrapers that read a LinkedIn post, its comments, a commenter’s profile and their company’s page.

NeedsApify API token, in four headers

Google Gemini

Language model

Uses Gemini 2.0 Flash to check each comment for the keyword, rate the company’s fit and draft the message.

NeedsGemini API key

Airtable

Database

Holds the posts to run, tells the workflow who is already saved, and stores each lead with its draft.

NeedsPersonal access token, a base with a Posts table and a Results table

Workflow check

Checked by Mindket on 13 Nov 2026

Steps
17 steps, starting when its webhook is called
AI
3 steps call an AI model: hasIntent, qualifyLead and writeScript
Sign-ins
Signs in to: Airtable, Google Gemini and Apify
API keys
No API key is left in the file; 1 blank in it for your own key
Step types
Mindket’s checker reads all 8 of its step types

Read from the workflow’s file, not from a run.

About

What it is

This n8n workflow turns a LinkedIn post that asks people to comment a keyword into a table of leads, each with a drafted message. You put the post’s address on a row in Airtable and run a script on it, which posts the row’s id to the workflow’s webhook. The workflow then reads the post and up to 100 recent comments through Apify, drops the author’s own, and asks Gemini which comments used the keyword. Each person who did gets a profile lookup, a check against your Airtable results and a look at the company on the first job in their profile. Gemini marks that company YES or NO against your fit rules and drafts a short message. Everything is saved in Airtable. Nothing is sent. The file has 21 working nodes and five sticky notes.

Who it suits

People who post a free resource on LinkedIn in exchange for a comment, then face hundreds of replies to sort by hand: founders, growth marketers and agencies that run outreach for clients.

Who uses it, and how
IndustryWho uses itHow they use itExample
Software and SaaSFounders and growth leadsRun it on each lead-magnet post and message the YES rows the same dayA founder posts a launch checklist, and by the afternoon the YES rows are ready to read and send.
Marketing and sales agenciesAccount managersKeep one Airtable base per client and run the same file against eachAn agency gives each client a Posts table and sends over the qualified rows every week.
RecruitingRecruitersChange the fit rules to the roles and places they hire inA recruiter posts a salary guide and keeps the commenters who work at companies of the right size.
Consulting and coachingIndependent consultantsSort Results on YES and write to those people firstA consultant works through the YES rows from her last post in one sitting.

Skip it if your posts name no keyword. The first Gemini check would turn every comment away. The setup also asks for some n8n and some Airtable: importing a file, adding credentials and pasting a small script. Its author puts setup at about 11 minutes, which assumes the accounts and the base already exist.

Where to use it

Any n8n that can reach Apify, Google AI Studio and Airtable will do. It starts from an Airtable script, so the base is part of the setup. A server of your own needs a public address for the webhook.

  • n8n Cloud: import the file into a new workflow there
  • Your own n8n server: the same file, with a webhook address Airtable can reach
  • Airtable: a Posts table you run it from and a Results table it fills
  • LinkedIn: the drafts are yours to send by hand, from your own account

Setup

Get it saves a zip with workflow.json and Mindket’s setup notes in your downloads folder. Have these ready before you import it.

What you need first
NeedDetail
n8nOn n8n Cloud or on a server of your own
ApifyAn account, its API token, and the four scrapers the workflow calls by id
Google AI StudioA key for the Gemini API
AirtableA personal access token that reads and writes records, and a base with a Posts table and a Results table
  1. In n8n, create a workflow, open its menu, choose Import from File and pick workflow.json.
  2. Add a Google Gemini (PaLM) API credential and select it in Google Gemini Chat Model, which serves every AI step.
  3. In getPost, getComments, getProfile and getCompany, replace YOUR_TOKEN in the Authorization header with your Apify token, keeping Bearer before it.
  4. Add an Airtable Personal Access Token credential and select it in getPostUrl, isDuplicate and addLead.
  5. In those three nodes, choose your base and tables where they hold YOUR_BASE_ID, YOUR_POSTS_TABLE_ID and YOUR_RESULTS_TABLE_ID.
  6. In writeScript, replace YOUR_CREDIBILITY_LINE, YOUR_BONUS_OFFER and YOUR_CALL_TO_ACTION with your own words.
  7. In Webhook, replace YOUR_WEBHOOK_PATH with a long random string and copy the Production URL.
  8. In Airtable, add an automation on Posts with a Run script action. Give it an input variable recordId set to the row’s id, and paste the script below with the Production URL in it.
  9. Save, then press Publish.

Posts needs one field, Post, holding the post’s address. Results needs User, Role, Industry, Company, Employees, Country, Qualified? as a single select of YES and NO, Tagline, Website, CompanyLinkedin, UserLinkedin, Comment, Post and Script.

const { recordId } = input.config();
await fetch("YOUR_PRODUCTION_URL", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({ id: recordId }),
});

The script posts one field, and getPostUrl uses it to read the row from Posts:

{
  "id": "recXXXXXXXXXXXXXX"
}

How to use it

Add a row to Posts with the address of a LinkedIn post that asks for a keyword, then start the automation for that row. The webhook answers at once and the run goes on behind it, one commenter at a time, so a post with many comments takes a while. When it ends, open Results and filter Qualified? to YES. Read each message in Script, change what you want and send it yourself.

Example

A post says to comment CHECKLIST for a launch checklist. One commenter writes CHECKLIST please, is head of growth at a Canadian software company with 60 staff, and is not in Results yet. The row saved for her:

One row in Results
ColumnValue
UserMaria Lopez
RoleHead of Growth
IndustrySaaS
Employees60
CountryCanada
Qualified?YES

Script holds a draft like this one, well under the 80 words the prompt allows:

Hi Maria, thanks for commenting CHECKLIST on Dana’s post. The weekly launch blocks are the part I would copy first. We have run launches like yours before, and I can send a template that fills the checklist in for you, whether or not you have started. Want it?

For newcomers and experts

If you are new. A webhook is an address that starts a workflow when something posts to it. Run it first on a post with five or six comments. Then read each node’s output. It shows what every step received and sent. The scraping steps take a few seconds each and the loop handles one person at a time, so even a small post takes a while.

For experts. One Gemini 2.0 Flash chat model node serves all the AI steps, and these four decide what you get.

The steps that decide
StepNodeWhat it doesWhat to know
Keyword checkhasIntentAnswers YES when the post names a keyword and the comment holds itA post with no keyword gets NO for every comment, so nothing is saved
Fit checkqualifyLeadReturns a business type, a one-line description and YES or NOThe rules are plain text in its message: any industry, headquarters in the United States, Canada or Europe, 10 to 500 employees, any role
MessagewriteScriptDrafts a direct message of up to 80 wordsIts text carries your three lines. The system message sets first name only and no emoji
ScrapesgetPost, getComments, getProfile, getCompanyFour Apify actors, each run to completion in one callgetProfile and getCompany continue on error, so a failed scrape leaves a blank item and the run goes on

Each way out of a commenter’s turn feeds back into Loop Over Items. addLead upserts on UserLinkedin, while the duplicate check searches the name, so the two keys can disagree.

Good to know

It reads real people’s profiles and spends money at two vendors. Try it on one post first.

  • Billing: Apify charges for the scrapes and Google for the Gemini calls, and the first sticky note links each actor, where you can see its price
  • Drafts only: nothing is sent, and each message is the model’s, so read it before you use it
  • Who is saved: a commenter who passes the keyword check, has a company page on their profile and is new to Results, with NO where the company misses your rules
  • Duplicates: found by name, so two people with one name count as one
  • Rules: LinkedIn’s terms restrict automated collection and the people listed are named individuals, so check the rules that apply to you, data protection law included
  • Open webhook: anyone who learns its address can start a run on your keys, so keep its path long and random
  • Token: the Apify token sits in four headers, so take it out before you share the workflow
  • Credentials: the JSON holds none, and nothing from its author’s accounts or Airtable base

README and files

README

LinkedIn comment lead qualifier

An n8n workflow for LinkedIn posts that ask people to comment a keyword. Give it a post's address through an Airtable row and it
reads the comments and keeps the people who used the keyword. It then looks up each one's profile and company, marks the company
YES or NO against your fit rules and drafts a short message. Everything is saved to Airtable.

What is inside

  • workflow.json: the workflow as n8n exports it, 26 nodes: 21 that work and five sticky notes. It holds no credential.
    Placeholders stand in for the Airtable base and tables, the webhook's path and the Apify token in four headers. In
    writeScript they also replace the author's own credibility line, offer and call to action.
  • README.md: these notes.

Before you start

  • An n8n instance, on n8n Cloud or your own server. A server of your own needs an address Airtable can reach.
  • An Apify account and its API token. The workflow calls four Apify scrapers.
  • A Gemini API key from Google AI Studio.
  • An Airtable account with a personal access token that can read and write records, and a base with two tables, Posts
    and Results (below).

Set it up

  1. In n8n, create a workflow, open its menu and choose Import from File. Pick workflow.json.
  2. Add a Google Gemini (PaLM) API credential with your key and select it in Google Gemini Chat Model. That one node
    serves every AI step.
  3. In getPost, getComments, getProfile and getCompany, replace YOUR_TOKEN in the Authorization header with your
    Apify token, keeping Bearer in front of it.
  4. Add an Airtable Personal Access Token credential and select it in getPostUrl, isDuplicate and addLead.
  5. In those three nodes, choose your base and tables where they hold YOUR_BASE_ID, YOUR_POSTS_TABLE_ID and
    YOUR_RESULTS_TABLE_ID.
  6. In writeScript, replace YOUR_CREDIBILITY_LINE, YOUR_BONUS_OFFER and YOUR_CALL_TO_ACTION with your own words.
  7. In Webhook, replace YOUR_WEBHOOK_PATH with a long random string, then copy the Production URL.
  8. In Airtable, add an automation on the Posts table with a Run script action, started by a trigger you choose, such as a
    button field or a new row. Give the script an input variable named recordId, set to the row's id, and paste the
    script below with the Production URL in it.
  9. Save, then press Publish at the top of the canvas (or Shift+P).

The Airtable base

Posts holds one row per LinkedIn post, with a field named Post that holds the post's address. Results holds what the
workflow saves, with these columns:

| Column | Type | What the workflow puts in it |
|---|---|---|
| User | text | The commenter's name |
| Role | text | The title of the first job on their profile |
| Industry | text | The business type Gemini gives the company |
| Company | text | The company's name |
| Employees | number | The company's employee count |
| Country | text | The country of its headquarters |
| Qualified? | single select, YES and NO | Gemini's answer on the fit rules |
| Tagline | text | A one-line description from Gemini |
| Website | text | The company's website |
| CompanyLinkedin | text | The company's LinkedIn page |
| UserLinkedin | text | The commenter's profile, which addLead matches on |
| Comment | text | What they wrote |
| Post | text | The post's address |
| Script | long text | The drafted message |

The file's mapping also lists an Email column that nothing fills. The script the automation runs:

const { recordId } = input.config();
await fetch('YOUR_PRODUCTION_URL', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({ id: recordId }),
});

What the webhook takes

Webhook takes a POST with the row's id in id, and getPostUrl reads that row from Posts:

{
  "id": "recXXXXXXXXXXXXXX"
}

How a run goes

  1. getPostUrl reads the Posts row, and getPost scrapes the post at the address in its Post field.
  2. getComments scrapes up to 100 of the latest comments. filterAuthor drops the post author's own and any with no name.
  3. Loop Over Items takes one commenter at a time. hasIntent asks Gemini whether the post names a keyword and the
    comment uses it. A NO goes back to the loop.
  4. A YES goes to getProfile. isDuplicate searches Results for that name, and If lets the commenter on only when
    the name is new and the first job on the profile links to a LinkedIn company page.
  5. getCompany reads that page. qualifyLead has Gemini classify the company and answer YES or NO, and companyInfo
    gathers the fields.
  6. writeScript drafts the message, and addLead upserts the row into Results, matched on UserLinkedin. Every
    commenter who gets this far is saved, with YES or NO in Qualified?.

Change it

  • Who counts as a fit: the criteria in the message of qualifyLead. As exported: any industry, a headquarters in the
    United States, Canada or Europe, 10 to 500 employees and any role.
  • The keyword rule: the message of hasIntent.
  • The message: the system message of writeScript (first name only, up to 80 words, no emoji) and the three lines you
    replaced in its text.
  • How many comments: limit and page_number in the body of getComments, 100 and page 1 as exported.
  • Saving only the YES rows: add an If node after companyInfo on qualified, with its false branch going back to
    Loop Over Items.
  • The columns: the mapping in addLead.

Good to know

  • A run costs two Apify scrapes for the post and its comments, then up to two more for each commenter who uses the
    keyword. Gemini is called once per comment for the keyword check, and twice more for each commenter who goes on. The
    first sticky note links the four actors by id. Open each to see its price, since some Apify actors charge per result
    or by rental.
  • The workflow drafts messages and sends nothing. Read each draft before you use it.
  • isDuplicate compares names, so two people with one name count as one. A name with an apostrophe may break its
    Airtable formula.
  • getProfile and getCompany are set to continue when a scrape fails, so one failure does not stop the run.
  • Anyone who learns the webhook's address can start a run on your keys. That is why its path should be long and random.
  • The Apify token sits in the nodes' headers. Take it out before you share or export the workflow.
  • LinkedIn's terms restrict automated collection, and the people listed are named individuals. Check the rules that
    apply to you, data protection law included, before you run it on a real post.
Files
README.md  6 KB
workflow.json  33 KB

2 files, 40 KB, downloaded as a zip.

What’s new

  • Version 1 · 2026-11-03

Reviews

No ratings yet

Write a review

No reviews yet.

More from Mindket

See all from Mindket

anaksor-ocr

Sokheng · Kit

Reads Khmer and English text from documents, receipts and photos of signs, using a detector for text lines and a recogniser for each line. Suits developers who…

New

Qwen2.5-7B-Instruct as GGUF files in eight quantization sizes, to chat with locally through llama.cpp. For people who want a capable 7.6B model on their own co…

New

ACE-Step 1.5 XL SFT

ACE-Step · Kit

Generates music from text with a 4B diffusion decoder, 50 steps and guidance control, aiming for higher audio quality than the base. For creators with a GPU of…

New

Similar in Marketing & SEO

See all in Marketing & SEO

Huashu Design

alchaincyf · Skill

Turns a one-line request in your AI agent into a finished design: a launch animation, a clickable app prototype, an editable slide deck, an infographic or a se…

New29.4k

Pixel Art XL

nerijs · Kit

A pixel art style add-on for Stable Diffusion XL that turns text prompts into pixel-style images, with an optional LCM LoRA for faster runs. For game makers, d…

New

Licon MSR for LTX-2.5

LiconStudio · Kit

Keeps characters, clothing, objects and backgrounds consistent in generated video by feeding the model up to five reference images. A LoRA for LTX-2.5 in Comfy…

New