Meta Ad Library to Google Sheets, scored by Gemini
Ad research starts simple. Then the tabs multiply, the screenshots pile up, and suddenly “quick inspiration” becomes a messy folder you’ll never open again.
This hits performance marketers hardest, but agency strategists and founders running their own ads feel it too. With Meta Ads scoring in a sheet, you stop guessing and start seeing patterns in minutes, not hours.
This workflow turns Meta Ad Library URLs into a scored swipe file in Google Sheets. You’ll see how it works, what you need, and what outcomes you can realistically expect.
How This Automation Works
The full n8n workflow, from trigger to final output:
n8n Workflow Template: Meta Ad Library to Google Sheets, scored by Gemini
flowchart LR
subgraph sg0["When clicking ‘Execute workflow’ Flow"]
direction LR
n0@{ icon: "mdi:play-circle", form: "rounded", label: "When clicking ‘Execute workf..", pos: "b", h: 48 }
n1@{ icon: "mdi:play-circle", form: "rounded", label: "Schedule Trigger", pos: "b", h: 48 }
n2@{ icon: "mdi:database", form: "rounded", label: "Get URL to scrap", pos: "b", h: 48 }
n3["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Request to scrapingflash.com"]
n4@{ icon: "mdi:swap-vertical", form: "rounded", label: "Split all the ads", pos: "b", h: 48 }
n5@{ icon: "mdi:swap-vertical", form: "rounded", label: "Loop Over Items", pos: "b", h: 48 }
n6@{ icon: "mdi:cog", form: "rounded", label: "Limit to 10 ads", pos: "b", h: 48 }
n7@{ icon: "mdi:robot", form: "rounded", label: "Categorise every Meta Ads", pos: "b", h: 48 }
n8@{ icon: "mdi:brain", form: "rounded", label: "Google Gemini Chat Model", pos: "b", h: 48 }
n9@{ icon: "mdi:robot", form: "rounded", label: "Structured Output Parser", pos: "b", h: 48 }
n10@{ icon: "mdi:database", form: "rounded", label: "Add row in Sheet", pos: "b", h: 48 }
n6 --> n7
n5 --> n6
n2 --> n3
n1 --> n2
n4 --> n5
n8 -.-> n7
n9 -.-> n7
n7 --> n10
n3 --> n4
n0 --> n2
end
%% Styling
classDef trigger fill:#e8f5e9,stroke:#388e3c,stroke-width:2px
classDef ai fill:#e3f2fd,stroke:#1976d2,stroke-width:2px
classDef aiModel fill:#e8eaf6,stroke:#3f51b5,stroke-width:2px
classDef decision fill:#fff8e1,stroke:#f9a825,stroke-width:2px
classDef database fill:#fce4ec,stroke:#c2185b,stroke-width:2px
classDef api fill:#fff3e0,stroke:#e65100,stroke-width:2px
classDef code fill:#f3e5f5,stroke:#7b1fa2,stroke-width:2px
classDef disabled stroke-dasharray: 5 5,opacity: 0.5
class n0,n1 trigger
class n7,n9 ai
class n8 aiModel
class n2,n10 database
class n3 api
classDef customIcon fill:none,stroke:none
class n3 customIcon
The Problem: Ad Research Is Slow, Messy, and Hard to Compare
Meta Ad Library is useful, but it’s not built for real analysis. You open a few advertiser pages, click into a handful of ads, and you’re already losing context. Which angle showed up the most? Which offer repeats across multiple brands? What’s actually strong about the creative versus what just “looks cool”? Most teams end up with a mix of bookmarks, screenshots, and notes, which means the best insights never make it into your next test plan. And if you’re trying to brief a designer or copywriter, you’re basically forwarding chaos.
The friction compounds. Here’s where it breaks down in day-to-day work.
- You can’t compare ads cleanly when every observation lives in a different place.
- Manual “scoring” is inconsistent, so decisions change depending on who reviewed it.
- Pulling images and primary text by hand takes long enough that you review fewer ads than you should.
- Your swipe file grows, but it doesn’t get smarter, so you keep relearning the same lessons.
The Solution: Scrape Ads, Let Gemini Judge Them, Save Everything to Sheets
This n8n workflow gives you a repeatable way to analyze Meta ads like an expert reviewer would, without turning it into a weekly project. It starts by reading a list of Meta (Facebook) Ad Library URLs from Google Sheets. Then it calls the ScrapingFlash API to pull the active ads from each page, breaking them into individual ad items so nothing gets missed. From there, the workflow processes ads in manageable batches and caps the run so you don’t accidentally analyze a giant set at once. Each ad’s image and text are sent to a Gemini Vision model through an AI evaluation step, which generates a structured analysis: strengths, weaknesses, specific fixes, and a performance score you can sort and filter. Finally, the results are appended as new rows to a destination Google Sheet, so your swipe file updates itself.
The workflow can run on a schedule for ongoing monitoring, or you can launch it manually when you’re starting new creative research. Either way, it turns “scrolling and guessing” into a consistent review system you can actually use to plan tests.
What You Get: Automation vs. Results
| What This Workflow Automates | Results You’ll Get |
|---|---|
|
|
Example: What This Looks Like
Say you research 5 competitors each week and you want to review 10 ads per competitor. Manually, grabbing images, copying text, and writing notes can easily take about 5 minutes per ad, which is roughly 4 hours of work. With this workflow, you paste the 5 Ad Library URLs into Google Sheets, hit run (or let the schedule handle it), and wait for the sheet to fill. The human time is closer to 10 minutes, then you’re reviewing a ranked list instead of building it.
What You’ll Need
- n8n instance (try n8n Cloud free)
- Self-hosting option if you prefer (Hostinger works well)
- Google Sheets for URL input and result storage
- Google Gemini API to score ads with Vision
- ScrapingFlash API key (get it from your ScrapingFlash dashboard)
Skill level: Beginner. You’ll connect accounts, choose your input/output sheets, and run a test.
Don’t want to set this up yourself? Talk to an automation expert (free 15-minute consultation).
How It Works
You trigger it on a schedule or manually. Use the Scheduled Automation Trigger for a recurring refresh, or the Manual Launch Trigger when you’re doing a one-off research sprint.
The workflow reads your target list. “Retrieve Ad URLs” pulls Ad Library page links from Google Sheets, so the sheet stays your simple control panel.
Ads get collected and organized. ScrapingFlash pulls the live ad data, then n8n separates the ads into individual items and processes them in batches. There’s also a cap to 10 ads, which keeps each run quick while you’re validating.
Gemini scores and explains the why. The AI evaluation step sends each ad’s creative and copy to a Gemini Vision model, then a structured parser formats the output so it lands cleanly in a sheet row.
You can easily modify the cap (10 ads) to a higher or lower number based on your needs. See the full implementation guide below for customization options.
Step-by-Step Implementation Guide
Step 1: Configure the Trigger Nodes
Set up how the workflow starts—either manually or on a schedule—so it can fetch the ad URLs before analysis.
- Open Manual Launch Trigger to enable on-demand runs during setup and testing.
- Open Scheduled Automation Trigger and define the schedule rules you want for recurring analysis.
- Confirm both triggers connect to Retrieve Ad URLs as shown in the workflow.
Step 2: Connect Google Sheets for Input URLs
Configure the input sheet that provides the list of Meta ad URLs for scraping.
- Open Retrieve Ad URLs and select the Document and Sheet where your ad URLs live.
- Ensure the sheet columns match what your scraping call expects (e.g., URL in a single column).
- Credential Required: Connect your Google Sheets credentials in Retrieve Ad URLs (this node currently has no credentials configured).
Step 3: Configure the Scraping API and Ad Item Splitting
Set up the external API call and split the response into individual ad items.
- Open ScrapingFlash API Call and verify URL is set to
https://api.scrapingflash.com/v1/facebook_ads. - Confirm Method is set to
POSTand Authentication is set topredefinedCredentialType. - Credential Required: Connect your headerAuth credentials in ScrapingFlash API Call (this node currently has no credentials configured).
- Open Separate Ad Items and set Field to Split Out to
body.adsso each ad becomes a separate item.
Step 4: Control Batch Size and Evaluate Ads with AI
Batch the ads, cap the analysis volume, and run the LLM evaluation with structured output.
- Open Iterate Ad Batches to manage ads in batches from the split output.
- Open Cap to 10 Ads to limit analysis runs to 10 ads per execution.
- Open Evaluate Meta Ads and confirm Text is set to
Analyse this D2C newsletterand Prompt Type is set todefine. - In Evaluate Meta Ads, ensure Has Output Parser is enabled (true) to use the structured schema.
- Open Gemini Vision Model and verify Model Name is set to
models/gemini-pro-vision. - Credential Required: Connect your Google Gemini/Google AI credentials in Gemini Vision Model (this node currently has no credentials configured).
- Open Structured Result Parser and keep Schema Type set to
manualwith the provided JSON schema. - Credential Note: Structured Result Parser is an AI sub-node—add credentials to its parent node Evaluate Meta Ads via Gemini Vision Model, not directly on the parser.
Step 5: Configure the Output Destination
Write the structured AI results to your Google Sheet for tracking and reporting.
- Open Append Sheet Row and set Operation to
append. - Select the destination Document and Sheet where analysis results should be stored.
- Credential Required: Connect your Google Sheets credentials in Append Sheet Row (this node currently has no credentials configured).
Step 6: Test and Activate Your Workflow
Validate the full flow and then enable scheduled execution.
- Click Execute Workflow using Manual Launch Trigger to test end-to-end processing.
- Verify that ScrapingFlash API Call returns data, Separate Ad Items splits items, and Evaluate Meta Ads outputs structured analysis.
- Confirm new rows appear in the output sheet from Append Sheet Row.
- Once successful, switch the workflow to Active to let Scheduled Automation Trigger run automatically.
Common Gotchas
- Google Sheets credentials can expire or need specific permissions. If things break, check the connected Google account and n8n credential settings first.
- If you’re using Wait nodes or external scraping, processing times vary. Bump up the wait duration if downstream nodes fail on empty responses.
- Gemini prompts that stay “generic marketer” will give you generic advice. Add your brand rules early (offer boundaries, compliance notes, tone) or you will be rewriting every suggestion.
Frequently Asked Questions
About 5 minutes if your accounts and API keys are ready.
No. You’ll connect your tools and paste in your sheet IDs. The sticky notes inside the workflow explain the few fields you might want to change.
Yes. n8n has a free self-hosted option and a free trial on n8n Cloud. Cloud plans start at $20/month for higher volume. You’ll also need to factor in Gemini API usage and your ScrapingFlash plan.
Two options: n8n Cloud (managed, easiest setup) or self-hosting on a VPS. For self-hosting, Hostinger VPS is affordable and handles n8n well. Self-hosting gives you unlimited executions but requires basic server management.
Yes, and you should. Update the prompt inside the “Evaluate Meta Ads” AI step to match your rubric (for example: “UGC authenticity,” “offer clarity,” “compliance risk,” or “hook strength in the first line”). Common customizations include changing the score scale, adding a “target persona” field, and forcing the output into your preferred categories so your sheet stays consistent.
Usually it’s expired Google authorization in n8n or the spreadsheet is owned by a different account than the one you connected. Reconnect the Google Sheets credential, then confirm the sheet is shared with that Google user. Also check the destination sheet tab name, because a tiny mismatch can make the “Append Sheet Row” step fail even though the file looks correct.
It’s capped to 10 ads per run by default, and you can raise that if you want.
For this use case, n8n is simply more comfortable. You can scrape, batch, cap, and parse structured AI output in one workflow without duct-taping five separate Zaps together. The self-hosting option also matters if you run research often, because execution limits add up fast in other tools. Zapier or Make can still work if you only want to move URLs into a sheet, but the AI scoring and structured parsing is where n8n really earns its keep. If you want a second opinion, Talk to an automation expert.
Once this is running, your swipe file stops being a graveyard of links. It becomes a decision tool you’ll actually use.
Need Help Setting This Up?
Our automation experts can build and customize this workflow for your specific needs. Free 15-minute consultation—no commitment required.