๐Ÿ“Š Audit and auto-restructure ad campaigns with Spendict, OpenAI, and Google Sheets

โšก 5 views ยท ๐Ÿ“Š Market Research & Insights

Description

Quick Overview

This workflow collects an ad campaign build brief via an n8n form, audits the structure with Spendict, and automatically rewrites failing builds with OpenAI before re-auditing, then logs the outcome to Google Sheets and posts the verdict to Slack.

How it works

  1. Receives a campaign build brief through an n8n form submission (platform, objective, and free-text campaign structure).
  2. Sends the brief to Spendictโ€™s audit API to score the structure and return a launch recommendation with prioritized fixes.
  3. Routes the flow based on Spendictโ€™s launch recommendation, passing โ€œsoundโ€ builds through as-is.
  4. For builds that need changes, sends Spendictโ€™s prioritized fixes to the OpenAI Chat Completions API to generate a revised campaign structure in JSON.
  5. Parses the revised structure and re-audits it with Spendict to produce an updated score and verdict.
  6. Appends the final result (original or auto-restructured) to Google Sheets and posts a summary message to Slack via an incoming webhook.

Setup

  1. Add a Spendict API key via HTTP Header Auth (Authorization: Bearer โ€ฆ) and apply it to both Spendict HTTP requests.
  2. Add an OpenAI API key via HTTP Header Auth (Authorization: Bearer โ€ฆ) for the OpenAI Chat Completions request.
  3. Connect Google Sheets credentials and select the target spreadsheet and sheet in the append step.
  4. Create a Slack Incoming Webhook and replace the placeholder webhook URL in the Slack request.

๐Ÿ”— Nodes Used

Google Sheets, HTTP Request, n8n Form Trigger

๐Ÿ“ฅ Import

Download workflow.json and import into n8n: Workflow menu โ†’ Import from File

๐Ÿ“– Importing guide ยท ๐Ÿ”‘ Credential setup