Setup tutorial by Sriram

Codex Saver Guide

Follow the setup tutorial below, then use the final checklist before relying on it in a real workflow.

  • Practical setup
  • Beginner-readable
  • Business workflow focus
Work with Sriram

Build automation around how your team actually works.

Send your requirement and get a tailored AI automation blueprint built for your business. No fluff, just what actually works.

Get this built for my business

Codex Saver Guide

A step-by-step guide to finding, qualifying, and exporting leads using AI and web automation Apify is a web automation and scraping platform. In simple words, it helps you collect public data from

Free Lead Generation Setup

Using Codex + Apify

A step-by-step guide to finding, qualifying, and exporting leads using AI and web automation

What Is Apify?

Apify is a web automation and scraping platform. In simple words, it helps you collect public data from the internet without manually visiting hundreds of websites.

You can use Apify to pull data from

  • Google Maps
  • Business directories
  • Company websites
  • Public social pages
  • Search results
  • Job boards
  • Ecommerce pages
  • Review sites

Apify has ready-made tools called Actors. Each Actor is a mini automation that can scrape or collect a specific type of data. For example, instead of manually searching "sales agencies in Tampa," Apify can collect business names, websites, locations, contact pages, and other public details automatically.

What Codex Does In This Setup

Apify collects the raw data. Codex thinks through the data.

Codex can help you:
  • Choose the right Apify scraper
  • Run the search
  • Clean the results
  • Remove duplicates
  • Filter weak leads
  • Score the best leads
  • Create outreach angles
  • Turn the final list into CSV format

The workflow is

Apify = Gets the data

Codex = Cleans, filters, qualifies, and structures the leads

Step 1: Create an Apify Account

Go to: https://apify.com and create a free account. After signing in, you will be able to use Apify Actors and connect Apify to AI tools through MCP.

Step 2: Connect Apify to Codex

Apify provides an MCP server. MCP lets Codex use Apify like a tool. Use this Apify MCP server URL: https://mcp.apify.com In Codex, add a new MCP server and use the Apify server URL above. When prompted, log in with your Apify account and approve access.

If your Codex setup asks for a config, use

{ "mcpServers": { "apify": { "url": "https://mcp.apify.com" } } } If it asks for an API token instead, get your Apify API token from Apify settings and use: { "mcpServers": { "apify": { "url": "https://mcp.apify.com", "headers": {

"Authorization": "Bearer YOUR_APIFY_TOKEN" } } } }

Replace YOUR_APIFY_TOKEN with your actual Apify token.

Step 3: Define Your Target Leads

Before asking Codex to find leads, define your target clearly. Use this format

Business I sell: [What you sell] Target customer: [Who you want to reach] Location: [City, state, country, or global] Industry: [Specific niche] Target role: [Founder, owner, sales manager, etc.] Number of leads: [25, 50, 100, etc.]

Example

Business I sell: AI outbound systems for B2B service companies Target customer: Companies that need more sales calls Location: Tampa, Florida Industry: Marketing agencies, staffing firms, insurance agencies Target role: Founder, owner, sales

manager, or BDM Number of leads: 50

Step 4: Use This Prompt in Codex

Copy this prompt and customize it

Use Apify to find qualified leads for my business. My business: [Describe what you sell] Target customer: [Describe who you want as a client] Location: [Target city, state, country, or global] Industry: [Target industry or niche] Target roles: [Founder, owner, CEO, sales manager, etc.] Number of leads: [How many leads you want] Find leads from public sources such as Google Maps, business directories, company websites, and public social pages. For each lead, give me: – Name, if publicly available – Company name – Role or likely decision-maker title – Website – Location – Public contact page – Public email, if available – LinkedIn or social URL, if publicly available – Reason this lead is a good fit – Personalized outreach angle – Lead quality score from 1 to 10 Clean the list by removing duplicates, irrelevant companies, weak matches, and incomplete leads. Give me the final result as a CSV-ready table.

Step 5: Example Prompt

Use Apify to find 50 qualified leads for my business. My business: I help B2B service companies book more sales calls using AI-powered outbound systems. Target customer: Small to mid-sized businesses that need consistent lead generation.

Location: Tampa, Florida Industry: Marketing agencies, staffing agencies,

commercial insurance firms, real estate brokerages, and B2B SaaS companies. Target roles: Founder, owner, sales manager, BDM, or CEO. Find leads from public sources such as Google Maps, business directories, company websites, and public social pages. For each lead, give me: – Name, if publicly available – Company name – Role or likely decision-maker title – Website – Location – Public contact page – Public email, if available – LinkedIn or social URL, if publicly available – Reason this lead is a good fit – Personalized outreach angle – Lead quality score from 1 to 10 Remove duplicates and weak matches. Give me the best 50 leads as a CSV-ready table.

Step 6: Turn Leads Into Outreach Messages

After Codex gives you the lead list, use this prompt

Write a short personalized outreach message for each lead. Rules: – Keep each message under 80 words – Mention the company naturally – Use the outreach angle from the lead list – Make it sound human, not automated – Do not overhype – End with a soft question

Step 7: Export the Leads

Ask Codex

Turn this into a clean CSV with these columns: Name, Company, Role, Website, Location, Contact Page, Email, Social URL, Reason, Outreach Angle, Score, Outreach Message Then import the CSV into Google Sheets, Airtable, Notion, HubSpot, or your CRM of choice.

Important Use public data only. Follow privacy laws, platform rules, and email outreach regulations. Start with 25 to 50 leads first, check the quality, then scale once the workflow is working.

Final checklist

  • The required app, command, or service opens correctly.
  • Credentials are stored outside public files and screenshots.
  • A small test run completes before you use the setup for real work.
  • You know where logs, output files, and error messages are stored.
Sriram Varadarajan Sriram VaradarajanReplies personally

Want this connected to your real business workflows?

The guide helps you set up the tool. The bigger advantage comes from knowing which automations are worth building for your business.

Map my automation