Lead Formatter Tool (Open AI) avatar
Lead Formatter Tool (Open AI)

Pricing

Pay per event

Go to Apify Store
Lead Formatter Tool (Open AI)

Lead Formatter Tool (Open AI)

Developed by

ParseForge

ParseForge

Maintained by Community

Clean, format, and enhance lead data using AI for cold email campaigns and lead management. Automatically standardizes names, companies, and job titles using advanced language models. Perfect for sales teams, marketers, and businesses that need properly formatted lead data for professional outreach.

5.0 (1)

Pricing

Pay per event

0

2

1

Last modified

a day ago

Lead Formatter

🚀 Clean, format, and enhance lead data using AI for cold email campaigns and lead management.

Transform messy, inconsistent lead data into professionally formatted information perfect for sales outreach, CRM imports, and marketing campaigns. Using OpenAI's advanced language models, this tool automatically standardizes names, company names, job titles, and can even generate personalized content—saving hours of manual data cleaning work.

Target Audience: Sales teams, marketers, business developers, CRM administrators, data analysts
Primary Use Cases: Lead data cleaning, CRM preparation, cold email campaigns, data standardization, personalized content generation

What Does Lead Formatter Do?

This tool uses AI to format, enrich, and enhance lead data, ensuring your contact information is clean and professional. It delivers:

  • Formatted Names: Proper capitalization (e.g., "john" → "John", "MARY" → "Mary")
  • Company Names: Standardized business names (e.g., "apple inc" → "Apple Inc.")
  • Job Titles: Professional title formatting (e.g., "ceo" → "CEO", "vice president of sales" → "Vice President of Sales")
  • Phone Numbers: Standardized phone formatting (e.g., "123-456-7890" → "+11234567890" in E.164 format)
  • Data Enrichment: Automatically extract missing information from email addresses and domains
  • Generated Content: Create company descriptions, personalized lines, and case studies
  • Data Cleaning: Remove blank leads and duplicate entries
  • Custom Prompts: Configure per-field processing with custom instructions (max 100 characters) that override default formatting
  • Custom Output Columns: Map fields to custom column names for your workflow (both default and custom columns included)

Business Value: Save hours of manual data entry and ensure your lead database is consistent, professional, and ready for outreach campaigns. Improve email deliverability and response rates with properly formatted contact information and AI-generated personalized content.

Input Configuration

To format your leads, simply provide your lead data and OpenAI API key. The tool supports comprehensive configuration options:

Required Inputs

Lead Data Input (Choose ONE of the following)

You can provide leads in one of three formats. Only use one format at a time:

leads - JSON Array or JSON String

Type: Array of lead objects or JSON string
Description: Array of lead objects with firstName, lastName, companyName, email, jobTitle, country, website, personalPhone, homePhone, and/or domain fields.

Example:

[
{
"firstName": "john",
"lastName": "smith",
"companyName": "apple inc",
"email": "john.smith@apple.com",
"jobTitle": "ceo",
"personalPhone": "123-456-7890",
"homePhone": "(555) 987-6543"
},
{
"email": "mary.obrien@microsoft.com",
"jobTitle": "vice president of sales",
"personalPhone": "5551234567"
},
{
"firstName": "david",
"email": "david@google.com",
"country": "usa",
"personalPhone": "1234567890"
}
]
leadsXlsx - Excel XLSX File (Base64-encoded)

Type: String (base64-encoded XLSX file)
Description: Base64-encoded XLSX file content. The file should have a header row with columns like: firstName, lastName, companyName, email, jobTitle, country, website, personalPhone, homePhone, domain (or variations like "First Name", "Last Name", "Company Name", etc.). The first sheet will be used.

Example:

"leadsXlsx": "UEsDBBQAAAAIAK..."

How to use:

  1. Create an Excel file with your lead data
  2. Ensure the first row contains column headers
  3. Convert the file to base64 (many online tools available)
  4. Paste the base64 string into the leadsXlsx field

Supported column names (case-insensitive):

  • firstName, first name, first_name, First Name
  • lastName, last name, last_name, Last Name
  • companyName, company name, company_name, Company Name
  • email, Email
  • jobTitle, job title, job_title, Job Title
  • country, Country
  • website, Website
  • personalPhone, personal phone, personal_phone, Personal Phone
  • homePhone, home phone, home_phone, Home Phone
  • domain, Domain

The tool automatically detects and maps these column name variations, so your Excel or CSV files can use any of these formats.

leadsCsv - CSV File Content

