How to Use Claude Code to Build Unlimited Leads for Paid Ads

ColdIQ's two-agent Claude Code system runs ICP research, company/contact list building, ad concept generation, and live campaign deployment from a single terminal. The workflow produced 1,300 target companies, 3,000+ enriched contacts, 30 ad concepts with rendered images, and live campaigns on both Meta and LinkedIn in one hour. Direct API integrations with ad platforms, data providers, and enrichment tools eliminate manual work and allow parallel execution across multiple agents.
Smiling man with a beard and short hair in a white shirt holding a coffee cup.
Michel Lieben
March 30, 2026
March 30, 2026
Soft-focus close-up of white and red flowers against a blue sky background.

Ivan Falco, Head of Growth at ColdIQ, has been spending hundreds of hours inside Claude Code building paid ad campaigns that return insane ROAS for our clients.

The workflow runs end-to-end from a terminal. No switching between tabs. No manual uploads. No copy-pasting data between platforms. One conversation inside Claude Code handles company research, ICP definition, audience targeting, contact list building, brand spec extraction, ad concept generation, image rendering, and live campaign deployment to both Meta and LinkedIn.

We ran this live for Lovable with zero prior information about the company. Here is the complete breakdown of how we did it, step by step.

1. The Two-Agent Architecture

The system runs on two agents built inside Claude Code. Each one has its own set of skills, scripts, and SOPs saved as documents that tell the agent exactly how to operate.

The first agent is the List Builder. It handles all the research, ICP definition, audience intelligence, and contact enrichment. Think of it as the targeting engine.

The second agent is the Ad Generator. It takes the audience brief, analyzes brand guidelines, selects ad templates from a proven library, generates copy angles, and renders the creative assets. Then it pushes everything live to your ad accounts.

Both agents run in parallel. While the List Builder is pulling companies and enriching contacts, the Ad Generator is building brand specs and generating ad concepts. This cuts the total workflow time roughly in half.

The skills powering each agent are stored as structured documents. Every SOP, every script, every step-by-step process lives inside these skill files. When you prompt the agent, it reads these documents and follows the process. You build this by going back and forth with Claude Code, refining instructions until the output matches what you want, then saving the final version as a skill.

2. Research and ICP Discovery

The first step is feeding the agent everything you know about the client.

For Lovable, we had nothing. So we told Claude Code to research the company from scratch. It pulled the landing page, crawled the Meta ad library for existing creatives, scraped Reddit for community sentiment, and attempted to pull reviews from G2 and Trustpilot.

Some platforms block scraping. G2 returned a blocked response. Trustpilot was partially accessible. When this happens, the agent tries alternative routes. You can connect dedicated APIs (like LinkUp, Power AI, or Apify actors) for gated platforms. For Twitter, Reddit, and other social platforms, having the API key pre-connected means the agent can pull data without hitting walls.

The reviews matter because they contain the language your audience uses. Good reviews tell you what customers value. Bad reviews on competitors reveal pain points you can address in your messaging. This is the same principle as mining sales calls for copy angles, except the agent does it in minutes instead of hours.

We also fed screenshots of the Lovable homepage, their LinkedIn ad library, and their logo files. The input was messy and unstructured. That is the point. You dump raw files and the agent organizes everything into a structured brief.

One practical tip: run a checkpoint command periodically during long sessions. This saves the conversation state so you can resume if the terminal resets due to context limits.

3. Building the ICP Matrix

Once research is complete, the agent builds an ICP matrix. This is a structured table that breaks down every potential customer segment with specific attributes.

For Lovable, the matrix included:

→ User segments: freelancers, product managers, developers, non-technical founders

→ Industries: SaaS, healthcare, telecom, professional services

→ Company sizes: mid-market (200 to 500 employees), with specific revenue ranges

→ Buying roles: champion, influencer, decision maker

→ Intent signals: job postings for engineering roles, recent funding, technology adoption patterns

→ Geographic focus: United States

The agent also generated an audience intelligence brief. This document covers pain points, communication language, competitive landscape, and messaging angles. It analyzed competitors like Google AI Studio and other no-code platforms to understand how Lovable positions itself differently.

The ICP matrix is not just for ads. You can feed this same output to Instantly for cold email campaigns or use it to build targeted lists on LinkedIn Sales Navigator.

If you want to see which companies match your target profile and find similar accounts to your best customers, you can do it for free here:

