n8n ads automation with a spend gate built in
n8n makes it easy to auto-generate ad creative on a schedule. That’s also the danger: a workflow that produces ads nobody judges will eventually auto-launch a bad one. The fix is one extra node — Spendict assesses every ad inside the flow and returns run / fix_first / kill, so only winners leave the workflow.
The ad-factory pattern
- Trigger — a schedule, a form, or a new row in a sheet with product context.
- Generate — an LLM node drafts a batch of ad variants (hooks, headlines, primary text).
- Assess — an HTTP Request node sends each variant to Spendict; the verdict comes back as structured JSON.
- Branch — a Switch node routes on
launch_recommendation:run→ your ads platform or approval queue,fix_first→ back to the LLM with the prioritized fixes,kill→ discarded and regenerated. - Log — verdicts and scores to Google Sheets, summary to Slack.
There’s a ready-made version of exactly this on the official n8n template gallery: Generate and vet ad creative with OpenAI, Spendict, Google Sheets, and Slack — one click to use it, add your keys, and it runs. The workflow JSON also lives in the integrations repo if you prefer to import it manually.
A second published template covers the other half of the loop — Monitor ad campaign health daily with Spendict, Google Sheets and Slack: a daily schedule reads your live campaign metrics, Spendict diagnoses each campaign against platform benchmarks, and Slack gets an alert naming the bottleneck the day it starts — not at the monthly review.
Want the simplest possible starting point? The gate-ad-creative template is one ad → score → branch on the verdict — swap the trigger for your own generator and build up from there.
And to plan a launch end-to-end, the campaign targeting & pre-vetting template turns a brief into a Spendict targeting strategy, has OpenAI draft variants that follow it, vets each with Spendict, and drops the whole launch pack into Google Sheets and Slack.
The same loop works on the structural layer: audit and auto-restructure ad campaigns paste a campaign build, Spendict audits it against the platform’s rulebook, and any build that comes back fix_first or restructure is rewritten by OpenAI from the prioritized fixes and re-auditedbefore it’s accepted.
The one node that does the judging
In an HTTP Request node: method POST, URL https://www.spendict.com/api/v1/assess, an Authorization: Bearer header with your key, and a JSON body like:
{
"ad_copy": { "primary_text": "{{ $json.ad_text }}" },
"platform": "meta",
"product_context": "{{ $json.product }}",
"target_audience": "{{ $json.audience }}"
}For Google ads workflows the shape is the same — set platform to google and the judgment switches rulebooks: search-intent clarity and headline discipline instead of feed-scroll hook strength. The verdict field to branch on is always launch_recommendation.
Why gate inside the workflow
An ungated automation compounds in the wrong direction: the cheaper it becomes to produce ads, the more un-reviewed ads exist, and the more spend leaks into weak creative. Gating inside the flow keeps the economics honest — generation stays unlimited, but budget only follows a run verdict. The gate is deterministic (recomputed server-side from fixed thresholds), so the workflow behaves the same every run — no LLM mood swings in the launch decision.
Frequently asked questions
Is there a native n8n node for Spendict?
The standard HTTP Request node is all you need — one POST per assessment, structured JSON back. The official n8n template (n8n.io/workflows/17064) has it pre-wired.
Does this work on n8n Cloud and self-hosted?
Yes, both — it's a plain HTTPS call to the Spendict API, no community nodes or custom code required.
What happens if my quota runs out mid-workflow?
The API returns a structured 429 with an upgrade URL — never a crash — and the quota check happens before inference, so you're never billed for a refused call. Failed assessments are refunded.
Can the workflow also audit the campaign build, not just the creative?
Yes — audit_campaign_structure (POST /api/v1/audit-campaign) judges the campaign structure against the platform's rulebook, and analyze_campaign_performance diagnoses live metrics once the campaign is running.