Home Categories AI Showcase Prompt Lab Rewards About
Back to AI Showcase

Autonomous Sales Intelligence Pipeline — From Raw LinkedIn Data to Personalised Outreach in 90 Seconds

Built by DigitalSentry ·

About this build

A multi-agent pipeline built with Claude, n8n and Apify that automatically researches a prospect, builds a psychological profile based on their public content and career history, scores their likelihood to convert, and drafts a hyper-personalised outreach message — all triggered by a single name and company input with

What was built

This is the most complex build I have shipped and also the one that has had the most real-world impact so I want to document it properly. Architecture overview: The pipeline runs as a multi-agent system with four distinct agents each with a specific responsibility and a handoff protocol between them. Agent 1 — The Researcher Triggered by a Google Sheets row being populated with a prospect name and company. Apify scrapes their LinkedIn profile including their current role, career history, recent posts from the last 90 days, skills, education and any content they have liked or commented on. Simultaneously Perplexity searches for recent news about their company, any press mentions of the individual, and their company's current challenges or strategic priorities. All raw data is compiled into a structured JSON object and passed to Agent 2. Agent 2 — The Profiler Takes the raw research JSON and sends it to Claude with a structured prompt that extracts five things. Their apparent primary professional motivation based on their career trajectory — is this person optimising for status, security, impact, growth or money. Their current likely pain points based on their role seniority and company stage. Topics they publicly engage with most which signals what they actually care about versus what they say they care about. Their communication style based on how they write their own posts — formal or casual, long-form thinker or punchy, data-driven or narrative-driven. Any recent trigger events — a promotion, a company announcement, a post they wrote that reveals a current challenge — that create a natural opening for outreach. The output is a structured profile object with confidence scores for each inference. Agent 3 — The Scorer Takes the profile object and scores the prospect across four dimensions. Relevance score — how closely does their role and company match our ideal customer profile. Timing score — based on trigger events, is now a good time to reach out. Engagement likelihood — based on their communication style and the topics they engage with, how likely are they to respond to our type of message. Overall priority score — composite of the above three, 1 to 10. Prospects scoring below 6 are automatically parked in a lower priority sheet rather than passed to Agent 4. This filtering alone saves significant time by removing prospects who look good on paper but are unlikely to convert right now. Agent 4 — The Writer Only runs for prospects scoring 6 or above. Takes the full profile and passes it to Claude with a prompt that generates three outreach variants — a LinkedIn connection request under 300 characters, a LinkedIn direct message under 150 words, and a cold email with subject line under 120 words. Each variant opens with the most specific trigger or observation from the research, uses the prospect's own communication style, references something real from their recent public activity, and makes one specific ask rather than a vague "would love to connect." The prompt explicitly bans generic openers, the word "synergy," any mention of our company before the third sentence, and any claims that cannot be directly supported by the research. Delivery All three variants plus the full profile and score are posted to a dedicated Slack channel as a structured message. The sales rep sees the prospect name, score, a one paragraph brief on why they are a priority right now, and the three outreach variants ready to copy, personalise slightly and send. The whole thing from trigger to Slack delivery takes between 60 and 120 seconds depending on LinkedIn scrape speed. What this actually changed: Before this pipeline our team was researching 8 to 12 prospects per day manually. With this running we are processing 60 to 80 per day. More importantly the response rate on messages generated by the pipeline is meaningfully higher than our previous templated outreach — because the opening line references something real the prospect actually said or did, not a generic observation about their industry. What broke during development and how I fixed it: LinkedIn scraping reliability — Apify's LinkedIn scraper occasionally fails on profiles with privacy restrictions. Fixed by adding a fallback that uses Perplexity to search for the person's name plus company and pulls whatever public information is available, then flags the profile as partial in the output so the writer knows the research is incomplete. Claude hallucinating specifics — early versions of the profiler prompt occasionally produced confident-sounding inferences that were not actually supported by the data. Fixed by restructuring the prompt to require Claude to cite the specific data point from the research JSON that supports each inference. If it cannot cite a source it outputs low confidence rather than guessing. Agent 2 to Agent 3 handoff context loss — when passing large JSON objects between agents in n8n across multiple HTTP request nodes, occasionally the context was being truncated. Fixed by compressing the profile object to only essential fields before handoff and storing the full data in Google Sheets, then retrieving only what Agent 3 needs. Scoring inconsistency — the same prospect scored differently on different runs due to Claude's temperature variation. Fixed by setting temperature to 0 on the scoring node and using a structured output format with explicit numeric rubrics rather than asking Claude to score holistically. What I would build next: A feedback loop where replied messages and booked meetings are logged back into the system and used to fine-tune the scoring weights over time. Right now the scores are based on my own assumptions about what makes a good prospect. With 3 to 6 months of outcome data I could train the scorer on what actually converts rather than what I think converts.

Open public proof or demo