Lookalike Finder Tool

4. Company and Contact List Building

With the ICP matrix locked in, we selected Segment 1 (mid-market SaaS companies, 200 to 500 employees, US-based) and told the agent to find matching companies.

The agent called our data provider through API. It filtered by headcount, removed companies without domains, and narrowed down to three core industries. The result: 1,300 companies matching our targeting criteria.

Then it ran the people search. For each company, it looked for product leaders: VPs of Product, Heads of Product, Product Managers. The agent has a hard cap built into its skills to prevent pulling thousands of contacts from a single company.

The final contact list came back with 3,000+ contacts across those 1,300 companies. The cost for this enrichment run was around $14.

For email enrichment, the agent ran Prospeo through API. When one provider fails or returns incomplete data, the agent retries with alternative approaches. You can connect multiple enrichment providers (FullEnrich, Wiza, LeadMagic) and let the agent waterfall through them.

The entire enrichment process ran in the background while we worked on ad creative in a parallel terminal session. This is a key workflow pattern: start the data-heavy task, then switch to creative work. Come back when the enrichment is done.

You can find verified email addresses for your target contacts here, for free:

Email Finder Tool

5. Brand Spec Extraction and Ad Creative

The Ad Generator agent starts by building brand specifications. It analyzed the Lovable homepage, logo files, and existing ad library to extract:

→ Primary and secondary brand colors

→ Typography patterns

→ Visual style and tone

→ Existing ad formats and messaging angles

This matters because AI-generated ads that ignore brand guidelines look generic. B2B ads need to feel like they came from the company, not from a random template generator.

The agent then matched these brand specs against a template library. This library contains proven ad formats pulled from high-performing campaigns across multiple companies. Think of it as a database of ad structures that have worked before.

For Lovable, the agent selected 10 initial concepts. But 10 is not enough variety. So we spun up four parallel agents, each generating three concepts per template. This produced roughly 30 ad concepts with copy, each one written using the audience brief and pain points discovered during research.

The concepts ranged from step-by-step product walkthroughs ("Five steps to getting software built, let Lovable take care of it") to provocative statements ("One thing always drops when teams start using Lovable: time waiting on engineering") to before-and-after comparisons ("Time from idea to live app: before Lovable vs. after").

The more concepts you generate, the more likely you find a great performer. You can always cut the weak ones. Starting with volume gives you options.

6. Image Rendering and Quality Control

Once the concepts are approved, the agent writes image prompts and sends them to an image generation tool.

The quality of the output depends on three factors:

→ The brand information extracted (colors, typography, visual style)

→ The concept brief (messaging angle, target audience, desired format)

→ The base template (having a structural reference improves output significantly)

Some renders came back strong. The meme formats worked well, with Lovable-branded colors and clear messaging. Others needed adjustment, particularly when the agent tried to replicate complex UI elements like product dashboards.

For B2B ads specifically, the AI-generated images work best for formats that do not require pixel-perfect product screenshots. Memes, comparison graphics, step-by-step visuals, and bold statement ads all render cleanly. Dashboard mockups or detailed product UI stills need manual refinement.

The practical approach: generate a batch, pick the strongest 5 to 10, then refine those. Do not expect every render to be production-ready. Expect enough good ones to launch and test.

7. Pushing Campaigns Live to Meta and LinkedIn

This is where the workflow saves the most time. Instead of logging into Meta Ads Manager and LinkedIn Campaign Manager separately, the agent creates campaigns directly through API.

We connected our ad account API keys to Claude Code. The agent prompted us for campaign parameters:

→ Campaign name

→ Daily budget ($50/day in this case)

→ Landing page URL

→ Campaign objective (pipeline generation)

→ Target platforms (both Meta and LinkedIn)

Then it created the campaigns, set the targeting, and began uploading the ad creatives. For LinkedIn, it also uploaded the company list as a matched audience. LinkedIn allows company-level targeting, so the 1,300 companies from our List Builder became the targeting layer.

The contact list with email addresses feeds the Meta custom audience. Both platforms now have the exact same target companies, hit from two angles simultaneously.

The best way to connect your ad platforms is through direct API integration, not through MCP or third-party connectors. Write custom scripts once, save them as skills, and Claude Code reuses them for every future campaign.

If you want to find the right people at your target companies before running ads, you can do it for free here:

People Finder Tool

