Connect Smartlead to ChatGPT: Manage outreach and campaign analytics
Learn how to connect Smartlead to ChatGPT using a managed MCP server. Automate cold outreach workflows, track campaign analytics, and handle inbox replies.
If you need to connect Smartlead to ChatGPT to automate cold outreach workflows, manage email warmup health, or orchestrate inbox replies, you need a Model Context Protocol (MCP) server. This server acts as the translation layer between ChatGPT's tool calls and Smartlead's REST APIs. You can either build and maintain this infrastructure yourself, or use a managed integration platform like Truto to dynamically generate a secure, authenticated MCP server URL.
If your team uses Claude, check out our guide on connecting Smartlead to Claude or explore our broader architectural overview on connecting Smartlead to AI Agents.
Giving a Large Language Model (LLM) read and write access to a complex sales engagement platform like Smartlead is a massive engineering challenge. You have to handle global versus campaign-specific lead states, map dynamic analytics boundaries, and safely parse master inbox threads. Every time the upstream API changes, your custom server code must be updated, redeployed, and tested.
This guide breaks down exactly how to use Truto to generate a secure, managed MCP server for Smartlead, connect it natively to ChatGPT, and execute complex outreach workflows using natural language.
Stop writing boilerplate API integration code. Let Truto generate secure, managed MCP servers for your AI agents in seconds. :::
The Engineering Reality of the Smartlead API
A custom MCP server is a self-hosted integration layer that translates an LLM's tool calls into REST API requests. While the open MCP standard provides a predictable way for models to discover tools, implementing it against vendor APIs is painful. If you decide to build a custom MCP server for Smartlead, you own the entire API lifecycle.
Here are the specific integration challenges that break standard assumptions when working with the Smartlead API:
Global vs Campaign-Mapped Leads
Smartlead decouples the core contact record from the campaign routing logic. A lead exists globally in a workspace but requires a specific email_lead_map_id when referencing their state inside a given sequence. If your LLM tries to update a lead's status to "paused" using their global lead_id, the API request will fail. Your custom MCP server needs a translation layer that automatically maps global identities to campaign-specific execution contexts, or you risk the LLM hallucinating operations on the wrong identifier.
Mutable Status Validation Constraints
The Smartlead API is highly specific about campaign status transitions. For example, to activate a drafted campaign, you must pass the exact string "START" - passing "ACTIVE" will fail validation. Furthermore, if an LLM invokes a tool to permanently stop a campaign by setting it to "STOPPED", this action is irreversible. If you don't explicitly document these state machine constraints in the JSON-RPC tool definitions, the LLM will attempt invalid transitions and break campaign logic.
Rate Limits and 429 Errors
Cold email infrastructure is heavily guarded against abuse. When executing bulk analytics queries or batch lead injections, you will hit Smartlead's rate limits. Truto's architectural approach is strict: Truto does not retry, throttle, or apply backoff on rate limit errors. When the upstream Smartlead API returns an HTTP 429, Truto passes that error directly to the caller.
However, Truto normalizes the upstream rate limit information into standardized headers (ratelimit-limit, ratelimit-remaining, ratelimit-reset) according to the IETF specification. This means your MCP client (the ChatGPT application or your local orchestration layer) is fully responsible for reading these headers and implementing exponential backoff. If you build this from scratch, you must write custom logic to parse vendor-specific limit headers and translate them for the LLM.
Analytics Aggregation and Date Bucketing
When pulling campaign statistics, Smartlead analytics endpoints do not return purely additive unique metrics. If an LLM requests unique open rates across a 7-day period by querying day-by-day and summing the results, the data will be completely wrong (a lead opening an email on Monday and Tuesday counts as one unique open for the week, but two if summed daily). Your tool definitions must force the LLM to query the exact date range in a single call to ensure the integration returns accurate deduplicated metrics.
The Managed MCP Approach
Instead of forcing your engineering team to build a custom JSON-RPC router, map OpenAPI schemas to MCP tool formats, and handle token exchange, Truto handles this automatically.
When a customer authenticates their Smartlead account, Truto's dynamic generation engine derives a set of MCP tools directly from the integration's documented API endpoints. The tools are served over a secure /mcp/:token endpoint.
You can generate this server via the Truto UI or programmatically via the API.
Method 1: Creating the MCP Server via the Truto UI
If you are testing workflows locally or configuring a one-off connection for your internal team, the dashboard is the fastest route:
- Navigate to the integrated account page for the specific Smartlead connection.
- Click the MCP Servers tab.
- Click Create MCP Server.
- Select your desired configuration. You can filter the server to only allow
readoperations if you want ChatGPT to act strictly as an analytics dashboard without the ability to send emails. - Copy the generated MCP server URL (e.g.,
https://api.truto.one/mcp/abc123def456).
Method 2: Creating the MCP Server via the API
For production applications, you will want to provision MCP servers dynamically when a user connects their Smartlead account. You do this by calling the Truto Token Management API.
// POST /integrated-account/:id/mcp
const response = await fetch(`https://api.truto.one/integrated-account/${smartleadAccountId}/mcp`, {
method: 'POST',
headers: {
'Authorization': `Bearer ${TRUTO_API_KEY}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: "ChatGPT Outreach Manager",
config: {
methods: ["read", "write"], // Define permitted operations
tags: ["campaigns", "leads", "analytics"] // Filter exposed resources
},
expires_at: "2026-12-31T23:59:59Z" // Optional automatic revocation
})
});
const mcpServer = await response.json();
console.log(mcpServer.url); // Use this URL in ChatGPTThis API call generates a cryptographic token tied specifically to this Smartlead instance. The token handles the underlying OAuth logic, meaning the URL alone is enough to authenticate requests from ChatGPT.
Connecting the MCP Server to ChatGPT
Once you have the Truto MCP URL, you need to expose it to the LLM. You can do this natively within the ChatGPT interface for individual usage, or via configuration files for custom agent deployments.
Via the ChatGPT UI
If you are using an Enterprise, Plus, Pro, or Education account, ChatGPT natively supports remote MCP connections via its Developer Mode.
- Open ChatGPT and navigate to Settings -> Apps -> Advanced settings.
- Toggle Developer mode to ON.
- Under the MCP servers / Custom connectors section, click to add a new server.
- Name:
Smartlead (Truto) - Server URL: Paste your generated
https://api.truto.one/mcp/...URL. - Save the configuration.
ChatGPT will immediately ping the /initialize endpoint, perform the handshake, and call tools/list. The Smartlead operations will now appear as callable functions within your prompt window.
Via Manual Configuration File (Agent Deployments)
If you are orchestrating ChatGPT models via an external framework or using a desktop client that supports standard MCP JSON configuration (like Claude Desktop or Cursor), you can connect the server using the SSE transport command.
{
"mcpServers": {
"smartlead_truto": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-sse",
"https://api.truto.one/mcp/YOUR_SECURE_TOKEN"
]
}
}
}Hero Tools for Smartlead
Truto exposes dozens of Smartlead API endpoints as formatted tools. Here are the most powerful operations for automating sales workflows through ChatGPT.
1. List All Campaigns (list_all_smartlead_campaigns)
Retrieves the core roster of email campaigns in the workspace, ordered by newest first. This is the foundational tool the LLM uses to discover campaign_id values required for all subsequent operations.
"Fetch a list of all active Smartlead campaigns. Give me a table showing the campaign names, their current status, and the date they were created."
2. Campaign Top-Level Analytics (smartlead_campaigns_top_level_analytics)
Fetches aggregate engagement and deliverability metrics for a specific campaign. It returns total sent, opened, clicked, replied, and specific calculation rates (open rate, bounce rate, etc.).
"Get the top-level analytics for the 'Enterprise Q3 Outreach' campaign. I need to know the current reply rate and if the bounce rate has crossed our 3% safety threshold."
3. Add Leads to Campaign (create_a_smartlead_campaign_lead)
Injects a list of leads directly into a Smartlead campaign. This handles bulk data ingestion. The LLM processes unstructured text or CSV data provided in the prompt, formats it into the required JSON array, and executes the tool.
"I have a list of five new enterprise prospects. Parse their names, company names, and emails from the text below, and inject them into the 'Outbound Tier 1' campaign."
4. Fetch Inbox Messages (smartlead_inbox_get_messages)
Retrieves lead replies across campaigns from the Smartlead master inbox. This tool supports advanced filtering by campaign, email account, tags, or lead categories, allowing the LLM to process and triage incoming responses.
"Check the master inbox for any unread messages from the last 24 hours. Summarize the sentiment of each reply and flag any that look like positive meeting requests."
5. Reply to Lead (smartlead_campaign_leads_reply_to_lead)
Sends a direct reply to a lead from within the sequence context, maintaining the existing email thread. The LLM can use this to handle positive responses, schedule meetings, or handle objections autonomously.
"Draft a response to John Doe's latest email. Acknowledge his request for a demo, offer times for next Tuesday or Wednesday, and send the reply on the existing thread."
6. Suspend Email Account (smartlead_email_accounts_suspend)
Temporarily pauses a sending email account to protect deliverability reputation without deleting the account configuration or stopping campaign workflows permanently.
"Review our sending domains. If any account has a bounce rate over 5%, suspend that specific email account immediately to protect domain health."
For the complete inventory of available tools, including sequence generation, webhook configuration, and client management, view the Smartlead integration page.
Workflows in Action
When you connect Smartlead to ChatGPT via Truto, you move from basic chat interactions to autonomous agentic workflows. Here is how complex tasks execute in real-time.
Scenario 1: Autonomous Inbox Triage and Reply Management
Instead of a sales development rep manually reading 50 replies a day to categorize them, you can instruct ChatGPT to handle the entire triage loop.
"Read the unread messages in the Smartlead master inbox. For any reply that is definitively asking to be removed from the list, unsubscribe the lead. For any positive reply asking for a meeting, draft a polite response offering times for next week, send it on the thread, and update the lead category to 'Interested'."
Step-by-step execution:
- The agent calls
smartlead_inbox_get_messagesto fetch the recent unread replies. - It processes the text of each email to determine sentiment (Negative/Opt-out vs Positive/Meeting).
- For negative replies, it calls
smartlead_campaign_leads_unsubscribe_lead. - For positive replies, it calls
smartlead_campaign_leads_reply_to_leadwith the generated calendar text. - It finalizes the positive workflow by calling
smartlead_inbox_update_categoryto visually tag the lead in the UI.
sequenceDiagram
participant User as ChatGPT (Agent)
participant MCP as Truto MCP Server
participant Upstream as Smartlead API
User->>MCP: Call smartlead_inbox_get_messages
MCP->>Upstream: GET /api/v1/inbox/messages
Upstream-->>MCP: Returns threads & message payloads
MCP-->>User: Returns JSON result
Note over User: LLM analyzes sentiment<br>Detects positive reply
User->>MCP: Call smartlead_campaign_leads_reply_to_lead
MCP->>Upstream: POST /api/v1/campaigns/{id}/reply
Upstream-->>MCP: Thread updated
MCP-->>User: Success confirmation
User->>MCP: Call smartlead_inbox_update_category
MCP->>Upstream: POST /api/v1/inbox/category
Upstream-->>MCP: Lead categorized
MCP-->>User: Success confirmationScenario 2: Campaign Health Monitoring and Automatic Halts
Protecting domain reputation is critical in cold outreach. If a sequence has a broken personalization tag or is hitting spam traps, the LLM can monitor and intervene.
"Analyze the top-level analytics for all active outbound campaigns. If any campaign has a bounce rate higher than 4% or an unsubscribe rate higher than 6%, pause the campaign immediately and summarize what was stopped."
Step-by-step execution:
- The agent calls
list_all_smartlead_campaignsto get the roster of active campaigns. - It iterates through the list, calling
smartlead_campaigns_top_level_analyticsfor eachcampaign_id. - The LLM evaluates the returned metrics against the instructed threshold logic.
- If a campaign violates the safety threshold, it calls
smartlead_campaigns_update_campaign_statuswith the status parameter"PAUSED". - The LLM generates a text summary for the user detailing the actions taken to protect the domains.
Security and Access Control
Exposing an outbound email infrastructure to an LLM requires strict security boundaries. Truto's MCP servers provide multiple layers of configuration to limit the blast radius of AI actions.
- Method Filtering (
config.methods): You can restrict the MCP server to only allow"read"operations. The LLM will be able to fetch analytics and read inboxes, but tools likecreate_a_smartlead_campaignorsmartlead_campaign_leads_reply_to_leadwill be entirely stripped from the server. - Tag Filtering (
config.tags): You can scope the server to only expose specific API domains. By setting tags to["analytics"], the LLM won't even know that lead injection tools exist. - Additional Authentication (
require_api_token_auth): By default, the cryptographically secure MCP URL is sufficient to connect. For high-security environments, you can enable this flag, requiring the client to pass an active Truto user API token in theAuthorizationheader to execute calls. - Ephemeral Servers (
expires_at): When building temporary agents or granting contractor access, you can set an ISO datetime for the server to auto-destruct. The underlying Cloudflare KV records and Durable Object alarms will wipe the token automatically at the specified time.
Stop Building Point-to-Point Bots
Building a custom integration between ChatGPT and Smartlead requires months of engineering to handle rate limits, schema parsing, and OAuth lifecycles. Every time Smartlead updates its API, your internal bot breaks.
By leveraging Truto's auto-generated MCP servers, you shift the burden of API maintenance entirely. Your AI agents get real-time, authenticated access to read campaign data, inject leads, and orchestrate inbox replies using an architecture designed for scale.
FAQ
- Does Truto automatically retry when Smartlead hits its API rate limit?
- No. Truto explicitly does not retry, throttle, or apply backoff logic on rate limit errors. If the Smartlead API returns a 429 Too Many Requests, Truto passes the error back to the MCP client and normalizes the rate limit information into standard IETF headers (ratelimit-limit, ratelimit-remaining, ratelimit-reset). Your application is responsible for backoff.
- Can I prevent ChatGPT from accidentally sending cold emails?
- Yes. When generating the MCP server URL in Truto, you can pass a configuration filter to restrict the server to 'read' methods only. This completely strips all write and custom execution tools (like replying or injecting leads) from the server before ChatGPT can even see them.
- Do I have to write the JSON schemas for the Smartlead tools?
- No. Truto dynamically generates the JSON-RPC tool definitions, complete with query schemas, body parameters, and human-readable descriptions directly from the integration's documented resources. The AI model discovers them natively.
- How do I authenticate the MCP connection in ChatGPT?
- The MCP server URL generated by Truto contains a secure cryptographic token that handles the underlying tenant isolation and integration mapping. You simply paste the URL into ChatGPT's Custom Connector settings, and it connects instantly without needing raw API keys.