Enrich B2B leads with Tavily search, Groq Llama 3.3, and Google Sheets

Quick overview This workflow receives a company name via webhook, runs three Tavily web searches (company info, recent news, and key people), uses Groq (Llama 3.3 70B) to synthesize a structured lead profile, optionally appends the results to Google Sheets, and returns the enriched profile in the webhook response.

How it works Receives a POST webhook request containing a company name and an optional domain. Queries the Tavily Search API for company overview details, then searches Tavily again for recent news and key executives/leadership. Sends the combined search results to a Groq LLM agent to generate a sales-ready lead enrichment profile as strict JSON (company details, products, signals, news, pain points, and outreach angles). Parses the AI output, extracts valid JSON if possible, and flattens key fields into a single row-friendly structure. If parsing succeeds, appends the enriched lead data to a Google Sheets spreadsheet and returns the full profile in the webhook response. If parsing fails, returns an HTTP 422 error response with the raw AI output for troubleshooting.

Setup Create a Groq API key, add it as an n8n Groq credential, and select it in the Groq LLM node. Create a Tavily API key and replace YOUR_TAVILY_API_KEY in all three Tavily HTTP Request nodes. (Optional) Add Google Sheets OAuth2 credentials, set the Google Sheet document ID (replace YOUR_GOOGLE_SHEET_ID), and ensure the target sheet (named “Leads”) has matching column headers for the flattened fields.

0
Downloads
1
Views
8.26
Quality Score
beginner
Complexity
Author:Utkarsh Kapoor(View Original →)
Created:7/2/2026
Updated:7/4/2026

🔒 Please log in to import templates to n8n and favorite templates

Workflow Visualization

Loading...

Preparing workflow renderer

Comments (0)

Login to post comments