Skip to content
MaqMinds
Menu

Case study: AI agents

AI agent that researches competitor ads and drafts copy

Competitor ads collected across platforms, scored for creative quality and turned into copy drafts for the team to review.

Overview

A marketing team needed help with this: competitor ads collected across platforms, scored for creative quality and turned into copy drafts for the team to review.

AI agent that researches competitor ads and drafts copy, sales and marketing case study

The problem

The core problem was that competitive ad research across multiple ad platforms required manual searching, visual review, and copywriting with no consistent process tying it together.

  • Fragmented ad libraries: Competitor ad data lived across separate platforms with different search interfaces and formats, requiring manual cross-referencing.
  • Manual creative review: Judging whether an ad’s visual creative was strong or weak required a human to open and evaluate each image individually.
  • Inconsistent scoring: Without a structured scoring method, ranking ads by quality or relevance was subjective and varied between reviewers.
  • Slow copywriting turnaround: Drafting new ad titles and descriptions inspired by top-performing competitor creative was a manual writing task for every campaign.
  • No structured output: Findings had no consistent format for reporting or reuse, making it hard to share results or revisit past research.

What we built

The agent was built as a multi-stage pipeline combining fixed scraping and normalization logic with two distinct AI judgment points: visual creative analysis and ad copy generation.

  • Trigger and configuration (fixed logic): An Ad Intelligence Form collects search parameters, which a Build Search Config step turns into a structured query, followed by country code normalization.
  • Fixed routing: An Ad Source Router splits the workflow across ad platform sources based on rules, sending requests down parallel scraping paths.
  • Data collection (fixed logic): Separate scraping steps pull ad data from a Meta Ad Library and a TikTok Ads Library, each returning a set of items that are normalized into a consistent structure.
  • Fixed data merging: A Combine All Ads step appends both normalized datasets into a single unified list for downstream processing.
  • Fixed validity check: A Has Valid Creative step filters out ads without usable creative before attempting any download.
  • Fixed data retrieval: A Download Ad Creative Image step fetches the actual image file, followed by a check confirming the download succeeded.
  • AI visual analysis (genuine judgment call): An “Analyze Ad Creative” step using OpenAI Vision examines each downloaded ad image and produces a structured creative analysis, a task requiring visual interpretation rather than a fixed rule.
  • Fixed scoring and ranking: The parsed analysis feeds a Score Ads step and a Sort by Score step, ranking every ad based on the AI’s analysis output.
  • Fixed top-pick flagging: A Flag Top Picks step and an “Is Top Pick?” condition determine which ads qualify for copy generation based on their rank.
  • AI copy generation (genuine judgment call): For flagged top ads, a “Generate Title & Description” AI node, equipped with tool access, writes original ad titles and descriptions informed by the creative analysis, a genuine generative and judgment-based task.
  • Fixed fallback and formatting: A Fill Empty Generated Fields step ensures no ad is left without copy, and the results are merged and rendered into an HTML report via a template generation step.

How it works

The system runs on the tools listed below. Platform names appear here and in the stack, so you can see exactly what was used.

  • Orchestration: n8n workflow automation
  • Data collection: Apify actors for scraping Meta Ad Library and TikTok Ads Library datasets
  • AI/LLM: OpenAI Vision for ad creative image analysis
  • AI/LLM: AI copywriting model for generating ad titles and descriptions
  • Data processing: JSON normalization and merge steps for combining multi-platform ad data
  • Output: HTML template generation for the final report

Result

  • Automated cross-platform competitor ad research
  • Eliminated manual review of ad creative quality
  • Reduced turnaround time on new ad copy drafts
  • Enabled consistent, structured scoring of competitor ads
  • Accelerated identification of top-performing ad examples

This project is an example of ai agents. If your team has a similar workflow, the pages below explain how we approach it, and the neighbouring case studies show the same ideas in other businesses.

Tell us the workflow. We'll tell you if it is worth building.