Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.langdock.com/llms.txt

Use this file to discover all available pages before exploring further.

Lead Qualification & Scoring

Automatically score and qualify incoming leads based on company data, role, and use case to focus sales efforts on high-potential prospects.

How It Works

Trigger: Form submission from website or landing page Workflow:
  1. HTTP Request: Enrich lead data from external APIs (company info, LinkedIn data)
  2. Agent: Score lead quality based on multiple factors
  3. Condition: Route based on lead score
    • Hot leads (80-100) → Notify sales rep immediately
    • Warm leads (50-79) → Add to nurture campaign
    • Cold leads (0-49) → Archive for later
  4. Action: Create/update CRM record with score
  5. Send Notification: Alert assigned sales rep for hot leads

Configuration Example

HTTP Request Node (Enrich Data):
Method: POST
URL: https://api.clearbit.com/v2/combined/find
Headers:
  - Authorization: Bearer YOUR_CLEARBIT_TOKEN
Body:
{
  "email": "{{trigger.output.email}}"
}
Agent Node (Score Lead):
Model: GPT-4
Instructions: Score this lead from 0-100 based on:

**Company Info:**
- Size: {{http_request.output.company.employees}} employees
- Industry: {{http_request.output.company.industry}}
- Revenue: {{http_request.output.company.estimated_revenue}}

**Lead Info:**
- Role: {{trigger.output.role}}
- Seniority: {{http_request.output.person.seniority}}
- Use Case: {{trigger.output.use_case}}

**Scoring Criteria:**
- Enterprise companies (1000+ employees): +30 points
- Director level or above: +20 points
- Strategic use case: +25 points
- Tech/SaaS industry: +15 points
- Clear pain point mentioned: +10 points

Structured Output:
{
  "score": "number (0-100)",
  "qualification": "hot|warm|cold",
  "reasoning": "string",
  "recommended_action": "string"
}
Condition Node:
If Hot Lead: {{ agent.output.structured.score >= 80 }}
Else if Warm Lead: {{ agent.output.structured.score >= 50 && agent.output.structured.score < 80 }}
Else if Cold Lead: {{ agent.output.structured.score < 50 }}
Send Notification (Hot Leads):
🔥 **Hot Lead Alert - Score: {{agent.output.structured.score}}/100**

**Contact:**
{{trigger.output.name}} - {{trigger.output.role}}
{{trigger.output.company}}
{{trigger.output.email}}

**Company Details:**
- Size: {{http_request.output.company.employees}} employees
- Industry: {{http_request.output.company.industry}}

**Use Case:**
{{trigger.output.use_case}}

**AI Assessment:**
{{agent.output.structured.reasoning}}

**Recommended Action:**
{{agent.output.structured.recommended_action}}

**CRM Link:** [View in CRM]({{action.crm_url}})

Benefits

  • Sales team focuses only on qualified leads
  • Response time under 5 minutes for hot leads
  • Objective, data-driven scoring
  • 60% increase in conversion rates

Sales Follow-Up Automation

Automatically send personalized follow-up emails to prospects based on their engagement and timeline.

How It Works

Trigger: Scheduled daily at 9 AM Workflow:
  1. HTTP Request: Fetch prospects needing follow-up from CRM
  2. Loop: For each prospect
    • Agent: Generate personalized follow-up email based on history
    • Action: Send email via Gmail or Outlook
    • Action: Update CRM with activity
    • Delay: 5 seconds (rate limiting)
  3. Send Notification: Summary of follow-ups sent

Configuration Example

HTTP Request Node:
Method: GET
URL: https://api.yourcrm.com/prospects
Query Parameters:
  - status: follow_up_needed
  - last_contact_before: {{code.three_days_ago}}
Headers:
  - Authorization: Bearer YOUR_CRM_TOKEN
Code Node (Calculate dates):
const now = new Date();
const threeDaysAgo = new Date(now);
threeDaysAgo.setDate(threeDaysAgo.getDate() - 3);

return {
  three_days_ago: threeDaysAgo.toISOString(),
  today: now.toISOString()
};
Loop Node:
Input Array: {{http_request.output.prospects}}
Loop Variable: prospect
Max Iterations: 100
Agent Node (Inside Loop):
Model: GPT-4
Instructions: Write a personalized follow-up email to {{prospect.name}} at {{prospect.company}}.

**Context:**
- Last contact: {{prospect.last_contact_date}}
- Last topic: {{prospect.last_discussion}}
- Their role: {{prospect.role}}
- Pain points: {{prospect.pain_points}}

Write a friendly, brief email (2-3 paragraphs) that:
1. References our last conversation about {{prospect.last_discussion}}
2. Provides value or insight related to their {{prospect.pain_points}}
3. Suggests a specific next step (demo, call, resource)

Use a conversational, helpful tone. Subject line should be compelling.

Structured Output:
{
  "subject": "string",
  "body": "string"
}
Action Node (Send Email):
Integration: Gmail
Action: Send Email
To: {{prospect.email}}
Subject (Manual): {{agent.output.structured.subject}}
Body (Manual): {{agent.output.structured.body}}
Action Node (Update CRM):
Integration: Your CRM
Action: Update Contact
Contact ID: {{prospect.id}}
Fields:
  - last_contact_date: {{code.today}}
  - last_contact_type: email
  - status: awaiting_response
Send Notification (After Loop):
✉️ **Follow-up Automation Complete**

Sent {{loop.total}} personalized follow-up emails.

Check CRM for responses.

Benefits

  • No prospect falls through the cracks
  • Personalized at scale (not generic templates)
  • Consistent follow-up timing
  • Sales reps focus on conversations, not admin

Next Steps

Marketing Workflows

Content and campaign automation

Finance Workflows

Invoice and expense automation

Loop Node

Learn about processing multiple items

Agent Node

Generate personalized content with AI