🔓 Unlock all 10,000+ workflows & prompts free Join Newsletter →
✅ Full access unlocked — explore all 10,000 AI workflow and prompt templates Browse Templates →
Home n8n Workflow
January 22, 2026

Salesforce + Databricks: qualify leads with usage intel

Lisa Granqvist Partner Workflow Automation Expert

Your inbound leads look “good” in Salesforce. Then the rep opens the record and realizes they still have no clue if the company actually used the product, what they tested, or what to say first. So they bounce between dashboards, logs, LinkedIn, and random notes. It’s slow, and frankly, it’s avoidable with Salesforce Databricks automation.

Sales Ops ends up cleaning up the process. Growth marketers get asked why “high intent” leads aren’t converting. And founders doing sales feel it immediately because every call starts with detective work. This workflow fixes that by giving every new lead a usage-backed score and ready-to-send talking points.

Below, you’ll see what the automation does, what you get out of it, and how it turns raw product usage into Salesforce tasks your team will actually use.

How This Automation Works

The full n8n workflow, from trigger to final output:

n8n Workflow Template: Salesforce + Databricks: qualify leads with usage intel

The Problem: lead qualification happens without usage context

Most inbound processes score leads on surface-level fields: company size, title, email domain, maybe a form question. But the strongest signal is usually hiding in your product data. Which endpoints did they test? Did they hit auth once and disappear, or did they try three workflows and come back tomorrow? When that context lives in Databricks (or another analytics platform) and your lead lives in Salesforce, reps are stuck stitching it together by hand. A few leads? Fine. Twenty in a day? That’s a mess.

It adds up fast. Here’s where it breaks down in the real world.

  • Reps spend about 10–15 minutes per lead checking usage, then still feel unsure.
  • Hot leads cool off while someone tries to match a tenant name to a company record.
  • Manual research introduces small errors, which means the outreach sounds generic or wrong.
  • Salesforce tasks get created with “Follow up” and no substance, so they’re ignored or delayed.

The Solution: Salesforce + Databricks qualification with AI scoring

This workflow pulls a fresh batch of leads from a Salesforce report, then immediately looks up what those leads did inside your product by querying Databricks for API usage and endpoint activity. Next, it enriches each company with firmographic and company intelligence from Explorium, so you get context like industry, size band, and location without opening another tab. Then an AI agent reviews the whole profile (lead details, endpoints tested, fit signals, red flags) and generates a structured qualification report with a clear score. Finally, n8n creates a Salesforce task that includes the summary and personalized talking points, so a rep can act in minutes, not hours.

The workflow starts with Salesforce as the source of truth for inbound leads. Databricks supplies behavioral “proof” (actual usage). Explorium adds the who-and-why behind the company, and the AI agent turns everything into a task your team can use immediately.

What You Get: Automation vs. Results

Example: What This Looks Like

Say your team gets 20 inbound leads in a day. If a rep spends even 12 minutes jumping into Databricks, searching endpoints, and skimming company context, that’s about 4 hours burned before they send a single decent email. With this workflow, you run the report, let n8n pull usage and enrichment, and Salesforce tasks appear with the score and talking points. You’re down to a few minutes per lead to review and hit send, not half the morning.

What You’ll Need

  • n8n instance (try n8n Cloud free)
  • Self-hosting option if you prefer (Hostinger works well)
  • Salesforce to pull leads and create tasks.
  • Databricks to query API usage and endpoint signals.
  • Explorium API key (get it from the Explorium Dashboard).

Skill level: Intermediate. You’ll connect credentials, confirm your Databricks query fields, and map the Salesforce task output.

Don’t want to set this up yourself? Talk to an automation expert (free 15-minute consultation).

How It Works

A Salesforce report kicks it off. The workflow starts from a manual run (great for testing) but can also be scheduled so new or updated leads are qualified automatically.

Usage signals are pulled from Databricks. n8n formats tenant identifiers, runs a SQL statement via Databricks’ API, and splits the results so each lead gets its own usage profile (endpoints used and a simple count).

Company enrichment fills in the blanks. Explorium matches the business name, checks that a valid match exists, then returns firmographics so you can judge fit without doing manual research.

An AI agent turns it into a task. The lead, usage, and firmographics are merged into one profile, analyzed, and formatted into a structured summary that’s written back into Salesforce as a follow-up task your rep can act on.

You can easily modify the scoring rules and what gets written into the task description based on your needs. See the full implementation guide below for customization options.

Step-by-Step Implementation Guide

Step 1: Configure the Manual Trigger

