Skip to content

Connect Dotdigital to ChatGPT: Automate Marketing & Manage Leads

Learn how to connect Dotdigital to ChatGPT using Truto's managed MCP server. Automate campaigns, manage leads, and orchestrate marketing data via AI.

Uday Gajavalli Uday Gajavalli · · 9 min read
Connect Dotdigital to ChatGPT: Automate Marketing & Manage Leads

If you need to connect Dotdigital to ChatGPT to automate email marketing workflows, orchestrate omnichannel campaigns, or manage high-volume lead data, you need a Model Context Protocol (MCP) server. This server acts as the critical translation layer between ChatGPT's function calls and Dotdigital's REST APIs. You can either spend weeks building, hosting, and maintaining this infrastructure yourself, or use a managed integration platform like Truto to dynamically generate a secure, authenticated MCP server URL in seconds.

If your team uses Claude, check out our guide on connecting Dotdigital to Claude or explore our broader architectural overview on connecting Dotdigital to AI Agents.

Giving a Large Language Model (LLM) read and write access to a complex marketing automation platform is an engineering minefield. You have to handle heavily nested JSON payloads, differentiate between contact-scoped and account-scoped data, and manage async job polling. Every time an endpoint shifts or a custom schema updates, custom server code breaks.

This guide breaks down exactly how to use Truto to generate a secure, managed MCP server for Dotdigital, connect it natively to ChatGPT, and execute complex lead and campaign 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 Dotdigital API

Building a custom MCP server is essentially building a self-hosted integration layer. While the open MCP standard provides a predictable JSON-RPC interface for ChatGPT to discover tools, mapping that standard against Dotdigital's highly specific API architecture is painful.

If you decide to build a custom MCP server for Dotdigital, you own the entire lifecycle of the API execution. Here are the specific integration challenges that make Dotdigital distinct from standard CRUD applications:

The Asynchronous Polling Trap

Dotdigital is built for scale, which means almost all bulk operations - contact imports, transaction data upserts, SMS campaign creation - are asynchronous. When an LLM triggers an import, the API does not return the data. It returns a 202 Accepted response with a job ID or an enrolment ID.

If you hand an LLM a raw async endpoint without orchestration, the model assumes the job is complete instantly and hallucinates the results. Your MCP server must explicitly guide the LLM to take the returned ID, wait, and use a secondary polling tool (like get_single_dotdigital_programs_enrolment_by_id) to verify the state before proceeding.

Insight Data Scoping and Schemas

Dotdigital's "Insight Data" (custom JSON records attached to contacts or accounts) is powerful but tricky to integrate. Collections exist at either the account level or the contact level. When an LLM wants to write a purchase event to a contact, your server must know exactly which collection_name to target, the identifier type (e.g., email or contact ID), and the exact payload schema that matches what Dotdigital expects. Mismanaging this namespace causes silent data drops or HTTP 400 errors that models struggle to recover from.

Strict Array Limits on Program Enrolments

When triggering a marketing journey (Program Enrolment), Dotdigital enforces strict payload constraints. You cannot dump 1,000 contacts into a single program enrolment call. The endpoint POST /programs/{id}/enrolments hard-caps contacts at 25 per request. If your MCP server doesn't enforce this chunking or guide the LLM via strict JSON Schema descriptions, the AI will routinely fail when attempting to process medium-to-large segments.

Dotdigital to ChatGPT Quickstart Guide

If you want the fastest path from a fresh Truto account to ChatGPT calling the Dotdigital API, follow these steps.

What you need:

  • A Truto account with API access.
  • Dotdigital API credentials (API user email and password).
  • A ChatGPT Pro, Plus, Business, Enterprise, or Education seat with Developer mode available.

Step 1: Connect Dotdigital to Truto

In the Truto dashboard, navigate to Integrated Accounts -> New Integrated Account, select Dotdigital, and provide your credentials. Truto handles the credential storage and authentication lifecycle automatically.