Type: String (CSV content)
Description: CSV file content as a string. The CSV should have a header row with columns like: firstName, lastName, companyName, email, jobTitle, country, website, personalPhone, homePhone, domain (or variations like "First Name", "Last Name", etc.).

Example:

"leadsCsv": "firstName,lastName,email,jobTitle\njohn,smith,john.smith@apple.com,ceo\nmary,obrien,mary.obrien@microsoft.com,vice president of sales"

CSV Format:

firstName,lastName,email,jobTitle,personalPhone
john,smith,john.smith@apple.com,ceo,123-456-7890
mary,obrien,mary.obrien@microsoft.com,vice president of sales,5551234567

Supported column names (case-insensitive): Same as XLSX format above. The tool automatically detects column names with spaces, underscores, or camelCase (e.g., "First Name", "first_name", "firstName" all work).

Important: You must provide leads in exactly one of these three formats (leads, leadsXlsx, or leadsCsv). Providing multiple formats will result in an error.

openaiApiKey - Your OpenAI API Key

Type: String
Description: Your OpenAI API key (starts with 'sk-'). Required for AI formatting and enrichment.

Example: "sk-proj-xxxxxxxxxxxxx"

How to get one: Sign up at OpenAI and generate an API key from your account settings.

Optional Inputs

removeBlanks - Remove Empty Leads

Type: Boolean
Default: false
Description: Automatically remove leads that have no data in any field.

Example:

"removeBlanks": true

Use case: Enable this when importing data from multiple sources to clean up incomplete entries automatically.

removeDuplicates - Remove Duplicate Leads

Type: Boolean
Default: false
Description: Remove duplicate leads based on email address.

Example:

"removeDuplicates": true

Use case: Essential when merging lead lists from multiple sources to ensure each contact appears only once.

formatJobTitle - Format Job Titles

Type: Boolean
Default: true
Description: Format job titles with proper capitalization (e.g., "ceo" → "CEO", "vice president of sales" → "Vice President of Sales").

Example:

"formatJobTitle": true

Result: "ceo" becomes "CEO", "vice president of sales" becomes "Vice President of Sales".

formatCompanyName - Format Company Names

Type: Boolean
Default: true
Description: Format company names with proper capitalization and business suffixes (e.g., "apple inc" → "Apple Inc.").

Example:

"formatCompanyName": true

Result: "apple inc" becomes "Apple Inc.", "microsoft" becomes "Microsoft".

formatPersonalPhone - Format Personal Phone Numbers

Type: Boolean
Default: true
Description: Format personal phone numbers to standard format (E.164 or local format).

Example:

"formatPersonalPhone": true

Result: "123-456-7890" becomes "+11234567890" (E.164 format), "1234567890" becomes "+11234567890" (E.164 format). The exact format depends on the model's interpretation, but it will be standardized.

formatHomePhone - Format Home Phone Numbers

Type: Boolean
Default: true
Description: Format home phone numbers to standard format (E.164 or local format).

Example:

"formatHomePhone": true

Result: "(555) 123-4567" becomes "+15551234567" (E.164 format), "5551234567" becomes "+15551234567" (E.164 format). The exact format depends on the model's interpretation, but it will be standardized.

generateCompanyDescription - Generate Company Descriptions

Type: Boolean
Default: false
Description: Generate a brief company description based on company name and available information.

Example:

"generateCompanyDescription": true

Output: Adds a companyDescription field with AI-generated description like "Technology company specializing in software development and cloud services."

generatePersonalizedLine - Generate Personalized Lines

Type: Boolean
Default: false
Description: Generate a personalized opening line for cold email based on lead information.

Example:

"generatePersonalizedLine": true

Output: Adds a personalizedLine field with AI-generated content like "Hi John, I noticed you're the CEO at Apple Inc. - I'd love to discuss how we can help scale your operations."

pullCaseStudy - Generate Case Studies

Type: Boolean
Default: false
Description: Generate a brief case study or success story relevant to the company/industry.

Example:

"pullCaseStudy": true

Output: Adds a caseStudy field with AI-generated case study relevant to the company's industry.

fieldConfigurations - Per-Field Custom Configuration

Type: Object
Default: {}
Description: Configure custom prompts and output column names for each field. Each field can have:

  • enabled (boolean) - Set to false to disable processing for this field
  • customPrompt (string, max 100 characters) - Custom instruction for how to process this field
  • outputColumn (string) - Custom name for the output column

Example:

