Schedule icon
Webhook icon
AIAgent icon
GoogleGemini icon
TavilyWebSearch icon
Script icon
Process icon
If icon
SlackIncomingWebhook icon
Log icon

AI Inbound Lead Enrichment, Scoring and VIP Routing Gate

Enrich inbound signups with live web search, calculate ICP scores with Gemini, and route enterprise leads to VIP Slack channels automatically.

Categories
AIBusiness

Inbound signup forms often force sales teams into an uncomfortable trade-off: either ask prospects 15 friction-heavy qualification questions and crush conversion rates, or collect basic emails and waste hours manually researching companies on LinkedIn and Google. Slow responses to high-value enterprise leads directly reduce close rates.

This blueprint deploys an autonomous lead qualification agent using Kestra, Google Gemini, and Tavily web retrieval. As soon as an inquiry arrives via webhook, the pipeline searches company firmographics, verifies team size and cloud footprint, calculates an objective ICP fit score (0 to 100), and creates an executive sales battle card. High-intent enterprise prospects immediately trigger an urgent Slack alert with a personalized outreach angle, while lower-tier inquiries route to automated nurture.

How it works

  1. enrich_and_score_lead (io.kestra.plugin.ai.agent.AIAgent) searches the company domain via TavilyWebSearch, extracts headcount and infrastructure scale, and generates an objective qualification score using a strict JSON schema.
  2. parse_qualification_metrics (io.kestra.plugin.scripts.python.Script) formats key intent signals into an executive sales-battle-card.md artifact stored on the execution.
  3. routing_gate (io.kestra.plugin.core.flow.If) evaluates the calculated score. Enterprise accounts trigger an instant notification to #sales-enterprise-inbound, while standard leads route to automated self-service email campaigns.

What you get

  • Sub-minute lead qualification without forcing prospects through long multi-page forms.
  • Tailored sales battle cards containing company context and suggested pitch angles.
  • Zero human triage overhead for personal or low-intent email signups.

Who it's for

  • RevOps, Sales Engineering, and Growth Marketing teams at B2B SaaS companies.
  • Account Executives seeking immediate alerts when high-value buyers submit inquiries.

Why orchestrate this with Kestra

Lead routing requires orchestrating external search APIs, LLM inference, and notification platforms reliably. With Kestra, webhook ingestion triggers instantly with zero cold-start delay, secret management protects your search and CRM credentials, and every lead qualification has an immutable execution log for attribution modeling.

Prerequisites

  • A Google Gemini API key.
  • A Tavily API key for web search firmographic retrieval.
  • A Slack incoming webhook endpoint for sales team notifications.

Secrets

  • GEMINI_API_KEY: API key for Google Gemini provider.
  • TAVILY_API_KEY: API key for Tavily search retriever.
  • SLACK_WEBHOOK_URL: Slack incoming webhook URL for sales alerts.
  • WEBHOOK_KEY: Authentication key for webhook trigger security.

Quick start

  1. Configure the GEMINI_API_KEY, TAVILY_API_KEY, SLACK_WEBHOOK_URL, and WEBHOOK_KEY secrets in your Kestra namespace.
  2. Send a test webhook payload with your prospect details or run a manual execution.
  3. Inspect the generated sales-battle-card.md in the execution output artifacts.
  4. Enable the webhook trigger and connect it to your website form handler (e.g., HubSpot, Marketo, or Typeform).

How to extend

  • Add an HTTP task to push qualified enterprise accounts directly into Salesforce or HubSpot.
  • Add a Loop task (io.kestra.plugin.core.flow.Loop) to backfill and re-score historical CRM lead exports.

Links

See How

New to Kestra?

Use blueprints to kickstart your first workflows.