Connect TriNet to ChatGPT: Sync Employee Records and Payroll Data
from the team behind Truto
TriNet in ChatGPT, in about a minute.
The best way to connect TriNet to ChatGPT is Elaichi: connect TriNet to Elaichi once, then add Elaichi to ChatGPT as a connector. Two steps, about a minute, with a 14‑day free trial and no credit card required.
- No credit card required
- 500+ connectors
- Credentials vaulted, never read back
-
Start your free trial
14 days free, no credit card required.
-
Connect TriNet
Once, in Elaichi. ChatGPT never gets more access than you have.
-
Add Elaichi to ChatGPT
In ChatGPT, open Plugins, press +, and paste the URL into Server URL. Sign in and approve.
https://api.elaichi.ai/mcp
Building TriNet into your own product? This guide is for you.
The developer guide
Learn how to connect TriNet to chatgpt using Truto. Step-by-step guide to tool calling, API quirks, and autonomous workflows.
If you are looking to orchestrate core HR operations, sync payroll data, and automate employee lifecycle management through conversational AI, you need a Model Context Protocol (MCP) server. If your team uses Claude instead of OpenAI, check out our guide on connecting TriNet to Claude or explore our broader architectural overview on connecting TriNet to AI Agents.
Giving a Large Language Model (LLM) read and write access to a monolithic Human Resources Information System (HRIS) like TriNet is a complex engineering task. You either commit your team to building, hosting, and maintaining a custom MCP server to translate LLM JSON arguments into TriNet's specific REST structures, or you use a managed infrastructure layer to handle the heavy lifting.
This guide breaks down exactly how to use Truto to generate a secure, authenticated MCP server for TriNet, connect it natively to ChatGPT, and execute complex HR workflows - ranging from payroll queries to employee reclassification - using natural language.
The Engineering Reality of the TriNet API
Building a custom MCP server means owning the entire API integration lifecycle. While the open MCP standard provides a predictable way for models to discover tools, implementing it against TriNet's specific API design is exceptionally challenging. TriNet does not behave like a standard modern REST API.
If you decide to build a custom MCP server for TriNet, here are the specific integration hurdles your team will face:
Missing Request Schemas and Unverified Envelopes
Unlike SaaS APIs that publish strict OpenAPI specifications, TriNet publishes virtually no query or paging parameters for its endpoints. Furthermore, TriNet does not publish the request body schemas for its POST and PUT endpoints. If you are hand-coding an MCP server, you have to reverse-engineer the required JSON payloads for operations like adding an employee or updating a custom field, and manually define those JSON Schemas so the LLM knows how to call the tool.
Additionally, TriNet wraps responses in a generic envelope. Because there is no per-endpoint 200 OK schema published, extracting the actual target data requires unverified response paths. Your MCP server must blindly extract the data object from the envelope, which can lead to brittle tool executions if TriNet silently changes its internal structure.
Complex Section-Based Scopes
TriNet does not rely on simple CRUD scopes. Retrieving a list of employees (GET /v1/company/{company_id}/employees) behaves differently depending on the exact scopes granted to the credential. There are seven distinct section scopes that control which parts of the response payload are populated:
basic-read(returns department splits, employment info, names)hr-personal-read(returns emergency contacts, home address, work eligibility)hr-bioinfo-read(returns biographical info)hr-admin-read(returns custom fields)hr-pay-read(returns pay info)hr-security-read(returns roles)hr-natid-read(returns national IDs)
If your LLM asks for an employee's compensation and the credential lacks hr-pay-read, the API does not necessarily throw a 403 Forbidden; it simply returns a successful response with the payInfo section omitted. Your AI agent must be programmed to detect missing sections and handle silent data omissions gracefully.
Implicit Company ID Requirements
Almost every TriNet API endpoint requires a {company_id} in the path parameter. Exposing this to an LLM is a recipe for hallucinations, as the model will frequently try to invent a company ID or ask the user for one. A properly designed MCP server must extract the companyId from the underlying OAuth credential and automatically inject it into the proxy request, entirely removing it from the LLM's required arguments. Truto handles this automatically.
How to Generate a TriNet MCP Server
To bridge the gap between ChatGPT and TriNet, we will use Truto to generate an MCP server. This server dynamically translates TriNet's API resources into MCP-compliant JSON-RPC tools.
First, you need to connect a TriNet account. In the Truto dashboard, navigate to Integrated Accounts -> New Integrated Account, select TriNet, and complete the authentication flow. Truto securely manages the credential lifecycle behind the scenes.
Once the account is connected, you can generate the MCP server using either the Truto UI or the API.
Method 1: Via the Truto UI
- Navigate to the Integrated Accounts page in your Truto dashboard and select your active TriNet connection.
- Click on the MCP Servers tab.
- Click Create MCP Server.
- Configure your server by selecting allowed methods (e.g.,
read,write) and tags (e.g.,employees,payroll). - Click Save and copy the generated MCP server URL (it will look like
https://api.truto.one/mcp/<secure-token>). Treat this URL as a sensitive secret.
Method 2: Via the Truto API
For automated deployments or multi-tenant architectures, you can generate the MCP server programmatically. You will need your 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": "TriNet HR and Payroll Tools",
"config": {
"methods": ["read", "write"],
"tags": ["employees", "payroll", "timeoff"]
}
}'The API returns a JSON response containing your secure routing URL. This single endpoint handles protocol negotiation, tool listing, and proxy execution.
Connecting the TriNet MCP Server to ChatGPT
Now that you have your Truto MCP server URL, you must register it with your ChatGPT environment. You can do this through the standard ChatGPT UI or by configuring a local proxy using the MCP Server SSE transport.
Method A: Via the ChatGPT UI
If you are using a ChatGPT Pro, Plus, Business, Enterprise, or Education account with Developer mode enabled:
- Open ChatGPT and navigate to Settings -> Apps -> Advanced settings.
- Toggle Developer mode to the ON position.
- Under the MCP servers / Custom connectors section, click Add new server.
- Enter a descriptive name (e.g., "TriNet HRIS").
- Paste the Truto MCP URL into the Server URL field and click Save.
ChatGPT will immediately perform an initialization handshake with the Truto MCP router, fetch the available TriNet tools, and register them for use in your current chat session.
Method B: Via Manual Config File
If you are running a local agent environment, an open-source ChatGPT client wrapper, or utilizing a desktop application that requires standard MCP configuration files, you can connect using the official Server-Sent Events (SSE) bridge.
Create or update your mcp_config.json file:
{
"mcpServers": {
"trinet-production": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-sse",
"--url",
"https://api.truto.one/mcp/<your-secure-token>"
]
}
}
}When your client boots, it will execute the npx command to establish an SSE connection to the Truto edge runtime, surfacing the TriNet tools securely.
Hero Tools for TriNet Integration
Once connected, Truto exposes TriNet's API endpoints as distinct, callable tools. Because TriNet is massive, you should ideally filter your MCP server down to the specific tools your agent actually needs. Here are the most critical "hero" tools for building HR and payroll agents.
list_all_tri_net_employees
This tool retrieves the master list of all employees in the connected TriNet company. Because the companyId is injected automatically by Truto, the LLM does not need to guess the tenant ID. Note that the data returned depends heavily on the scopes authorized on the credential (e.g., basic-read vs hr-pay-read).
"Pull the complete employee directory from TriNet and build a markdown table of all active software engineers, including their current department splits."
create_a_tri_net_employee
This tool allows the agent to provision a new employee record directly in TriNet (POST /v1/hire/{company_id}/employee). Because TriNet does not publish the request schema for this endpoint, you will need to rely on system prompts or few-shot examples in your LLM context to ensure it passes the correct JSON body payload.
"We just finalized the offer for Jane Smith. Add her as a full-time employee in TriNet starting next Monday. Use the standard engineering department codes."
list_all_tri_net_payruns
Payroll visibility is critical for finance agents. This tool queries GET /v1/payroll/{company_id}/payruns to list historical and upcoming pay runs. It is heavily used for reconciling ledger data with actual cash outlays.
"Fetch all TriNet payruns for the current fiscal quarter and summarize the total expected cash requirement for the upcoming Friday cycle."
list_all_tri_net_timeoff_calendars
Capacity planning requires knowing who is out of the office. This tool retrieves the time-off requests across the organization, allowing an agent to cross-reference HR schedules against project management systems.
"Check the TriNet time-off calendar for the next two weeks. Are any of our senior backend developers scheduled for PTO during the upcoming product launch?"
tri_net_employee_jobs_bulk_update
When organizational restructuring occurs, job reclassification requires executing a PUT /v1/manage-employee/{company_id}/{employee_id}/jobs. This tool allows an AI agent to execute bulk job updates, though it requires the specific employee_id to be passed as an argument.
"Update the job classification for employee ID 58291 to 'Senior Cloud Architect' and apply the new internal job code formatting."
list_all_tri_net_employee_changes
For audit and sync workflows, it is vital to know what data has mutated. This tool queries GET /v1/company/{company_id}/employee-changes to return a chronological ledger of mutations to employee records, which is essential for triggering downstream IT provisioning.
"Audit the TriNet employee changes from the last 48 hours and identify anyone whose title or department split was modified."
To view the complete inventory of available TriNet tools, including endpoints for benefits, emergency contacts, and workers comp codes, visit the TriNet integration page.
Workflows in Action
Exposing individual tools is useful, but the real power of connecting TriNet to ChatGPT lies in multi-step orchestration. AI agents excel at chaining reads and writes to automate complex workflows that normally require human HR intervention.
1. Automated Employee Onboarding and Audit
When a new hire is processed, an AI agent can execute the creation, verify the data, and report back to the user in a single conversational turn.
"We just hired Alex Chen as a Product Manager. Add him to TriNet, then pull the latest employee changes to verify his record was created successfully."
- The agent calls
create_a_tri_net_employee, passing a constructed JSON payload with Alex's details. - The Truto MCP router executes the proxy request to TriNet.
- The agent calls
list_all_tri_net_employee_changesto query the audit log. - The agent reads the response, confirms Alex's ID exists in the recent changes array, and informs the user.
sequenceDiagram
participant User as User (ChatGPT)
participant Agent as AI Agent
participant Truto as Truto MCP
participant TriNet as TriNet API
User->>Agent: "Add Alex Chen to TriNet and verify creation."
Agent->>Truto: call create_a_tri_net_employee
Truto->>TriNet: POST /v1/hire/{company_id}/employee
TriNet-->>Truto: 200 OK (Generic Envelope)
Truto-->>Agent: Action successful
Agent->>Truto: call list_all_tri_net_employee_changes
Truto->>TriNet: GET /v1/company/{company_id}/employee-changes
TriNet-->>Truto: 200 OK (Changes array)
Truto-->>Agent: Returns recent changes
Agent-->>User: "Alex is added and verified in the audit log."2. Time-Off Capacity and Reclassification
Managers frequently need to cross-reference PTO with team structures. An agent can read the calendar and immediately update roles based on availability and planning.
"Check the time-off calendar for next month. If Sarah is out for more than two weeks, temporarily update Mark's job classification to 'Acting Lead' in TriNet."
- The agent calls
list_all_tri_net_timeoff_calendarsto fetch the PTO schedule. - The agent analyzes the JSON array and identifies that Sarah has a 3-week leave block scheduled.
- The agent looks up Mark's
employee_id(potentially callinglist_all_tri_net_employeesif it doesn't already have it). - The agent calls
tri_net_employee_jobs_bulk_updateto push the reclassification for Mark. - The agent replies to the user summarizing the PTO conflict and confirming the job title update.
3. Payroll Run Analysis
Finance teams need quick visibility into cash requirements without manually logging into the TriNet portal.
"Pull the recent payruns and tell me if there are any discrepancies or unusual spikes compared to our standard headcount."
- The agent calls
list_all_tri_net_payrunsto get the financial schedule and totals. - The agent calls
list_all_tri_net_employeesto get the current active headcount. - The agent cross-references the headcount against the payrun totals, identifies any anomalies, and outputs a financial summary directly into the ChatGPT interface.
Security and Access Control
When exposing a sensitive HRIS like TriNet to an LLM, strict governance is non-negotiable. Truto's MCP architecture provides native security controls at the token level, ensuring your AI agents operate within bounded constraints.
- Method Filtering: Limit your ChatGPT instance to safe operations. By configuring the MCP server with
methods: ["read"], the agent is physically blocked from executingcreate,update, ordeletetools, neutralizing the risk of accidental HR data mutations. - Tag Filtering: Restrict tool discovery by business domain. Using
tags: ["timeoff"]ensures ChatGPT only sees calendar tools, hiding sensitive payroll and compensation endpoints from the model's context window. - Require API Token Authentication: For elevated security, enable
require_api_token_auth: true. This forces the MCP client (e.g., ChatGPT) to pass a valid Truto API token in the Authorization header. Possession of the MCP URL alone will not grant access. - Time-to-Live (TTL) Expiration: Create temporary access windows by setting an
expires_atdatetime. The infrastructure will automatically revoke the token and clean up the routing layer when the time expires, which is perfect for temporary auditor access or scoped contractor workflows.
Handling Rate Limits and Upstream Errors
When connecting AI agents to enterprise APIs, understanding rate limit architecture is vital. AI agents execute tasks rapidly and can quickly trigger 429 Too Many Requests errors from upstream providers.
It is crucial to understand that Truto does not automatically retry, throttle, or apply backoff logic on rate limit errors. If the TriNet API returns an HTTP 429, Truto immediately passes that error back to the caller (your ChatGPT instance or local agent framework).
However, Truto does normalize the upstream rate limit information. Truto maps the vendor's proprietary rate limit headers into standardized headers (ratelimit-limit, ratelimit-remaining, ratelimit-reset) conforming to the IETF specification. This standardized format allows your agent orchestration framework (like LangGraph or your custom client) to consistently read the headers, understand the exact reset window, and apply its own intelligent backoff and retry mechanisms. The responsibility for handling the retry queue rests entirely with the caller.
Rethinking HR Automation with AI Agents
Connecting ChatGPT to TriNet transforms a static HR database into a conversational, agentic workflow engine. Instead of forcing engineers, managers, and finance teams to navigate complex TriNet portal UIs or write fragile, point-to-point integration scripts, an MCP server turns complex API payloads into discoverable tools.
By leveraging a managed infrastructure layer to handle the OAuth credential lifecycle, company ID injection, and tool generation, your team can focus on designing high-value AI workflows rather than debugging generic response envelopes and undocumented JSON payloads.
FAQ
- What is the easiest way to connect TriNet to ChatGPT?
- The best way to connect TriNet to ChatGPT is Elaichi: connect TriNet to Elaichi once, then add Elaichi to ChatGPT as a connector. Two steps, about a minute, with a 14-day free trial and no credit card required.