Step 2: Grab your Integrated Account ID

You will need the specific ID for this connected account. You can copy it directly from the Truto UI account detail page, or list it via the API:

curl https://api.truto.one/integrated-account \
  -H "Authorization: Bearer $TRUTO_API_TOKEN"

Step 3: Generate the Dotdigital MCP Server

Truto creates an MCP server scoped strictly to this specific Dotdigital instance. You can do this visually or programmatically.

Method A: Via the Truto UI

  1. Navigate to the integrated account page for your Dotdigital connection.
  2. Click the MCP Servers tab.
  3. Click Create MCP Server.
  4. Select your desired configuration (e.g., allow read and write methods, filter to campaigns tags).
  5. Copy the generated MCP server URL.

Method B: Via the API For programmatic setup, execute a POST call to Truto. You can filter by methods and tags to heavily constrain what ChatGPT is allowed to do:

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": "Dotdigital Marketing Assistant",
    "config": {
      "methods": ["read", "write", "custom"],
      "tags": ["campaigns", "contacts", "programs", "insight-data"]
    }
  }'

The response returns a url field (e.g., https://api.truto.one/mcp/<token>). This URL contains a hashed cryptographic token that handles routing and authentication automatically. Treat it like a secret.

Step 4: ## Connect the MCP Server to ChatGPT

Now, point ChatGPT to your Truto-hosted endpoint.

Method A: Via the ChatGPT UI

  1. Open ChatGPT and navigate to Settings -> Apps -> Advanced settings.
  2. Enable Developer mode.
  3. Under MCP servers / Custom connectors, click Add new server.
  4. Name it "Dotdigital" and paste the Truto MCP URL into the Server URL field.
  5. Save and connect.

Method B: Via manual config file If you are using a local agent setup or a framework that relies on the standard MCP configuration file format, define an SSE (Server-Sent Events) connection:

{
  "mcpServers": {
    "dotdigital_truto": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-sse",
        "--url",
        "https://api.truto.one/mcp/<token>"
      ]
    }
  }
}

Once connected, ChatGPT will execute the tools/list JSON-RPC handshake, and Truto will dynamically build the tool schemas based on the available Dotdigital resources.

Hero Tools for Dotdigital

Truto provides comprehensive coverage of the Dotdigital API, mapping everything from transactional email dispatch to SMS routing. Here are the highest-leverage operations your AI agent will use to automate marketing tasks.

1. Retrieve Campaign Engagement

Tool: list_all_dotdigital_campaign_activities

This tool is critical for lead scoring and engagement analysis. It returns comprehensive metrics for all contacts sent a specific campaign, including opens, clicks, forwards, and bounce statuses.

"Fetch the campaign activities for campaign ID 123456. Identify the contacts who clicked a link but have not replied, and format their emails into a list."

2. Trigger Email Campaign Sends

Tool: create_a_dotdigital_campaigns_send

Allows ChatGPT to deploy a prepared campaign to specified address books, segments, or a direct list of contacts. It handles scheduling, so the LLM can deploy immediately or queue it for a future date.

"Send campaign ID 98765 to the VIP Customers address book (ID 444). Schedule the send for tomorrow at 9 AM UTC."

3. Manage Contact Records

Tool: update_a_dotdigital_contact_by_id

Lead data degrades fast. This tool allows the LLM to completely replace a contact's standard fields and custom data fields based on an identifier type (like email) and the value.

"Update the contact record for j.doe@example.com. Change their status to active, and update the custom data field 'LEAD_SCORE' to 85."

4. Upsert Customer Insight Data

Tool: update_a_dotdigital_insight_data_contact_by_id

Insight Data is how Dotdigital stores rich, relational event data (like web purchases or webinar attendance). This tool allows ChatGPT to upsert (create or replace) records in contact-scoped collections.

