LinkedIn engagement automation: comments, replies and lead scoring
A two-stage commenting system that joins relevant LinkedIn conversations, softly introduces a product and flags warm leads.
The problem
Commenting and replying on LinkedIn by hand does not scale. Most automation looks robotic and has no way to notice and answer the conversations it starts.
How the system works
Post discovery
The system looks for recent posts, under 24 hours old, that match target keywords and are worth engaging with.
Stage one: automatic comment
A genuine, contextual reaction is posted, along with a like or emoji, and it does not mention any product.
Reply detection by polling
LinkedIn offers no webhooks for this, so the system checks tracked comments every 10 to 15 minutes for new replies to its first comment.
Stage two: soft pitch reply
When someone replies, a second AI response continues the conversation and gently mentions the product, framed as a favour rather than a hard sell.
Reply cap
Database constraints limit automated replies per person per thread, so nobody is messaged repeatedly.
Lead scoring
People who engage repeatedly get a higher lead score and trigger a Slack notification so a human can follow up.
Self-reply filtering
The account's own replies are excluded, which prevents endless reply loops.
Result in production
A LinkedIn engagement engine that looks and feels like genuine participation, surfaces warm leads automatically and never spams the same person twice.
Who this pattern fits
Built for sales and marketing teams handling high-volume outreach, the architecture also suits any team with similar volume, compliance or coordination challenges. It can be self-hosted and run by a small team.
Tools used
n8n
Workflow runtime, orchestration and version control.
Unipile
The integration layer used for LinkedIn in production.
Supabase
PostgreSQL database, authentication and storage, including the per-thread reply constraints.
Scheduled polling
Regular checks for new replies, since LinkedIn provides no webhook for them.
Related
Frequently asked questions
Does this spam people?
No. Reply caps and unique constraints per person per thread limit how much anyone is messaged, and the system tracks who has been contacted so it stops at the right point.