8. The Full Workflow Timeline

The entire process, from zero information about Lovable to live campaigns on both Meta and LinkedIn with 30 ad concepts and 3,000+ enriched contacts, took roughly one hour inside the terminal.

Here is what that hour produced:

→ Complete ICP matrix with 4 audience segments

→ Audience intelligence brief with pain points, messaging angles, and competitive positioning

→ 1,300 target companies filtered by industry, headcount, and geography

→ 3,000+ contacts with email addresses enriched via Prospeo

→ Brand specification document extracted from existing assets

→ 30 ad concepts with copy and rendered images

→ Live campaigns on both Meta and LinkedIn with targeting applied

Without this workflow, the same output would take two to three days of manual work across multiple tools and platforms. The compression is not about cutting corners. Every step still happens. The agent just executes faster and runs steps in parallel.

This same system works for any client. Swap the company name, feed new research, and the agents produce fresh output using the same proven process.

You can analyze any company's GTM profile and get a full strategy report here, for free:

GTM Reports Tool

---

Michel Lieben
Founder, CEO
Michel Lieben is the Founder & CEO of ColdIQ, a B2B sales prospecting agency trusted by 100+ organizations. He’s launched hundreds of outbound campaigns, mastered tools like Clay and Lemlist, and shares sharp, actionable insights on scaling sales with AI, automation, and strategy.

FAQ

What is the two-agent architecture in Claude Code for paid ads?

The system uses two separate agents inside Claude Code. The List Builder handles company research, ICP definition, audience intelligence, and contact enrichment through data provider APIs. The Ad Generator handles brand spec extraction, creative concept development, image rendering, and campaign deployment to Meta and LinkedIn. Both agents run in parallel, cutting total workflow time roughly in half. Each agent reads from structured skill documents that define its step-by-step process.

How does Claude Code generate ad creatives for B2B campaigns?

Claude Code extracts brand specifications from the client's homepage, logo files, and existing ad library to establish colors, typography, and visual style. It then matches these specs against a template library of proven ad formats. Multiple parallel agents generate copy angles and image prompts based on the audience brief and pain points from research. The output includes meme formats, before-and-after comparisons, step-by-step visuals, and bold statement ads. Renders work best for graphic-based formats, while product dashboard mockups may need manual refinement.

How much does it cost to run this lead generation workflow?
The contact enrichment for 3,000+ contacts across 1,300 companies cost approximately $14 using Prospeo's API. Ad platform costs are separate and depend on your campaign budget (the demo used $50/day). Claude Code itself requires a subscription. The data provider APIs (Prospeo, FullEnrich, Wiza, LeadMagic) charge per credit or per contact enriched. The total variable cost per campaign run is significantly lower than hiring a media buyer or outsourcing to an agency for the same output.

Can Claude Code push ads directly to Meta and LinkedIn?

Yes. By connecting your Meta and LinkedIn ad account API keys to Claude Code, the agent creates campaigns, sets targeting parameters, uploads creatives, and applies audience lists directly through API calls. For LinkedIn, it uploads company lists as matched audiences. For Meta, it uses contact email lists for custom audiences. The connection requires writing custom API scripts once, which are saved as reusable skills. This eliminates the need to manually log into each ad platform.

What happens when Claude Code hits context limits during long workflows?

Long research-heavy sessions can hit context limits, causing the terminal to compact or reset. The practical solution is running a checkpoint command periodically, which saves the full conversation state to a file. If the session resets, you can resume from the checkpoint. You can also run enrichment tasks in the background (using Ctrl+V or background flags) and continue working on other parts of the workflow in a parallel terminal session. The agent picks up where it left off without losing progress. LINKEDIN_FIRST_LINE: How To Get Unlimited Leads Using Claude Code (for Paid Ads)

AI Sales

Available to Hire
mich picture
alex picture
Lucas Caresse Picture
Monika Picture
Hugues Picture
Soheil Picture
Smiling man with dark hair and beard wearing a black shirt against a blue background.

Let's Get Started!

Schedule a 30-minute call with ColdIQ leadership to learn how our outbound strategy and sales tools help generate qualified leads and close deals.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
Aerial view of a complex urban cityscape with a dense grid of streets and buildings at night.
CTA Icon Validate
CTA Icon Mail
CTA Icon Thunderbolt
CTA Icon Security
CTA Icon System
CTA Icon Growth