Ask Mark, part two: adding action to custom GPT

Hacking a custom GPT into Meta Ads.

Mark isn’t a person (I wish!). He’s a custom GPT I built so the team could keep working after a teammate left, even if in a slightly degraded mode. In practice, that meant fewer checks, slower refreshes and a lot more sparadrap.

Over time, Mark has become oddly well adopted: PMs and PMMs (call him by his name!), ask him questions and look for challenge. Now he can give our squad campaign analysis on demand.

This is part two of the story (part one here: Ask Mark). Now we’re going under the hood: how I hacked Mark into Meta’s API so he could actually pull campaign data instead of just talking about it.

Creating GPT actions is a wild world

Custom GPTs sound powerful, but they’re also surprisingly limited. They don’t just connect to APIs the way you’d hope. Sadly 😅

Someone told me about Dust, and I checked it out. It connects services and apps neatly, but here’s the catch: you lose what makes custom GPTs relevant. You can’t pass it the instructions or knowledge that make a bot sharp for a very specific job.

And that’s the point: a custom GPT built for one role (say, growth marketing) will always be sharper than a generic company-wide bot that tries to answer everything.

The reality is: if a PM asks Mark to analyze a campaign, he won’t auto-connect to Meta’s API. He’ll just stare blankly. So I had to build the pipes myself . Oh, what a ride my friends... this is, to me, the weakest point of all of this: the time you will probably spent fixing that kind of stuff and the balance to find between automating or rolling back to manual mode.

The hacks behind Ask Mark

Here’s what I ran into, and how I hacked my way around it:

Category Limitation Hacks
Authentication Couldn’t use OAuth2 for Meta Ads. GPT only allows static tokens. Used a Meta System User with a long-lived access token.
Endpoints Couldn’t register multiple graph.facebook.com endpoints separately (one domain only). Merged everything into a single GPT action.
Dynamic IDs GPT spec didn’t allow dynamic building of ad account IDs. Exposed account_id as a query parameter.
Background jobs Couldn’t schedule daily/hourly pulls (only chat-triggered). Used external scripts (Google Ads/Microsoft Ads → Slack) and let Ask Mark enrich them.
Security Access token lives in the instructions so it's not very safe. Kept Ask Mark private to Pictarine only.

Why it matters

Without these hacks, Mark would just be another vague advice bot. With them, he can actually be the growth marketing sparring partner the squad needs at the moment: pull real numbers, interpret them, and challenge PMs on their strategic choices.

If you’re trying to plug GPTs into your own stack, expect less magic and more duct tape.

I haven’t solved the security piece yet, and I don’t love having tokens living inside GPT instructions. Maybe OpenAI will eventually support proper OAuth flows. Until then, our super sassy but surprisingly effective mate stays private!