"fieldConfigurations": {
"companyDescription": {
"customPrompt": "Based on company information identify industry make it less than 3 word, do not include dashes, do not include parenthesis",
"outputColumn": "Company Description"
},
"firstName": {
"customPrompt": "Convert to uppercase only, no other formatting",
"outputColumn": "First Name"
},
"lastName": {
"customPrompt": "Keep as provided, do not format"
},
"personalPhone": {
"customPrompt": "Format as E.164 international format with country code, no spaces or dashes",
"outputColumn": "Cell Phone"
},
"homePhone": {
"enabled": false
},
"jobTitle": {
"enabled": false
}
}

Use cases:

  • Custom formatting rules: Specify exact formatting requirements per field (e.g., "Convert to uppercase only", "Keep as provided, do not format")
  • Industry-specific processing: Custom prompts for domain-specific formatting needs
  • Output mapping: Map fields to your CRM column names (e.g., "Company Description" instead of "companyDescription", "Cell Phone" instead of "personalPhone")
  • Field disabling: Skip processing for fields you don't need formatted (set enabled: false)

How it works:

  • Custom prompts override default formatting instructions for that field
  • When both default and custom output columns are specified, both are included in the output (e.g., "personalPhone" and "Cell Phone" both appear)
  • Disabled fields (enabled: false) are skipped during processing but original values are preserved
  • Custom prompts are applied per-field, so you can have different formatting rules for different fields

Important:

  • Custom prompts are limited to 100 characters. If you exceed this limit, the prompt will be automatically truncated with a warning.
  • Custom prompts completely override default formatting, so be specific about what you want

model - OpenAI Model Selection

Type: String
Default: "gpt-4o-mini"
Options:

  • "gpt-4o-mini" - Recommended for cost-effectiveness (fastest, cheapest)
  • "gpt-4o" - Higher accuracy for complex cases
  • "gpt-4" - Maximum accuracy
  • "gpt-3.5-turbo" - Legacy option

Example:

"model": "gpt-4o-mini"

Cost comparison: gpt-4o-mini is approximately 10x cheaper than gpt-4o while maintaining excellent formatting quality for most use cases.

temperature - AI Creativity Setting

Type: String or Number
Default: "0.3"
Range: 0-2
Description: Controls AI creativity. Lower values (0.1-0.3) are more deterministic and consistent. Higher values (0.7-1.0) are more creative but less consistent.

Example:

"temperature": "0.3"

Recommendation: Use 0.3 for consistent, professional formatting. Use higher values only if you want more creative generated content (company descriptions, personalized lines).

Complete Input Example

Here's a complete example with all options configured:

{
"leads": [
{
"email": "john.smith@apple.com",
"jobTitle": "ceo",
"personalPhone": "123-456-7890"
},
{
"firstName": "mary",
"lastName": "obrien",
"email": "mary.obrien@microsoft.com",
"jobTitle": "vice president of sales",
"country": "usa",
"personalPhone": "5551234567"
},
{
"email": "david@google.com",
"companyName": "google",
"jobTitle": "cto",
"homePhone": "(555) 987-6543"
}
],
"openaiApiKey": "sk-proj-xxxxxxxxxxxxx",
"removeBlanks": true,
"removeDuplicates": true,
"formatJobTitle": true,
"formatCompanyName": true,
"formatPersonalPhone": true,
"formatHomePhone": true,
"generateCompanyDescription": true,
"generatePersonalizedLine": true,
"pullCaseStudy": false,
"fieldConfigurations": {
"companyDescription": {
"customPrompt": "Based on company information identify industry make it less than 3 word, do not include dashes, do not include parenthesis",
"outputColumn": "Company Description"
},
"firstName": {
"customPrompt": "Capitalize first letter only, handle prefixes like Mc, O', Van correctly"
}
},
"model": "gpt-4o-mini",
"temperature": "0.3"
}

Output

After the Actor finishes its run, you'll get a dataset with formatted leads. Each lead includes formatted fields, enriched data, and generated content (if enabled). Fields are formatted in-place—there are no separate "formatted*" fields.

Output Fields

  • firstName - Formatted first name (extracted from email if missing)
  • lastName - Formatted last name (extracted from email if missing)
  • companyName - Formatted company name (extracted from domain if missing)
  • email - Original email address
  • jobTitle - Formatted job title
  • country - Formatted country name (extracted if missing)
  • website - Full website URL (extracted from domain if missing)
  • personalPhone - Formatted personal phone number (standardized format)
  • homePhone - Formatted home phone number (standardized format)
  • companyDescription - AI-generated company description (if generateCompanyDescription is enabled)
  • personalizedLine - AI-generated personalized line (if generatePersonalizedLine is enabled)
  • caseStudy - AI-generated case study (if pullCaseStudy is enabled)
  • errors - Error information if any field processing failed