Start the workflow manually to validate each stage before enabling it for production.

  1. Add the Manual Run Trigger node as the entry point.
  2. Confirm it connects directly to Fetch SF Report.
  3. Leave default settings unchanged for manual testing.

Step 2: Connect Salesforce Report Ingestion

Pull the inbound lead report and parse rows into lead objects.

  1. Configure Fetch SF Report to call your Salesforce report endpoint. Credential Required: Connect your HTTP Request credentials.
  2. Verify Fetch SF Report connects to Parse Lead Rows.
  3. In Parse Lead Rows, keep the provided JavaScript that maps report cells into lead fields (firstName, lastName, email, company, leadSource, status, createdDate, recordId, TenantName).
  4. Confirm the execution flow continues from Fetch SF ReportParse Lead Rows.

⚠️ Common Pitfall: If your Salesforce report structure differs, the Parse Lead Rows code will throw Unexpected data structure. Adjust the report.factMap['T!T'] path to match your report.

Step 3: Build the Parallel Enrichment Inputs

Split lead data into two parallel branches for API usage analysis and company matching.

  1. Ensure Parse Lead Rows outputs to both Format Tenant List and Pull Company Names in parallel.
  2. In Format Tenant List, keep the SQL list formatter that outputs tenantNames as a comma-separated string with quotes.
  3. In Pull Company Names, keep the formatter that outputs each businessName wrapped in quotes.
  4. Connect Format Tenant ListDatabricks Query and set Method to POST.
  5. Connect Databricks QueryExpand Result Items with Field to Split Out set to result.data_array.
  6. In Relabel Fields, map keys to TenantNames, endpoints, and endpointsNum using the provided key map.

Credential Required: Connect your HTTP Request credentials for Databricks Query.

Step 4: Configure Company Matching and Firmographics

Match company records and enrich them with firmographics before merging data.

  1. Connect Pull Company NamesBatch Through LeadsMatch Company Records.
  2. In Match Company Records, keep Operation set to match and the business name expression {{ $json.businessName }}.
  3. Connect Match Company RecordsVerify Match Exists and keep the condition {{ $json.matched_businesses[0].business_id }} as the non-empty check.
  4. On the true path, connect Verify Match ExistsFetch Firmographics with Operation set to enrich and business ID {{ $json.matched_businesses[0].business_id }}.
  5. Route both Fetch Firmographics and the false path of Verify Match Exists into Batch Through Leads.

Credential Required: Connect your Explorium API credentials for Match Company Records and Fetch Firmographics.

Step 5: Merge Enrichment and Usage Streams

Combine API usage data and firmographics into unified lead profiles.

  1. Connect Relabel FieldsCombine Streams and Batch Through LeadsCombine Streams.
  2. Connect Combine StreamsAssemble Lead Profiles.
  3. In Assemble Lead Profiles, keep the merge logic that references Parse Lead Rows to align leads with TenantNames and enrichment data.
  4. Connect Assemble Lead ProfilesCycle Lead Items to iterate through each lead.

⚠️ Common Pitfall: If Relabel Fields key names don’t match the data array order, Assemble Lead Profiles will miss API usage fields. Validate key mappings for TenantNames, endpoints, and endpointsNum.

Step 6: Set Up AI Qualification and Structured Output

Use the AI agent to score and summarize each lead with a structured response.

  1. Open AI Lead Analyst and keep Prompt Type set to define with the provided multi-line analysis prompt. Ensure the embedded expressions reference {{ $('Cycle Lead Items').item.json... }} fields.
  2. Connect Anthropic Chat Engine to AI Lead Analyst as the language model with Model set to claude-sonnet-4-20250514.
  3. Attach Structured Output Mapper to AI Lead Analyst and keep Schema Type set to manual with the provided JSON schema.
  4. Connect Explorium MCP Tool to AI Lead Analyst as the tool, with Endpoint URL set to https://mcp-n8n.explorium.ai/mcp and Authentication set to headerAuth.
  5. Route Retrieve Account RecordAI Lead Analyst and keep the account filter where Name equals Test Lead Company.

Credential Required: Connect your Anthropic credentials in Anthropic Chat Engine. Structured Output Mapper and Explorium MCP Tool are AI sub-nodes—add credentials to AI Lead Analyst’s connected providers, not to the sub-nodes themselves.

Step 7: Configure Salesforce Task Updates

Format the AI output and create Salesforce tasks for your sales team.

  1. Connect AI Lead AnalystFormat Lead Summary and keep the formatting code that builds the task description and priority.
  2. Connect Format Lead SummaryUpdate Salesforce Tasks.
  3. In Update Salesforce Tasks, set Resource to task and Status to Open.
  4. Set What ID to {{ $('Retrieve Account Record').item.json.Id }}, Subject to Call, and Description to {{ $json.Description }}.
  5. Ensure Update Salesforce Tasks routes to Cycle Lead Items to continue processing remaining leads.