"Add an entry to the 'WebinarAttendance' insight data collection for contact ID 555333. The payload should include the webinar title 'Q3 Product Launch' and attended duration of 45 minutes."

5. Dispatch SMS Campaigns

Tool: create_a_dotdigital_sms_campaign

Enables true omnichannel orchestration. ChatGPT can draft SMS copy, ensure it fits within character limits, and generate the required campaign object in Dotdigital.

"Create a new SMS campaign named 'Flash Sale Friday'. The message should be 'Save 20% on all plans this Friday only. Reply STOP to opt out.' Ensure short links are toggled on."

6. Orchestrate Program Enrolments

Tool: create_a_dotdigital_programs_enrolment

This tool injects users directly into automated journey builders. Because this operation is asynchronous, the LLM will receive a tracking ID in response to monitor the batch processing.

"Enroll the list of high-intent contacts into the 'Lead Nurture Sequence' program (ID 88). Remember you can only send 25 contacts per request."

7. Analyze Campaign ROI and Metrics

Tool: list_all_dotdigital_campaigns_metrics

Essential for AI-driven reporting. This fetches aggregated metrics (unique opens, clicks, revenue, and percentages) for sent campaigns within a specified UTC date range.

"Pull the campaign metrics for all emails sent between October 1st and October 31st. Summarize the total revenue generated and calculate the average click-through rate."

(Note: This is just a fraction of the available endpoints. To see the full inventory of supported tools, endpoints, and schemas, visit the Truto Dotdigital integration page.)

Workflows in Action

Providing an LLM with isolated endpoints is only half the battle. The true power of an MCP server emerges when ChatGPT chains multiple Dotdigital tools together to execute complex workflows. Here are two real-world scenarios.

Scenario 1: The Post-Webinar Follow-Up

Persona: Marketing Operations Manager

"Find the email campaign we sent last week for the webinar (Campaign ID 1045). Analyze the activity to find anyone who clicked the registration link. Extract their contact IDs and immediately enroll them into the 'Post-Webinar Nurture' program (ID 92)."

Execution Steps:

  1. list_all_dotdigital_campaign_activities: ChatGPT calls this tool using campaign_id: 1045. It parses the JSON array to find records where numClicks > 0.
  2. Data Extraction: The LLM isolates the contactId values for the engaged segment.
  3. create_a_dotdigital_programs_enrolment: ChatGPT submits a POST payload targeting programId: 92, passing the array of engaged contactIds (chunking the list to adhere to the 25-contact limit if necessary).
  4. get_single_dotdigital_programs_enrolment_by_id: The LLM automatically uses the job ID returned from step 3 to poll Dotdigital and verify the enrolment succeeded.

What the user gets back: ChatGPT replies: "I found 42 contacts who clicked the link in Campaign 1045. I have successfully enrolled them into the Post-Webinar Nurture program. The async job status currently shows as 'Finished'."

sequenceDiagram
    participant User as User
    participant GPT as ChatGPT
    participant Truto as Truto MCP Server
    participant Dot as Dotdigital API

    User->>GPT: "Find clickers for camp 1045 and enroll in program 92"
    GPT->>Truto: call list_all_dotdigital_campaign_activities
    Truto->>Dot: GET /campaigns/1045/activities
    Dot-->>Truto: JSON Array of contact metrics
    Truto-->>GPT: Activity data returned
    GPT->>Truto: call create_a_dotdigital_programs_enrolment
    Truto->>Dot: POST /programs/92/enrolments<br>{"contacts": ["123", "456"]}
    Dot-->>Truto: 202 Accepted (ID: 9999)
    Truto-->>GPT: Enrolment ID 9999
    GPT-->>User: "Contacts successfully enrolled."

Scenario 2: VIP Customer Insight Sync

Persona: Sales Development Representative (SDR)

"Search for the contact record for 'alex@enterprise.com'. Once found, update their account status to 'VIP', and then log a new Insight Data record under the 'AccountMilestones' collection noting that they upgraded to the Enterprise tier today."