Example Output

Here's an example of formatted lead data:

{
"firstName": "John",
"lastName": "Smith",
"companyName": "Apple Inc.",
"email": "john.smith@apple.com",
"jobTitle": "CEO",
"country": "United States",
"website": "https://www.apple.com",
"personalPhone": "+11234567890",
"homePhone": "+15551234567",
"companyDescription": "Technology Consumer Electronics",
"personalizedLine": "Hi John, I noticed you're the CEO at Apple Inc. - I'd love to discuss how we can help scale your operations.",
"Company Description": "Technology Consumer Electronics"
}

Note:

  • When custom output columns are specified, the output includes both the default field name and the custom column name. For example, if personalPhone has outputColumn: "Cell Phone", you'll see both "personalPhone": "+11234567890" and "Cell Phone": "+11234567890" in the output.
  • Phone numbers are typically formatted to E.164 international format (e.g., +11234567890) when custom prompts request this format, or standard local format when using default formatting.
  • Custom prompts completely override default formatting behavior for that specific field.

What You Get: Professionally formatted names, company names, and job titles ready for CRM import and email campaigns. Plus AI-generated personalized content for effective outreach.
Download Options: CSV, Excel, or JSON formats for easy integration with your business tools

Why Choose the Lead Formatter?

  • AI-Powered Accuracy: Uses OpenAI's advanced language models for intelligent formatting
  • Cost-Effective Processing: Exactly 1 API call per lead with enrichment and formatting combined
  • Time Savings: Process hundreds of leads in minutes instead of hours
  • Consistent Results: Standardized formatting rules ensure professional output
  • Data Enrichment: Automatically extract missing information from email addresses
  • Generated Content: Create personalized lines and company descriptions for outreach
  • Flexible Configuration: Custom prompts and output column mapping for your workflow
  • Data Cleaning: Built-in blank removal and duplicate detection
  • Error Reporting: Comprehensive error tracking for failed formatting attempts
  • Custom Output Columns: Map fields to your CRM column names

Time Savings: Save 4-6 hours per week compared to manual lead data cleaning
Efficiency: Process 100 leads in under 5 minutes vs. 2-3 hours manually
Cost Efficiency: Approximately $0.01-0.05 per lead with gpt-4o-mini model

How to Use

  1. Sign Up: Create a free account w/ $5 credit (takes 2 minutes)
  2. Get OpenAI API Key: Sign up at OpenAI and get your API key
  3. Find the Tool: Visit the Lead Formatter page on Apify
  4. Set Input: Add your leads array and OpenAI API key, configure optional settings as needed
  5. Run It: Click "Start" and let AI format your leads
  6. Download Data: Get your formatted results in the "Dataset" tab as CSV, Excel, or JSON

Total Time: 5 minutes setup, 1-5 minutes for processing (depending on lead count)
No Technical Skills Required: Everything is point-and-click

Business Use Cases

Sales Teams:

  • Clean and format lead lists before CRM import
  • Standardize contact data for cold email campaigns
  • Generate personalized opening lines for outreach
  • Prepare prospect lists with enriched data
  • Improve email deliverability with properly formatted names

Marketing Professionals:

  • Format lead data from multiple sources
  • Standardize company names for marketing databases
  • Generate company descriptions for segmentation
  • Prepare lead lists for email marketing campaigns
  • Clean data from web forms and landing pages

CRM Administrators:

  • Bulk format existing CRM data
  • Standardize contact information across databases
  • Map fields to custom column names for CRM import
  • Prepare data for CRM migration
  • Improve data quality and consistency

Data Analysts:

  • Clean and standardize lead datasets
  • Enrich incomplete data with AI extraction
  • Generate metadata (descriptions, personalized content) for analysis
  • Prepare data for analysis and reporting
  • Format data from multiple sources

Using Lead Formatter with the Apify API

For advanced users who want to automate this process, you can control the formatter programmatically with the Apify API. This allows you to schedule regular data cleaning and integrate with your existing business tools.

  • Node.js: Install the apify-client NPM package
  • Python: Use the apify-client PyPI package
  • See the Apify API reference for full details

Frequently Asked Questions