Credential Required: Connect your Salesforce credentials in both Retrieve Account Record and Update Salesforce Tasks.

Step 8: Test and Activate Your Workflow

Run a full test to confirm lead qualification and Salesforce task creation.

  1. Click Execute Workflow from Manual Run Trigger to start a test run.
  2. Verify that Parse Lead Rows outputs lead objects and that Parse Lead Rows outputs to both Format Tenant List and Pull Company Names in parallel.
  3. Confirm Relabel Fields outputs API usage fields and Fetch Firmographics returns enrichment data before Combine Streams and Assemble Lead Profiles.
  4. Check that Format Lead Summary produces a Salesforce-ready Description and Priority.
  5. Validate that Update Salesforce Tasks creates a task linked by {{ $('Retrieve Account Record').item.json.Id }}.
  6. When testing succeeds, toggle the workflow to Active for production use.
🔒

Unlock Full Step-by-Step Guide

Get the complete implementation guide + downloadable template

Common Gotchas

  • Salesforce credentials can expire or need specific permissions. If things break, check your connected app access and OAuth scopes in Salesforce Setup first.
  • If you’re using Wait nodes or external rendering, processing times vary. Bump up the wait duration if downstream nodes fail on empty responses.
  • Explorium matching can return multiple “close” businesses. If the workflow is assigning enrichment to the wrong company, tighten the match rules (or add a confidence threshold) before you trust the score.

Frequently Asked Questions

How long does it take to set up this Salesforce Databricks automation automation?

About 60–90 minutes if your Salesforce report and Databricks query are ready.

Do I need coding skills to automate Salesforce Databricks automation?

No. You’ll mostly connect credentials and adjust a few mappings. The only “technical” part is confirming the Databricks SQL query matches your schema.

Is n8n free to use for this Salesforce Databricks automation workflow?

Yes. n8n has a free self-hosted option and a free trial on n8n Cloud. Cloud plans start at $20/month for higher volume. You’ll also need to factor in Explorium API usage and your AI model costs.

Where can I host n8n to run this automation?

Two options: n8n Cloud (managed, easiest setup) or self-hosting on a VPS. For self-hosting, Hostinger VPS is affordable and handles n8n well. Self-hosting gives you unlimited executions but requires basic server management.

Can I customize this Salesforce Databricks automation workflow for different lead scoring rules?

Yes, and you should. The easiest place is the AI Agent prompt that produces the “High Priority / Medium Priority / Low Priority / Nurture” score, plus the formatting step that maps fields into the Salesforce task. Common tweaks include weighting specific endpoints more heavily, flagging freemail domains, and changing what counts as “active usage” in the Databricks query.

Why is my Salesforce connection failing in this workflow?

Usually it’s an expired OAuth token or the connected app lost permissions. Reconnect Salesforce in n8n, then confirm the user can access the Analytics Reports API and create Tasks. If the report request works but task creation fails, check task field requirements and validation rules in your Salesforce org.

How many leads can this Salesforce Databricks automation automation handle?

Dozens to hundreds per run for most small teams.

Is this Salesforce Databricks automation automation better than using Zapier or Make?

Often, yes, because this workflow needs branching, batching, and multi-step enrichment that gets expensive and awkward in simpler tools. n8n also lets you self-host, which matters once you’re qualifying leads daily and don’t want to count every execution. Another big factor is AI orchestration: the agent step, the structured output parsing, and the enrichment merge logic all live comfortably in one place. Zapier or Make can still work if you only want a lightweight “enrich then create task” flow, with no usage query and no deeper reasoning. If you’re torn, Talk to an automation expert and we’ll pressure-test the simplest option that still gets you the outcome.

This is what “qualified” should mean: real usage signals, real company context, and a Salesforce task that tells your rep exactly what to do next. Set it up once, and the busywork stops showing up every morning.

Need Help Setting This Up?

Our automation experts can build and customize this workflow for your specific needs. Free 15-minute consultation—no commitment required.

Lisa Granqvist

Workflow Automation Expert

Expert in workflow automation and no-code tools.

×

Use template

Get instant access to this n8n workflow Json file

💬
Get a free quote today!
Get a free quote today!

Tell us what you need and we'll get back to you within one working day.

Get a free quote today!
Get a free quote today!

Tell us what you need and we'll get back to you within one working day.

Launch login modal Launch register modal