Execution Steps:

  1. get_single_dotdigital_contact_by_id: ChatGPT calls this with identifier: email and id: alex@enterprise.com to retrieve the internal contact ID and existing data fields.
  2. update_a_dotdigital_contact_by_id: The model patches the user record, modifying the relevant custom data field (e.g., STATUS: VIP).
  3. update_a_dotdigital_insight_data_contact_by_id: ChatGPT formats a JSON payload fitting the AccountMilestones schema and executes the upsert against the specific contact ID.

What the user gets back: ChatGPT replies: "I have updated Alex's contact record to VIP status. I also successfully logged the 'Enterprise Upgrade' milestone to their Insight Data collection."

Security and Access Control

Giving an LLM access to your marketing automation platform requires strict governance. Truto's MCP servers are designed with security primitives that prevent AI agents from running rogue delete operations or accessing unauthorized environments.

  • Method Filtering: When generating the MCP token, use config.methods to restrict the server to specific HTTP verbs. Pass ["read"] to limit the LLM to GET operations, entirely preventing accidental contact deletions or rogue campaign dispatches.
  • Tag Filtering: Limit the server's scope by functional area. Setting config.tags to ["campaigns"] ensures the LLM can see campaign endpoints but remains completely blind to SMS or transactional data tools.
  • Additional Authentication (require_api_token_auth): By default, the cryptographically hashed MCP URL is the only authentication required. For strict environments, enabling this flag requires the MCP client to also pass a valid Truto API token in the headers, ensuring only authenticated human users can trigger the tools.
  • Time-To-Live (expires_at): For automated workflows or contractor access, supply an ISO datetime to automatically revoke the MCP server URL at a specified time. Truto's cleanup jobs will automatically purge the credentials.
  • Transparent Rate Limiting: Truto does not retry, throttle, or apply backoff logic to Dotdigital rate limits. If Dotdigital returns an HTTP 429, Truto passes that error to ChatGPT while normalizing the headers (ratelimit-limit, ratelimit-remaining, ratelimit-reset) per the IETF standard, ensuring the LLM handles backoff cleanly.

Automate Marketing with Confidence

Building an AI agent that can reliably operate a platform as dense as Dotdigital takes months of parsing schemas, handling async polling loops, and writing authentication boilerplate.

Truto eliminates this overhead entirely. By dynamically generating tools directly from curated API documentation, Truto provides your AI models with strict schemas and secure boundaries - turning natural language into robust marketing automation without the engineering debt.

Stop writing API boilerplate. Let Truto generate secure, managed MCP servers for your AI agents today. :::

FAQ

How do I connect Dotdigital to ChatGPT?
You can connect Dotdigital to ChatGPT by generating a Model Context Protocol (MCP) server through Truto. Once you connect your Dotdigital account via OAuth or API key, Truto generates a secure MCP URL that exposes Dotdigital endpoints as AI-ready tools inside ChatGPT.
Does Truto automatically handle Dotdigital rate limits?
No. Truto passes HTTP 429 rate limit errors directly from Dotdigital to the caller. However, Truto normalizes the upstream rate limit information into standardized IETF headers (ratelimit-limit, ratelimit-remaining, ratelimit-reset), leaving the retry and backoff logic to the caller or AI agent framework.
Can I restrict which Dotdigital campaigns ChatGPT can modify?
Yes. When generating the Dotdigital MCP server in Truto, you can apply method filters (e.g., 'read-only') and tag filters (e.g., 'campaigns', 'contacts') to strictly limit the operations available to the LLM.
Does this work with Claude or custom AI agents?
Yes. The generated MCP server uses the standard JSON-RPC 2.0 protocol, making it universally compatible with Claude Desktop, Cursor, LangChain, and custom AI agents, in addition to ChatGPT.

More from our Blog