DEV Community

Cover image for Building a custom GPT or Claude agent for marketing reporting
Vicky Lalwani
Vicky Lalwani

Posted on

Building a custom GPT or Claude agent for marketing reporting

TL;DR

A marketing reporting agent should read approved data sources, answer fixed weekly questions, and never invent numbers. On ChatGPT you build that with Custom GPT instructions, optional knowledge files and Actions that call your API. (OpenAI GPT Actions) On Claude you connect tools through MCP connectors and keep the workflow in a Project so the same rules stick. (Claude connectors overview) Start with read only tools, a written metric dictionary and a human check before anything goes to a client or boss.

What this agent is for

Most marketing teams waste Monday morning copying Ads, Analytics and CRM numbers into slides. An agent can draft that pack if you constrain it hard.

It should:

  • pull the same metrics every week
  • explain changes in plain words
  • flag missing data instead of guessing
  • refuse writes to live ad accounts unless you later add a separate, approved tool

It should not:

  • invent ROAS
  • change bids
  • email clients on its own
  • browse random blogs for "benchmarks" and present them as your data

Custom GPT vs Claude agent

Piece Custom GPT (ChatGPT) Claude agent style setup
Instructions GPT builder instructions Project instructions + skills
Files Uploaded knowledge Project files / Library
Live data GPT Actions via OpenAPI MCP connectors / tools
Auth API key or OAuth on Actions Connector auth on your account
Risk control Consequential actions need user confirm Tool allowlists + approvals in your app

OpenAI Actions turn natural language into API calls described by an OpenAPI schema. You set auth, paste the schema and test in Preview. (Configuring actions in GPTs) Claude reaches external systems through MCP connectors that expose tools, prompts and resources. (Connectors overview)

Pick the host your team already lives in. The design rules below stay the same on both.

The 10 step build

1. Write the weekly question list

Lock ten questions before you touch tools. Example set:

  1. Spend by channel vs last week
  2. Primary conversions vs last week
  3. Cost per primary conversion
  4. Top three campaigns by spend
  5. Top three campaigns by conversions
  6. Tracking anomalies (zero conversion days, spikes)
  7. Search terms or creative notes that need a human
  8. Pipeline or lead quality note from CRM if connected
  9. Open risks
  10. Recommended next tests (labelled as suggestions)

If a question needs a metric you cannot define, drop the question.

2. Publish a metric dictionary

One sheet, shared with the team:

Metric name Source Exact definition Primary or note only
Paid search spend Google Ads API Cost in account currency, account timezone primary
Primary conversions Google Ads Only conversions marked primary for bidding primary
Qualified leads CRM Stage = SQL, created this week primary
Sessions GA4 Total users sessions, site filter X note

The agent must quote these names only. Synonyms cause fake trends.

3. Choose read only tools first

Minimum viable tools:

  • get_ads_summary(date_range, account_id)
  • get_analytics_summary(date_range, property_id)
  • get_crm_summary(date_range) optional
  • get_metric_dictionary()

No update_campaign. No send_email. Add those months later, if ever, behind approvals.

OpenAI production notes for Actions expect HTTPS, sensible rate limits and clear schema descriptions because the model uses those descriptions to pick endpoints. (Production notes)

4. Put definitions in instructions, not vibes

Instruction block pattern:

  • Role: marketing reporting assistant for [brand]
  • Data rules: only use tool results; if a tool fails, say so
  • Date rules: use account timezone; default to last complete Mon to Sun
  • Output rules: start with a scoreboard table; then drivers; then risks; then suggested tests
  • Forbidden: inventing numbers; comparing to "industry averages" unless a tool returns them

OpenAI's Actions getting started guide stresses instructions that name the action and parameters the model should use. (Getting started with GPT Actions)

5. Add a thin API in front of vendor APIs

Do not give the model raw Google Ads or Meta tokens with write scopes. Your API should:

  • authenticate the caller
  • accept only allowlisted account ids
  • fetch and aggregate
  • return compact JSON under size limits
  • log every call

OpenAI documents payload and timeout limits for Actions. Keep responses small and structured. (Production notes)

6. Mark consequential paths

If you later allow a tool that changes anything, mark it so the user must confirm. OpenAI supports consequential action flags so ChatGPT asks before running them. (Production notes) Until then, keep the agent read only.

7. Test with broken data on purpose

Test Expected behaviour
API returns empty week Agent says data missing; no fake table
Conversion tag broke mid week Agent flags zero days; asks for human check
User asks to raise budgets Agent refuses; no tool exists
User asks for competitor spend Agent says unknown unless a licensed tool exists
Two accounts selected Agent separates tables; no blended fake total unless asked

8. Fix the output template

Force the same markdown every run:

## Scoreboard
(table)

## What moved
(2 to 5 bullets tied to rows)

## Tracking and data risks
(bullets or "none found")

## Suggested tests
(bullets labelled suggestion)
Enter fullscreen mode Exit fullscreen mode

Humans skim. Machines extract tables. Both win.

9. Decide who presses send

The agent drafts. A person posts to Slack or email after a two minute read. That single habit prevents most embarrassment.

10. Review monthly

Each month ask:

  • Which questions wasted time?
  • Which metrics were redefined in the business but not in the dictionary?
  • Which tools timed out?
  • Did anyone ask for writes you should still refuse?

Sample instruction snippet you can adapt

You are a marketing reporting assistant for [Brand].
Only use tool results for numbers.
If a tool errors or returns empty data, say what failed.
Default range: last complete Mon-Sun in the account timezone.
Never invent benchmarks.
Output the scoreboard table first.
Label suggestions as suggestions.
Enter fullscreen mode Exit fullscreen mode

Paste tool names exactly as they appear in your OpenAPI operationId fields so the model can bind steps to Actions. (Getting started)

Security notes teams skip

  • Separate read credentials from write credentials at the API layer
  • Rotate keys when staff leave
  • Store raw exports outside the model context when they are huge
  • Treat connector access on Claude like production access; review who can add connectors. (Connectors overview)
  • Disable the agent publicly; keep it private to your workspace

When not to build this yet

Wait if conversion tracking is broken, if nobody agrees what a lead means, or if the only goal is "an AI demo for the board". Fix definitions first. The agent amplifies whatever you feed it.

Soft next step

If you want this packaged as part of a wider marketing automation build, I outline that work on vickylalwani.net/services/ai-automation. Use the ten steps above so any builder inherits the same read only rules.

Sources

  1. OpenAI, GPT Actions introduction: https://developers.openai.com/api/docs/actions/introduction
  2. OpenAI Help, Configuring actions in GPTs: https://help.openai.com/en/articles/9442513-configuring-actions-in-gpts
  3. OpenAI, Getting started with GPT Actions: https://developers.openai.com/api/docs/actions/getting-started
  4. OpenAI, Production notes on GPT Actions: https://developers.openai.com/api/docs/actions/production
  5. Anthropic, Connectors, skills, and plugins: https://claude.com/docs/extend/overview

Top comments (0)