ChatGPT & OpenAI Integration

Connect ContextGate to ChatGPT using custom actions or OpenAI API

Connect ChatGPT to your business data through ContextGate's REST API. Use custom GPT actions or OpenAI's function calling to query your connected apps.

This guide covers two integration methods: ChatGPT Custom Actions (no code) and OpenAI API with Function Calling (programmable).

Method 1: ChatGPT Custom Actions (No Code)

1 Get Your ContextGate API Token

  1. Log into contextgate.ai
  2. Navigate to the Install page
  3. Click View API Token and copy your bearer token

💡 Find your token on the Install page .

2 Configure Your Toolbox (Optional)

Customize which data sources ChatGPT can access:

  • Limit to specific connections for security
  • Create focused tool collections for different tasks
  • Exclude sensitive data from API access

Configure on the Install page :

Toolbox Configuration

3 Create a Custom GPT

  1. Go to chat.openai.com/gpts/editor
  2. Click Create a GPT
  3. Name it (e.g., "Business Data Assistant")
  4. Add instructions like: "You help analyze business data from Salesforce, QuickBooks, and HubSpot."

4 Add ContextGate Action

In the GPT editor, scroll to Actions and click Create new action:

Replace YOUR_BEARER_TOKEN with your actual ContextGate token.

5 Test Your Custom GPT

Save your GPT and test with prompts like:

"Show me all customers from Salesforce"
"What's our current revenue in QuickBooks?"

Method 2: OpenAI API with Function Calling

For programmatic integration, use OpenAI's function calling feature to query ContextGate from your application.

Example: Python Implementation

Example: Node.js Implementation

ContextGate REST API Endpoints

Endpoint Method Description
/v1/queryPOSTQuery data from connected apps
/v1/connectionsGETList available connections
/v1/resourcesGETList available datasets and tools

🚀 Next Steps