Connect Iterable to ChatGPT: Manage Campaigns and User Profiles
Learn how to connect Iterable to ChatGPT using an auto-generated MCP server to automate campaigns, track user events, and orchestrate marketing workflows.
If you want to connect Iterable to ChatGPT so your AI agents can orchestrate marketing campaigns, track custom events, update user profiles, and extract campaign analytics, you need a Model Context Protocol (MCP) server. If your team uses Claude, check out our guide on connecting Iterable to Claude or explore our broader architectural overview on connecting Iterable to AI Agents.
Giving a Large Language Model (LLM) read and write access to a highly dynamic, event-driven marketing automation platform like Iterable is a serious engineering challenge. You either spend weeks building, hosting, and maintaining a custom MCP server to translate LLM JSON arguments into Iterable's specific payload structures, or you use a managed infrastructure layer.
This guide breaks down exactly how to use Truto to generate a secure, authenticated MCP server for Iterable, connect it natively to ChatGPT, and execute complex workflows - including full user lifecycle management and campaign orchestration - using natural language.
The Engineering Reality of the Iterable API
A custom MCP server is a self-hosted integration layer. While the open MCP standard provides a predictable way for models to discover tools, implementing it against Iterable's API surface is exceptionally painful.
If you decide to build a custom MCP server for Iterable, you own the entire API lifecycle. Here are the specific integration challenges that break standard CRUD assumptions when working with Iterable:
The Dual-Identity Conundrum (userId vs email)
Iterable projects can be email-based, userId-based, or hybrid. Almost every major endpoint in the Iterable API requires you to specify the user identity correctly. If an LLM attempts to update a user profile and guesses the wrong identifier type, the API will reject the payload or, worse, create an orphaned shadow profile. Your MCP server must intelligently parse the LLM's intent, map it to the correct project identity schema, and format the request body with either email or userId (but rarely both). Building static tool definitions for this dynamic identity model requires extensive schema manipulation.
Schema Drift and the 1,000 Field Soft Limit
Iterable's data model is intentionally schemaless at the user and event level. A user object can hold up to 1,000 unique custom fields. For events of the same name, identically named data fields must be of the exact same type across all records. When an LLM calls a tool to track a custom event, it might hallucinate a new field or pass a string instead of an integer. Because Iterable rigidly enforces type consistency across identically named fields, a hallucinated LLM payload can break event tracking pipelines. Your MCP server needs strict JSON Schema definitions that accurately reflect the current state of the Iterable project, meaning the tools must be generated dynamically from real-time integration data.
Asynchronous Bulk Endpoints vs Synchronous Operations
Iterable relies heavily on asynchronous processing for bulk operations (like updating users or tracking bulk events) but uses synchronous responses for single-record actions. When an LLM wants to update a segment of users, it will attempt to stream a list of commands. A naive MCP server will hit the synchronous single-update endpoint in a loop, instantly exhausting the rate limit. A production-grade MCP server must abstract these routing decisions, batching LLM arguments into asynchronous bulk payloads when appropriate and handling the deferred job status checks.
Step 1: Generate an Iterable MCP Server
Truto abstracts the complexity of the Iterable API by dynamically generating MCP tools based on the actual capabilities of the connected account. You can generate a secure MCP server URL in seconds via the Truto UI or programmatically via the API.
Method A: Via the Truto UI
- Log into your Truto dashboard and navigate to the Integrated Accounts section.
- Select your connected Iterable account (or create a new connection by passing through the OAuth flow or API key setup).
- Click on the MCP Servers tab for that specific account.
- Click Create MCP Server.
- Configure the server settings: assign a human-readable name, select the HTTP methods you want to allow (e.g.,
readandwrite), and specify any resource tags to limit the LLM's scope. - Click Create and immediately copy the generated URL (it will look like
https://api.truto.one/mcp/<token>). Treat this URL as a sensitive credential.
Method B: Via the REST API
For platform engineers building multi-tenant AI products, you can generate MCP servers programmatically for any connected customer. Send a POST request to the Truto API scoping the server to the specific integrated_account_id.
curl -X POST https://api.truto.one/integrated-account/$INTEGRATED_ACCOUNT_ID/mcp \
-H "Authorization: Bearer $TRUTO_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Iterable Marketing Agent (ChatGPT)",
"config": {
"methods": ["read", "write"],
"tags": ["campaigns", "users", "events", "metrics"]
}
}'The response will return a single, secure URL. This URL contains a cryptographic token that securely maps the endpoint back to the tenant's specific Iterable connection. No additional authentication headers are required by default.
{
"id": "mcp_srv_9x8y7z6w",
"name": "Iterable Marketing Agent (ChatGPT)",
"url": "https://api.truto.one/mcp/a1b2c3d4e5f6g7h8..."
}Step 2: Connect the MCP Server to ChatGPT
Once you have the Truto MCP URL, you can connect it directly to ChatGPT. The LLM will perform a handshake, discover the dynamically generated Iterable tools, and make them available in your chat sessions.
Method A: Via the ChatGPT UI (Custom Connectors)
If you are using ChatGPT Pro, Plus, Enterprise, Business, or Education, you can add the server directly through the interface.
- Open ChatGPT and navigate to Settings -> Apps -> Advanced settings.
- Toggle Developer mode to ON.
- Scroll to the MCP servers / Custom connectors section and click Add a new server.
- Give the connector a name (e.g., "Iterable Marketing").
- Paste the Truto MCP URL into the Server URL field.
- Click Save.
ChatGPT will immediately ping the endpoint, negotiate the JSON-RPC protocol, and ingest the tool schemas.
Method B: Via Manual Config (For CLI/Desktop Agents)
If you are using a local agent framework, Cursor, or an open-source MCP client, you can configure the server using standard Server-Sent Events (SSE) configurations. In your agent's mcp.json or config file, define the connection:
{
"mcpServers": {
"iterable_mcp": {
"command": "npx",
"args": [
"@modelcontextprotocol/server-sse",
"--url",
"https://api.truto.one/mcp/a1b2c3d4e5f6g7h8..."
]
}
}
}Hero Tools for Iterable
When ChatGPT connects to the Truto MCP server, it gains access to a curated list of tools derived from the Iterable API documentation. Here are the highest-leverage tools available for marketing automation workflows.
1. Update User Data (create_a_iterable_user)
This tool allows the agent to update user profile data or create a new user if one does not exist. It handles data merging intelligently, ensuring that missing fields are not deleted. This is critical for updating custom attributes or assigning users to new geographic regions.
"Update the Iterable profile for user with email 'sarah.connor@example.com'. Set her 'LTV' custom field to 1500 and her 'subscription_status' to 'premium'."
2. Track Custom Events (create_a_iterable_event)
AI agents use this tool to log discrete actions taken by users, which can in turn trigger complex Iterable journeys. The tool accepts a massive array of custom event data fields, pushing them asynchronously to the Iterable processing queue.
"Log a custom event called 'Plan Upgrade' for userId 'usr_9988' in Iterable. Include the data field 'new_tier' with the value 'Enterprise'."
3. Trigger a Campaign (create_a_iterable_campaign_trigger)
Allows the LLM to explicitly trigger an existing Iterable campaign for specific lists of users. This bypasses the need for the user to wait for a scheduled blast or a journey logic check, making it perfect for real-time AI remediation.
"Trigger the 'Churn Risk Intervention' campaign in Iterable for list ID 4591. Send the campaign immediately."
4. Fetch User Events (list_all_iterable_user_events)
This read-only tool allows the agent to pull a historical log of events for a specific user. This is an incredibly powerful context-gathering mechanism for the LLM. Before an agent drafts a response to a customer, it can check if the user opened the last three marketing emails.
"Fetch the recent event history from Iterable for the email 'john.doe@acme.com'. Did he open the 'Q3 Product Update' email?"
5. Send Transactional Email (create_a_iterable_email_send)
Agents can send highly specific, one-off emails to users bypassing standard blast mechanics. This tool accepts custom data fields that override user profile data for the duration of the template render, allowing the AI to inject heavily personalized, dynamically generated content into the message.
"Send the 'Support Follow-up' email template in Iterable to 'client@domain.com'. Override the 'resolution_notes' data field with the summary of our chat today."
6. Export Campaign Metrics (list_all_iterable_campaign_metrics)
Agents can extract deep analytics for single or multiple campaigns. The underlying Iterable API returns this data as a raw CSV string, but Truto's proxy layer automatically parses the CSV into structured JSON rows, making it trivial for the LLM to analyze open rates, click-through rates, and conversion metrics.
"Get the campaign metrics for campaign ID 10244 in Iterable. What was the unique open rate, and how many total clicks did we receive?"
To view the complete inventory of tools, detailed JSON schemas, and parameter requirements, visit the Iterable Integration Page.
Workflows in Action
Connecting ChatGPT to Iterable unlocks agentic workflows where the LLM is not just generating text, but orchestrating the actual marketing logic.
Scenario 1: The VIP Customer Reactivation Flow
A support agent is using ChatGPT to analyze a list of churned customers. The agent wants to investigate a specific high-value customer, update their profile with a new classification, and trigger a personalized win-back sequence.
"Look up the event history for 'alex@vipcorp.com' in Iterable. If they haven't logged any 'Login' events in the last 30 days, update their profile to set 'churn_risk' to 'High', and trigger the 'Executive Win-back' campaign (ID: 8821) for their user ID."
Step-by-Step Execution:
list_all_iterable_user_events: The agent fetches the event stream foralex@vipcorp.com.- The agent analyzes the JSON payload, verifying the timestamp of the last
Loginevent. create_a_iterable_user: Recognizing the gap in activity, the agent sends a payload updating thechurn_riskcustom field toHigh.create_a_iterable_campaign_trigger: The agent fires the trigger endpoint, executing the win-back campaign specifically for this user.
The human operator gets a single confirmation message: "Alex's event history showed no logins since October 12th. I have updated their profile risk to High and successfully triggered campaign 8821."
sequenceDiagram
participant User as User Prompt
participant Agent as ChatGPT Agent
participant MCP as Truto MCP Server
participant Iterable as Iterable API
User->>Agent: "Check alex@vipcorp.com events and trigger win-back if inactive"
Agent->>MCP: Call list_all_iterable_user_events (alex@vipcorp.com)
MCP->>Iterable: GET /api/events/alex@vipcorp.com
Iterable-->>MCP: Returns event history array
MCP-->>Agent: Returns structured JSON
Agent->>MCP: Call create_a_iterable_user (churn_risk: High)
MCP->>Iterable: POST /api/users/update
Iterable-->>MCP: Returns 200 OK
MCP-->>Agent: Confirm update
Agent->>MCP: Call create_a_iterable_campaign_trigger (campaignId: 8821)
MCP->>Iterable: POST /api/campaigns/trigger
Iterable-->>MCP: Returns 200 OK
MCP-->>Agent: Confirm trigger
Agent-->>User: "Profile updated and campaign triggered."Scenario 2: Campaign Performance Audit
A marketing director asks their AI assistant to audit the performance of yesterday's product announcement blast and summarize the results.
"Pull the metrics for our 'Fall Release' campaign (ID: 15400) from Iterable. Calculate the click-to-open rate and tell me if it performed above our 15% benchmark."
Step-by-Step Execution:
list_all_iterable_campaign_metrics: The agent requests the analytics for campaign15400.- Truto hits the Iterable API, receives the CSV payload, parses it into JSON rows, and returns the structured data to the LLM.
- The agent extracts the
uniqueOpensanduniqueClicksintegers from the dataset. - The agent performs the mathematical calculation (
uniqueClicks/uniqueOpens) in its context window. - The agent responds to the user: "The campaign had 45,000 unique opens and 8,100 unique clicks, resulting in an 18% click-to-open rate. This successfully exceeds your 15% benchmark."
Security and Access Control
Giving an AI agent access to a massive customer database like Iterable requires strict governance. Truto MCP servers provide multiple layers of security to ensure the LLM stays within its authorized bounds.
- Method Filtering: You can strictly limit the MCP server to read-only operations by setting
methods: ["read"]. This allows the agent to fetch user profiles and campaign metrics, but entirely removes its ability to alter data, send emails, or trigger campaigns. - Tag Filtering: By setting
tags: ["metrics", "events"], you can hide administrative tools (like webhook configurations or catalog management) from the LLM, reducing the risk of destructive hallucinations. - Time-to-Live (TTL): You can set an
expires_attimestamp when generating the server. Once the timestamp passes, the cryptographic token is purged from the edge network, instantly revoking the LLM's access to the Iterable API. - API Token Auth: For high-security environments, you can enable
require_api_token_auth: true. This requires the MCP client to pass a valid Truto API token in theAuthorizationheader, ensuring that simply possessing the URL is not enough to execute tools.
Handling Rate Limits and Errors
When deploying AI agents against the Iterable API, it is critical to understand how API limits are managed. The Iterable API enforces strict rate limits depending on the endpoint (e.g., the users/update endpoint has a different limit than the unpaginated metrics endpoints).
Truto does not retry, throttle, or apply backoff on rate limit errors.
When the upstream Iterable API returns an HTTP 429 (Too Many Requests), Truto immediately passes that exact error back to the calling agent. Truto normalizes the upstream rate limit data into standardized IETF headers (ratelimit-limit, ratelimit-remaining, ratelimit-reset).
The caller (your agent framework or ChatGPT) is entirely responsible for reading these headers, implementing the appropriate backoff strategy, and retrying the tool call. Do not assume the infrastructure will automatically absorb these spikes.
Build Agentic Marketing Workflows Today
Connecting Iterable to ChatGPT using an MCP server transforms the LLM from a passive text generator into an active marketing orchestrator. Instead of writing custom integration scripts, parsing complex CSV returns, and battling dynamic identity schemas, you can deploy a secure, managed toolset in minutes.
FAQ
- How does the MCP server handle Iterable's dual-identity system?
- The MCP tools expose the raw JSON schemas derived from the Iterable API. The LLM must intelligently decide whether to pass a `userId` or an `email` based on the user prompt and the project configuration. The tool schemas reflect the actual requirements of the underlying endpoints.
- Does Truto automatically handle Iterable's rate limits?
- No. Truto does not retry, throttle, or apply backoff on rate limit errors. When Iterable returns a 429, Truto passes it to the caller and normalizes the rate limit info into standard headers (ratelimit-limit, ratelimit-remaining, ratelimit-reset). The caller is responsible for retries.
- Can I limit the AI agent to only reading Iterable campaign metrics?
- Yes. When generating the MCP server via the Truto UI or API, you can set the `methods` configuration to only allow 'read' operations, and use tags to restrict the tools strictly to metrics and reporting endpoints.