🎣 Qualify leads with Salesforce, Explorium data & Claude AI analysis of API usage

⚡ 163 views · 🎣 Lead Generation & Enrichment

💡 Pro Tip — For lead enrichment, ScraperNode can pull LinkedIn profiles, company data, and job listings directly into your pipeline — useful for building prospect lists without manual research.

View All Scrapers

Description

Inbound Agent - AI-Powered Lead Qualification with Product Usage Intelligence

This n8n workflow automatically qualifies and scores inbound leads by combining their product usage patterns with deep company intelligence. The workflow pulls new leads from your CRM, analyzes which API endpoints they’ve been testing, enriches them with firmographic data, and generates comprehensive qualification reports with personalized talking points—giving your sales team everything they need to prioritize and convert high-quality leads.

DEMO

Template Demo

Credentials Required

To use this workflow, set up the following credentials in your n8n environment:

Salesforce

Databricks (or Analytics Platform)

Explorium API

Explorium MCP

Anthropic API

Go to Settings → Credentials, create these credentials, and assign them in the respective nodes before running the workflow.


Workflow Overview

Node 1: When clicking ‘Execute workflow’

Manual trigger that initiates the lead qualification process.

Alternative Trigger Options:

Node 2: GET SF Report

Pulls lead data from a pre-configured Salesforce report.

Returns: Raw Salesforce report data including:

CRM Alternatives: This node can be replaced with HubSpot, Zoho, or any CRM’s reporting API.

Node 3: Extract Records

Parses the Salesforce report structure and extracts individual lead records.

Extraction Logic:

Node 4: Extract Tenant Names

Prepares tenant identifiers for usage data queries.

Purpose: Formats tenant names as SQL-compatible strings for the Databricks query Output: Comma-separated, quoted list: 'tenant1', 'tenant2', 'tenant3'

Node 5: Query Databricks

Queries your analytics platform to retrieve API usage data for each lead.

Platform Alternatives:

Node 6: Split Out

Splits the Databricks result array into individual items for processing.

Node 7: Rename Keys

Normalizes column names from database query to readable field names.

Mapping:

Node 8: Extract Business Names

Prepares company names for Explorium enrichment.

Node 9: Loop Over Items

Iterates through each company for individual enrichment.

Node 10: Explorium API: Match Businesses

Matches company names to Explorium’s business entity database.

Returns:

Node 11: Explorium API: Firmographics

Enriches matched businesses with comprehensive company data.

Returns:

Node 12: Merge

Combines API usage data with firmographic enrichment data.

Node 13: Organize Data as Items

Structures merged data into clean, standardized lead objects.

Data Organization:

Node 14: Loop Over Items1

Iterates through each qualified lead for AI analysis.

Node 15: Get many accounts1

Fetches the associated Salesforce account for context.

Purpose: Link lead qualification back to Salesforce account for task creation

Node 16: AI Agent

Analyzes each lead to generate comprehensive qualification reports.

Input Data:

Analysis Process:

Output: Structured qualification report with:

Node 18: Clean Outputs

Formats the AI qualification report for Salesforce task creation.

Node 19: Update Salesforce Records

Creates follow-up tasks in Salesforce with qualification intelligence.

Alternative Output Options:


Workflow Flow Summary

  1. Trigger: Manual execution or scheduled run
  2. Pull Leads: Fetch new/updated leads from Salesforce report
  3. Extract: Parse lead records and tenant identifiers
  4. Query Usage: Retrieve API endpoint usage data from analytics platform
  5. Prepare: Format data for enrichment
  6. Match: Identify companies in Explorium database
  7. Enrich: Pull comprehensive firmographic data
  8. Merge: Combine usage patterns with company intelligence
  9. Organize: Structure complete lead profiles
  10. Analyze: AI evaluates each lead with quality scoring
  11. Format: Structure qualification reports for CRM
  12. Create Tasks: Automatically populate Salesforce with actionable intelligence

This workflow eliminates manual lead research and qualification, automatically analyzing product engagement patterns alongside company fit to help sales teams prioritize and personalize their outreach to the highest-value inbound leads.


Customization Options

Flexible Triggers

Replace the manual trigger with:

Analytics Platform Integration

The Databricks query can be adapted for:

CRM Flexibility

Works with multiple CRMs:

Enrichment Depth

Add more Explorium endpoints:

Output Destinations

Route qualification reports to:

AI Model Options

Swap AI providers:


Setup Notes

  1. Salesforce Report Configuration: Create a report with required fields (name, email, company, tenant ID) and use its API endpoint
  2. Tenant Identification: Ensure your product usage data includes identifiers that link to CRM leads
  3. Usage Data Query: Customize the SQL query to match your database schema and table structure
  4. MCP Configuration: Explorium MCP requires Header Auth—configure credentials properly
  5. Lead Scoring Logic: Adjust AI system prompts to match your ideal customer profile and qualification criteria
  6. Task Assignment: Configure Salesforce task assignment rules or add logic to route to specific sales reps

This workflow acts as an intelligent lead qualification system that combines behavioral signals (what they’re testing) with firmographic fit (who they are) to give sales teams actionable intelligence for every inbound lead.

🔗 Nodes Used

HTTP Request, Rename Keys, Salesforce, AI Agent, Anthropic Chat Model, Structured Output Parser

📥 Import

Download workflow.json and import into n8n: Workflow menu → Import from File

📖 Importing guide · 🔑 Credential setup