An n8n + LangChain agent that takes a prospect name, scrapes their LinkedIn, enriches via Perplexity Sonar Pro, and returns a 10-section psychological sales profile by email — in about a minute.
The agent collects the prospect name, validates the format, then triggers a 5-stage research pipeline behind the scenes.
A two-agent chain. The first agent does background research; the second turns research into a sales-shaped psychological profile.
Trigger is either a chat message or a Calendly invitee event. A small LLM (gpt-4o-mini) handles the polite "what's the prospect's name" flow and extracts a clean Firstname Lastname string.
An IF node checks the extracted string exists and is longer than 2 characters. If not, the agent re-prompts. If yes, we move to research.
Research Agent (GPT-4o) gets three tools: Perplexity Sonar Pro for company + recent activity, Google Search for the LinkedIn URL, and LinkedIn scraper for the profile body. The system prompt explicitly says "be relentless about finding the LinkedIn".
Profiler Agent (gpt-4o-latest) takes the research output and runs it through a long, structured prompt: archetype, buying triggers, objections, communication blueprint, decision-making blind spots, social proof patterns, scripts, action plan. Output is a 10-section markdown report.
The completed profile goes to the configured Gmail recipient as the body of an email titled Psychological Profile Report. Total run time: typically 45–90 seconds depending on LinkedIn responsiveness.
Two LangChain agents stitched together by n8n nodes. Each agent gets its own memory buffer.
flowchart TD
A1[💬 Chat trigger] --> B
A2[📅 Calendly trigger] --> C
B[Greeter Agent
gpt-4o-mini] --> C[Extract Name LLM
chatgpt-4o-latest]
C --> D{Valid name?
len > 2}
D -- no --> B
D -- yes --> E[Research Agent
GPT-4o + tools]
E -.uses.-> F[🔍 Perplexity
Sonar Pro]
E -.uses.-> G[🌐 Google Search]
E -.uses.-> H[💼 LinkedIn scrape]
E --> I[Psychological Profiler
chatgpt-4o-latest]
I --> J[📧 Gmail
send report]
style E fill:#a78bfa20,stroke:#a78bfa,color:#fff
style I fill:#38bdf820,stroke:#38bdf8,color:#fff
style J fill:#22c55e20,stroke:#22c55e,color:#fff
Real format, fully synthetic prospect. The actual prompt produces ~3,000 words across 10 sections.
Prospect: Jane Anderson · VP Operations · ContosoLogix · 11 yrs experience · Chicago, IL
Jane is an operations-first, data-driven leader who values process discipline and quantified outcomes. She's mid-adopter on technology but late-majority on AI specifically — burned once by a 2023 RPA implementation that under-delivered. Pitch automation around regaining time and cost discipline, not novelty.
→ Counter: "The 2023 RPA effort failed because the processes weren't audited first. Our audit identifies which workflows are automation-ready and which need optimization. We eliminate the guesswork."
→ Counter: "The audit shows you which automations pay for themselves fastest. Most clients fund the second engagement from the first one's savings."
All open-source where possible. Two LLM calls per run; cost ~$0.10 per profile at gpt-4o pricing.
This tool researches publicly available information about professional contacts. Use it well.
Preparing for sales conversations and partnership discussions with people who have already publicly signaled openness to that (booked a meeting, opened a thread, listed contact info). It compresses 30 minutes of manual research into 60 seconds, using sources the recipient has already chosen to make public — LinkedIn, company news, podcast appearances.
What it is not for: mass cold outreach, scraping non-consenting individuals, building shadow profiles, or any use that violates LinkedIn's terms of service or GDPR. The included LinkedIn scraping integration is rate-limited and intended for one-prospect-at-a-time use. You're responsible for your jurisdiction's rules.
If you're going to use it, anchor on three rules: 1) only profile people who've already opted in to commercial contact, 2) destroy profiles after the engagement, 3) never quote the AI-generated profile in conversation with the prospect — use it as preparation, not script.
Workflow JSON is in the repo. Import, plug in OpenAI + Perplexity + Gmail credentials, point the chat trigger at your platform of choice (Telegram, Slack, web). Running in 20 minutes.