---
title: "Connect Pigment to ChatGPT: Automate Planning and Export Model Data"
slug: connect-pigment-to-chatgpt-automate-planning-and-export-model-data
date: 2026-10-22
author: Riya Sethi
categories: ["AI & Agents"]
excerpt: "Learn how to connect Pigment to ChatGPT using a managed MCP server. This step-by-step guide covers how to execute data flows, push CSV imports, and export Pigment model data using natural language."
tldr: "Connect Pigment to ChatGPT using Truto's managed MCP server to orchestrate financial planning workflows. We cover handling async jobs, rate limits, server generation via UI/API, and connecting your agent."
canonical: https://truto.one/blog/connect-pigment-to-chatgpt-automate-planning-and-export-model-data/
---

# Connect Pigment to ChatGPT: Automate Planning and Export Model Data


If you want to connect Pigment to ChatGPT so your AI agents can trigger complex data flows, upload headcount CSVs, and export financial models, you need a [Model Context Protocol (MCP) server](https://truto.one/what-is-mcp-model-context-protocol-the-2026-guide-for-saas-pms/). This server bridges the gap between the LLM's [JSON-RPC tool calls](https://truto.one/best-unified-api-for-llm-function-calling-ai-agent-tools-2026/) and Pigment's specific REST API architecture. 

If your team uses Claude, check out our guide on [connecting Pigment to Claude](https://truto.one/connect-pigment-to-claude-sync-model-data-and-manage-import-jobs/) or explore our broader architectural overview on [connecting Pigment to AI Agents](https://truto.one/connect-pigment-to-ai-agents-trigger-data-flows-and-manage-snapshots/).

Granting a Large Language Model (LLM) execution access to an enterprise planning platform like Pigment requires careful orchestration. [Building a custom MCP server](https://truto.one/build-vs-buy-the-hidden-costs-of-custom-mcp-servers/) means constantly updating schema mappings, maintaining infrastructure, and writing extensive boilerplate to handle asynchronous API behavior. Instead of spending weeks building this middleware, you can use a [managed infrastructure layer](https://truto.one/build-vs-buy-the-hidden-costs-of-custom-mcp-servers/) to dynamically generate a secure, authenticated MCP server URL.

This guide breaks down exactly how to use Truto to generate an MCP server for Pigment, connect it to ChatGPT, and execute complex financial planning workflows using natural language.

> Stop writing boilerplate API integration code. Let Truto generate secure, managed MCP servers for your AI agents in seconds.
>
> [Talk to us](https://truto.one/book-a-demo/)

## The Engineering Reality of the Pigment API

While the open MCP standard provides a predictable framework for models to discover and execute tools, mapping that standard against Pigment's enterprise API introduces specific engineering hurdles. If you choose to host your own custom MCP server, you own the entire integration lifecycle. Here is exactly what makes the Pigment API uniquely challenging for AI agents to navigate natively.

### Asynchronous Job Execution and Polling
Pigment is designed to handle massive, multi-dimensional datasets. Because of this, primary operations—like running a Data Flow, copying metric data, or processing a CSV import—do not return immediate results. When an agent calls the endpoint to trigger a data flow, the API responds with a `dataFlowExecutionId` rather than the data itself.

To know if the job succeeded, your agent must iteratively poll a separate status endpoint. LLMs notoriously struggle with arbitrary waiting periods and often hallucinate a "success" response immediately after triggering a job if they are not strictly provided with a status-checking tool and heavily prompted to use it in a loop.

### Opaque Identifiers over Human-Readable Names
When a user prompts an AI agent with "Export the Q3 Marketing Budget table," the LLM has no idea how to route that request. Pigment's API endpoints require specific UUIDs (`application_id`, `configuration_id`, `list_id`, `dataFlowId`). 

Your MCP server must expose discovery tools that allow the LLM to first query applications and configurations to map human-readable names to their corresponding UUIDs before it can execute the actual business logic.

### Strict Rate Limiting and Backoff Responsibilities
Pigment enforces rate limits, particularly around concurrent data flow executions (returning HTTP 429 if too many jobs run simultaneously). 

It is critical to understand that **Truto does not retry, throttle, or apply backoff on rate limit errors.** When the Pigment upstream API returns an HTTP 429 error, Truto passes that error directly to the caller. Truto normalizes the upstream rate limit information into standardized headers (`ratelimit-limit`, `ratelimit-remaining`, `ratelimit-reset`) per the IETF specification. The caller—in this case, your AI agent's orchestration framework—is strictly responsible for reading these headers, pausing execution, and retrying the tool call after the delay.

## How to Generate a Pigment MCP Server with Truto

Truto abstracts the complexity of [deriving API schemas](https://truto.one/best-unified-api-for-llm-function-calling-ai-agent-tools-2026/) by dynamically generating MCP tools from the integration's underlying resource documentation. You can generate a Pigment MCP server using either the Truto UI or the API.

### Method 1: Generating the MCP Server via the Truto UI

For administrators setting up one-off agents, the UI provides the fastest path.

1. Log into your Truto dashboard and connect a Pigment instance under **Integrated Accounts** using your Pigment API key.
2. Navigate to the detail page for that specific integrated account.
3. Click the **MCP Servers** tab.
4. Click **Create MCP Server**.
5. Select your desired configuration. You can filter which tools the LLM can access (e.g., specifying only `read` methods or tagging specific resources) and set an expiration date if this is temporary access.
6. Click Save and **copy the generated MCP server URL**. It will look something like `https://api.truto.one/mcp/a1b2c3d4...`.

### Method 2: Generating the MCP Server via the API

If you are dynamically provisioning AI agents for your own end-users, you will want to generate MCP servers programmatically.

Make an authenticated `POST` request to the `/integrated-account/:id/mcp` endpoint using your Truto API token. You can pass a `config` object to strictly scope the server's capabilities.

```bash
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": "Pigment Financial Agent",
    "config": {
      "methods": ["read", "write", "custom"],
      "tags": ["data_flows", "exports", "imports"]
    }
  }'
```

The API provisions the server, maps the Pigment schemas to JSON-RPC tools, and returns the endpoint URL in the `url` property of the response payload. 

## Connecting the MCP Server to ChatGPT

Once you possess the generated MCP server URL, the final step is registering it as a custom connector in your ChatGPT environment. 

### Method A: Via the ChatGPT UI

For enterprise end-users utilizing ChatGPT Pro, Plus, Business, Enterprise, or Education tiers:

1. In ChatGPT, open **Settings -> Apps -> Advanced settings**.
2. Enable the **Developer mode** toggle (custom MCP connectors are behind this flag).
3. Under the custom connectors or MCP servers section, click to add a new server.
4. Enter a recognizable name (e.g., "Pigment Data Ops").
5. Paste the Truto MCP URL into the Server URL field and click **Save**.

ChatGPT will immediately handshake with the URL, pull down the approved Pigment tool schemas, and make them available to the model.

### Method B: Via Manual Config File (Local/Custom Clients)

If you are running a local MCP inspector or an agent framework that relies on standard configuration files, you can connect the server using the SSE transport protocol.

Add the following configuration to your `mcp_config.json` file:

```json
{
  "mcpServers": {
    "pigment_truto": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-sse",
        "--url",
        "https://api.truto.one/mcp/YOUR_GENERATED_TOKEN"
      ]
    }
  }
}
```

## Security and Access Control

Giving an LLM unconstrained write access to an enterprise EPM is dangerous. Truto provides four distinct configuration flags to securely scope your Pigment MCP server at creation time:

*   **Method Filtering (`methods`)**: Restrict the server to specific operational categories. Passing `["read"]` limits the LLM to `get` and `list` operations, effectively creating a read-only agent that cannot alter Pigment data flows or imports.
*   **Tag Filtering (`tags`)**: Restrict the LLM's reach to specific functional areas. By passing `["exports"]`, the server drops all tools unrelated to exporting data, preventing the agent from accidentally triggering new data pipelines.
*   **Expiration (`expires_at`)**: Pass an ISO datetime to automatically revoke the MCP server URL. Truto's infrastructure will schedule a cleanup alarm to destroy the credentials exactly at the specified time, which is ideal for temporary contractor access.
*   **Extra Authentication (`require_api_token_auth`)**: When set to `true`, mere possession of the MCP URL is insufficient. The client must also pass a valid Truto API token in the Authorization header. This prevents abuse if the URL leaks in application logs.

## Hero Tools for Pigment AI Agents

Truto derives tools dynamically from the underlying API documentation. When the LLM requests available tools via the `tools/list` JSON-RPC method, the server compiles the integration schemas into flat, prompt-optimized definitions. 

Here are the highest-leverage tools available for orchestrating Pigment.

### 1. list_all_pigment_data_flows
Because the Pigment API requires internal UUIDs, your agent must query the available data flows to discover the correct `dataFlowId` before it can execute anything. This tool returns the ID, name, and description of all configured flows for a specific application.

> "Fetch all the data flows for the application ID 'app-xyz-123' and tell me the ID for the 'EOM Revenue Rollup' flow."

### 2. create_a_pigment_data_flow_trigger
This tool is the primary execution engine. It accepts a `dataFlowId` and triggers the associated pipeline in Pigment. It does not return the final result; it returns a `dataFlowExecutionId` that the agent must use to monitor progress. If the system is overloaded, Pigment will throw a 429, which the agent must catch and retry based on standard headers.

> "Trigger the 'EOM Revenue Rollup' data flow using its ID, and give me the execution ID so we can monitor it."

### 3. get_single_pigment_data_flow_status_by_id
An essential companion tool for asynchronous operations. The agent passes the `dataFlowExecutionId` to retrieve the current state (InProgress, Completed, PartialFailure, or Failed) and metadata about the individual steps executed within Pigment.

> "Check the status of data flow execution ID 'exec-456'. If it is still 'InProgress', wait 10 seconds and check again."

### 4. list_all_pigment_import_configurations
Before pushing external data into Pigment, the agent must identify where the data belongs. This tool lists all import configurations for a given application and block, returning the `configurationId` required to execute imports or push CSV files.

> "Find all the import configurations for our HR headcount block so we know where to push the new payroll data."

### 5. create_a_pigment_push_csv
This tool allows the agent to push unstructured or locally generated CSV data directly into a Pigment import configuration. Like data flows, this triggers an asynchronous job and returns an `importId`.

> "Push this CSV file containing the Q4 contractor expenses into the import configuration ID 'config-789'."

### 6. get_single_pigment_export_view_by_id
Extracting modeled data back out of Pigment is just as critical as pushing data in. This tool exports the data of a specific Pigment view as a raw CSV payload. It supports format refinements for date parsing and field delimiters.

> "Export the 'Annual Budget Variance' view as a CSV, using Iso8601 formatting for the dates, and summarize the top three over-budget departments for me."

For the complete inventory of available Pigment tools, including blocks, files, list exports, and table metrics, visit the [Pigment integration page](https://truto.one/integrations/detail/pigment).

## Workflows in Action

AI agents excel at orchestrating multi-step workflows by stringing these individual tools together. Here is how a ChatGPT agent interacts with Pigment in practice.

### Scenario 1: Executing a Financial Data Flow

Financial controllers often need to run complex data rollups before extracting reports. Instead of manually navigating the Pigment UI, the user delegates the task to ChatGPT.

> "Find the data flow for 'Monthly Consolidations' in our main application, run it, and let me know when it finishes successfully."

1.  The agent calls `list_all_pigment_data_flows` to match the string "Monthly Consolidations" to its UUID.
2.  The agent calls `create_a_pigment_data_flow_trigger` using that UUID.
3.  Pigment returns an execution ID.
4.  The agent enters a polling loop, repeatedly calling `get_single_pigment_data_flow_status_by_id` until the status returns `Completed`.

```mermaid
sequenceDiagram
  participant User as User
  participant Agent as ChatGPT Agent
  participant MCP as Truto MCP Server
  participant Pigment as Pigment API

  User->>Agent: "Run the Monthly Consolidations<br>data flow and wait for completion."
  Agent->>MCP: Call list_all_pigment_data_flows
  MCP->>Pigment: GET /api/dataflows
  Pigment-->>MCP: [dataFlowId: "df-882", name: "Monthly Consolidations"]
  MCP-->>Agent: Return dataFlowId
  Agent->>MCP: Call create_a_pigment_data_flow_trigger
  MCP->>Pigment: POST /api/dataflows/df-882/execute
  Pigment-->>MCP: dataFlowExecutionId: "exec-101"
  MCP-->>Agent: Return execution ID
  loop Poll Status
      Agent->>MCP: Call get_single_pigment_data_flow_status_by_id
      MCP->>Pigment: GET /api/dataflow-executions/exec-101
      Pigment-->>MCP: status: "Completed"
      MCP-->>Agent: Return status
  end
  Agent-->>User: "The consolidation data flow has finished running."
```

### Scenario 2: Pushing Headcount Adjustments

When workforce plans change mid-quarter, operations managers need to inject new headcount assumptions into the model quickly.

> "I have a CSV with three new engineering hires for Q3. Find the Headcount import configuration, push this CSV to it, and verify the import succeeded."

1.  The agent calls `list_all_pigment_import_configurations` to locate the UUID for the Headcount configuration.
2.  The agent formats the user's data into a CSV string and calls `create_a_pigment_push_csv`.
3.  Pigment queues the import and returns an `importId`.
4.  The agent polls `get_single_pigment_import_status_by_id` to monitor the pipeline. If the import fails due to a formatting error, the tool returns the `errorsDetails`, allowing the agent to diagnose the issue and inform the user.

## Architecting the Future of Planning

Connecting Pigment to ChatGPT changes how finance and operations teams interact with enterprise models. Instead of relying purely on dashboards, stakeholders can trigger pipelines, inject real-time assumptions, and extract CSV insights conversationally. By leveraging a managed MCP server infrastructure, engineering teams can deliver this AI connectivity securely, without drowning in authentication state, schema maintenance, or custom integration code.