Q: How does it work?
A: Lead Formatter uses OpenAI's language models to intelligently format names, company names, and job titles. Simply provide your leads and OpenAI API key, and the tool handles the rest. It extracts missing information and formats all fields in one efficient API call per lead (1 API call per lead).

Q: How accurate is the formatting?
A: The tool uses advanced AI models with 99%+ accuracy for standard formatting scenarios. Complex cases are handled intelligently with proper capitalization rules. Custom prompts allow you to fine-tune formatting for your specific needs.

Q: What's the cost?
A: You pay for OpenAI API usage (very affordable with gpt-4o-mini) plus Apify platform fees. Processing 100 leads typically costs under $0.50 total with gpt-4o-mini. The tool uses exactly 1 API call per lead, ensuring maximum cost efficiency.

Q: Can I customize the formatting?
A: Yes! You can use custom prompts per field (max 100 characters) to override default formatting. For example, you can set firstName to "Convert to uppercase only" or personalPhone to "Format as E.164 international format". You can also configure output column names (e.g., map personalPhone to "Cell Phone"), enable/disable specific fields, and choose which features to use (formatting, enrichment, content generation).

Q: How does data enrichment work?
A: The tool automatically extracts missing information from available data. For example, if you have an email like "john.smith@apple.com" but no name, it extracts "John" and "Smith" from the email. If company name is missing, it extracts it from the domain.

Q: What if formatting fails for some leads?
A: The tool includes comprehensive error reporting. Failed leads are marked with error details in the errors field, and you can review and retry them separately. The tool continues processing other leads even if some fail.

Q: Can I use custom output column names?
A: Yes! Use the fieldConfigurations option to map fields to custom column names. For example, map companyDescription to "Company Description" or personalPhone to "Cell Phone" for your CRM import. When you specify a custom output column, both the default field name and the custom column name are included in the output for maximum compatibility.

Q: How many API calls are made per lead?
A: The tool makes exactly 1 API call per lead, which enriches missing data and formats all fields in a single call. This ensures maximum cost efficiency while maintaining high quality results.

Q: Can I upload Excel or CSV files?
A: Yes! You can provide leads in three formats:

  • JSON array (leads field) - Direct array or JSON string
  • Excel XLSX (leadsXlsx field) - Base64-encoded XLSX file
  • CSV (leadsCsv field) - CSV content as string

You can only use one format at a time. The tool automatically detects column names (case-insensitive) and maps them to the correct fields. Supported column name variations include "First Name", "firstname", "firstName", etc.

Q: How do I convert my Excel file to base64?
A: You can use online tools like base64encode.org or base64.guru. Simply upload your XLSX file and copy the base64 string. Alternatively, you can use command-line tools: base64 -i yourfile.xlsx on Mac/Linux or PowerShell's [Convert]::ToBase64String([IO.File]::ReadAllBytes("yourfile.xlsx")) on Windows.

Q: Do I need an OpenAI account?
A: Yes, you need an OpenAI API key. Sign up at OpenAI and get your API key (starts with 'sk-').

Q: Is my data secure?
A: Absolutely. All data is encrypted in transit and at rest. We never share your data with third parties, and OpenAI processes data according to their privacy policy.

Looking for more data collection tools? Check out these related actors:

ActorDescriptionLink
FINRA BrokerCheck ScraperCollects financial broker and advisor informationhttps://apify.com/parseforge/finra-brokercheck-scraper
Hubspot Marketplace ScraperExtracts business app data from HubSpot marketplacehttps://apify.com/parseforge/hubspot-marketplace-scraper
BizQuest ScraperCollects business listings from BizQuest marketplacehttps://apify.com/parseforge/bizquest-scraper
DealStream ScraperExtracts business acquisition data from DealStreamhttps://apify.com/parseforge/dealstream-scraper
PR Newswire ScraperCollects press release and news contenthttps://apify.com/parseforge/pr-newswire-scraper

Pro Tip: 💡 Browse our complete collection of data collection actors to find the perfect tool for your business needs.

Integrate Lead Formatter with any app and automate your workflow

Last but not least, Lead Formatter can be connected with almost any cloud service or web app thanks to integrations on the Apify platform.

These includes:

Alternatively, you can use webhooks to carry out an action whenever an event occurs, e.g. get a notification whenever Lead Formatter successfully finishes a run.

Need Help? Our support team is here to help you get the most out of this tool.


⚠️ Disclaimer: This Actor is an independent tool and is not affiliated with, endorsed by, or sponsored by OpenAI or any of its subsidiaries. All trademarks mentioned are the property of their respective owners.