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.
Related Templates
Restore your workflows from GitHub
This workflow restores all n8n instance workflows from GitHub backups using the n8n API node. It complements the Backup ...
Build a Restaurant Voice Assistant with VAPI and PostgreSQL for Bookings & Orders
This n8n template demonstrates how to create a comprehensive voice-powered restaurant assistant that handles table reser...
Extract Named Entities from Web Pages with Google Natural Language API
Who is this for? Content strategists analyzing web page semantic content SEO professionals conducting entity-based anal...
🔒 Please log in to import templates to n8n and favorite templates
Workflow Visualization
Loading...
Preparing workflow renderer
Comments (0)
Login to post comments