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.
๐ง๐ฟ๐ถ๐ด๐ด๐ฒ๐ฟ ๐ฎ๐ป๐ฑ ๐ฐ๐ผ๐ป๐ณ๐ถ๐ด๐๐ฟ๐ฎ๐๐ถ๐ผ๐ป (๐ณ๐ถ๐
๐ฒ๐ฑ ๐น๐ผ๐ด๐ถ๐ฐ): An Ad Intelligence Form collects search parameters, which a Build Search Config step turns into a structured query, followed by country code normalization.
๐๐ถ๐
๐ฒ๐ฑ ๐ฟ๐ผ๐๐๐ถ๐ป๐ด: An Ad Source Router splits the workflow across ad platform sources based on rules, sending requests down parallel scraping paths.
๐๐ฎ๐๐ฎ ๐ฐ๐ผ๐น๐น๐ฒ๐ฐ๐๐ถ๐ผ๐ป (๐ณ๐ถ๐
๐ฒ๐ฑ ๐น๐ผ๐ด๐ถ๐ฐ): 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.
๐๐ถ๐
๐ฒ๐ฑ ๐ฑ๐ฎ๐๐ฎ ๐บ๐ฒ๐ฟ๐ด๐ถ๐ป๐ด: A Combine All Ads step appends both normalized datasets into a single unified list for downstream processing.
๐๐ถ๐
๐ฒ๐ฑ ๐๐ฎ๐น๐ถ๐ฑ๐ถ๐๐ ๐ฐ๐ต๐ฒ๐ฐ๐ธ: A Has Valid Creative step filters out ads without usable creative before attempting any download.
๐๐ถ๐
๐ฒ๐ฑ ๐ฑ๐ฎ๐๐ฎ ๐ฟ๐ฒ๐๐ฟ๐ถ๐ฒ๐๐ฎ๐น: A Download Ad Creative Image step fetches the actual image file, followed by a check confirming the download succeeded.
๐๐ ๐๐ถ๐๐๐ฎ๐น ๐ฎ๐ป๐ฎ๐น๐๐๐ถ๐ (๐ด๐ฒ๐ป๐๐ถ๐ป๐ฒ ๐ท๐๐ฑ๐ด๐บ๐ฒ๐ป๐ ๐ฐ๐ฎ๐น๐น): 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.
๐๐ถ๐
๐ฒ๐ฑ ๐๐ฐ๐ผ๐ฟ๐ถ๐ป๐ด ๐ฎ๐ป๐ฑ ๐ฟ๐ฎ๐ป๐ธ๐ถ๐ป๐ด: The parsed analysis feeds a Score Ads step and a Sort by Score step, ranking every ad based on the AI's analysis output.
๐๐ถ๐
๐ฒ๐ฑ ๐๐ผ๐ฝ-๐ฝ๐ถ๐ฐ๐ธ ๐ณ๐น๐ฎ๐ด๐ด๐ถ๐ป๐ด: A Flag Top Picks step and an "Is Top Pick?" condition determine which ads qualify for copy generation based on their rank.
๐๐ ๐ฐ๐ผ๐ฝ๐ ๐ด๐ฒ๐ป๐ฒ๐ฟ๐ฎ๐๐ถ๐ผ๐ป (๐ด๐ฒ๐ป๐๐ถ๐ป๐ฒ ๐ท๐๐ฑ๐ด๐บ๐ฒ๐ป๐ ๐ฐ๐ฎ๐น๐น): 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.
๐๐ถ๐
๐ฒ๐ฑ ๐ณ๐ฎ๐น๐น๐ฏ๐ฎ๐ฐ๐ธ ๐ฎ๐ป๐ฑ ๐ณ๐ผ๐ฟ๐บ๐ฎ๐๐๐ถ๐ป๐ด: 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.