Skip to content
 

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

  1. Go to ChatGPT
  2. Click your profile → My GPTs → Create a GPT
  3. 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

  1. Scroll down to Actions → Create new action
  2. Paste the following OpenAPI spec into the schema editor:
ChatGPT Action OpenAPI schema
JSON
{
  "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"]
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
  1. Verify the import shows 0 validation errors
  2. 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

  1. In the Action configuration, click Authentication
  2. Select API Key
  3. Set Auth Type to Bearer
  4. Enter your Agent App token
  5. 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

VisibilityWhen to use
Only meTesting and development
Anyone with the linkShare with your team
EveryonePublish 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

IssueSolution
Action validation errorsCheck 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 resultsTry broader search terms. Check that the API endpoint is reachable
GPT ignores the ActionEnsure the Instructions explicitly require calling searchOffers

Next Steps

Start from Quick Start