ChatGPT Integration
Create a Custom GPT that searches real product offers, deals, and services via AON.
How it works
ChatGPT Custom GPTs support Actions — external API calls defined by an OpenAPI spec. AON provides a ready-made spec that adds offer search to any GPT.
Prerequisites
- A ChatGPT Plus, Team, or Enterprise account (Custom GPTs require a paid plan)
- An active Agent App token (get one here)
Step 1: Create a Custom GPT
- Go to ChatGPT
- Click your profile → My GPTs → Create a GPT
- Switch to the Configure tab
Step 2: Set Name and Description
- Name:
AON Shopping Assistant(or your preferred name) - Description:
Find real product offers, deals, and services powered by Agent Offer Network.
Step 3: Paste Instructions
Copy the following instructions and paste into the Instructions field:
You are a shopping and product recommendation assistant powered by
Agent Offer Network (AON). You help users find real product offers,
deals, and services.
Core Rules:
1. MUST call searchOffers for ANY question about products, shopping,
deals, offers, pricing, recommendations, comparisons, or services.
2. NEVER answer product recommendations from your own knowledge.
Always call searchOffers first.
3. For non-shopping questions, answer normally without calling any action.
How to Call searchOffers:
- Extract the user's product intent into clear English text
- Set intent.content to [{"type": "input_text", "text": "<intent>"}]
- Set pagination.limit to 5 unless user asks for more or fewer
- Always include context.user_profile (even if empty: {})
Presenting Results:
- Show product title, price, description, and entity/brand name
- Include a clickable link using action.payload.target
- Add the label "Sponsored" next to each recommendation
- Respond in the user's language
Format:
> **Product Title** by Brand — $29.99
> Brief description.
> [View Deal](url) · *Sponsored*Full instructions available
The complete instructions with edge case handling live in sdk/chatgpt-action/gpt-instructions.md in the AON repository.
Step 4: Configure the Action
- Scroll down to Actions → Create new action
- Paste the following OpenAPI spec into the schema editor:
{
"openapi": "3.1.0",
"info": {
"title": "Agent Offer Network - ChatGPT Action",
"version": "0.1.0"
},
"servers": [
{
"url": "https://api.aon.pro",
"description": "Production public API baseline"
}
],
"security": [{ "bearerAuth": [] }],
"paths": {
"/v1/offers/query": {
"post": {
"operationId": "searchOffers",
"summary": "Search product offers by intent.",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": ["intent"],
"properties": {
"intent": {
"type": "object",
"properties": {
"content": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": { "type": "string", "enum": ["input_text"] },
"text": { "type": "string" }
},
"required": ["type", "text"]
}
}
},
"required": ["content"]
}
}
}
}
}
}
}
}
}
}- Verify the import shows 0 validation errors
- You should see one action:
searchOffers
Full OpenAPI spec
The complete spec with detailed schemas is available at sdk/chatgpt-action/openapi.json in the AON repository. The simplified version above works for most use cases.
Step 5: Configure Authentication
- In the Action configuration, click Authentication
- Select API Key
- Set Auth Type to Bearer
- Enter your Agent App token
- Click Save
Use a dedicated Agent App token
Create a separate token for the ChatGPT Action. The public SDK route authenticates with a Bearer token and does not require x-aon-app-id.
ChatGPT request body rules
Keep platform and user_pseudo_id out of the request body. The current server-side ChatGPT path injects platform attribution and ephemeral identity on the backend.
Step 6: Publish
| Visibility | When to use |
|---|---|
| Only me | Testing and development |
| Anyone with the link | Share with your team |
| Everyone | Publish to GPT Store (requires Builder Profile) |
Set a Privacy Policy URL if publishing publicly.
Test Your GPT
Try these prompts to verify the integration:
- "Find me the best project management tools under $20/month"
- "Compare noise-cancelling headphones"
- "What online courses can help me learn Python?"
The GPT should call the searchOffers action and return real product recommendations with links and pricing.
Troubleshooting
| Issue | Solution |
|---|---|
| Action validation errors | Check JSON syntax in the spec. Paste into a JSON validator first |
| "Authentication failed" | Verify the Agent App token is correct and has Bearer auth type |
| Zero results | Try broader search terms. Check that the API endpoint is reachable |
| GPT ignores the Action | Ensure the Instructions explicitly require calling searchOffers |
Next Steps
- Claude Integration — Also available on Claude
- TypeScript SDK — Build a custom agent with full control
- Best Practices — Production patterns and security