r/n8n • • 2d ago

Workflow - Github Included Two importable workflows: YouTube transcript + metadata, and a weekly Meta Ad Library competitor monitor

I keep rebuilding these two workflows, so I put them in a repo you can import: https://github.com/fetchproof/n8n-templates

  1. YouTube transcript + metadata Manual trigger → Set (video URL) → HTTP Request (video details) → HTTP Request (transcript) → Code. You end up with one item that has the title, channel, views, likes, chapters, the full transcript text, and timestamped segments. I swap the manual trigger for a Sheets trigger and run a column of URLs through it for research notes.

  2. Meta Ad Library competitor monitor Schedule (Mondays 8am) → Set (brand + country) → HTTP Request (active ads) → Code → Sort. One row per active ad: started date, days running, format, platforms, headline, body, CTA, landing URL, and a link back to the Ad Library. Sorting by days running puts the ads the brand has kept paying for at the top. Add a Sheets append at the end and you have a weekly log.

Both use plain HTTP Request nodes with a Header Auth credential (x-api-key), so you don't need a community node. The HTTP nodes are set to continue on error, so a bad URL comes through as ok: false and doesn't kill the run.

Disclosure: the API they call is Fetchproof, which I built. New accounts get 100 free credits, which is plenty to try both. If you'd rather point the HTTP nodes at something else, the Code nodes only expect the field names documented in the README.

Happy to help if an import throws errors on your n8n version. I tested on 1.x.

2 Upvotes

6 comments sorted by

•

u/AutoModerator 2d ago

Heads up: posts under this flair must link to the workflow code per Rule 6 (GitHub, Gist, or n8n.io/workflows/). Yours does -- thanks for sharing it properly. This sticky is here so commenters know where to find the code.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/Common_Dream9420 2d ago

The Build record node in the public JSON pulls .first() for both metadata and transcript and returns one item, which makes sense for the single-URL export. One idea, haven't tried it: a two-row sheet where one transcript can't be fetched, just to see if the other URL still gets its matching record. When u swap the manual trigger for Sheets, does each URL run as its own execution, or does a batch go into an adjusted combine step?

1

u/rustpython 14h ago

Each Sheets row comes through as its own item, but they all run in one execution, and the HTTP nodes run once per item. You're right to poke at the Build record node though: it uses .first(), so with a multi-row sheet you'd only get the first row's record. For batches, switch it to map over $input.all() or use paired items so each URL keeps its own metadata and transcript. Since the HTTP nodes continue on error, a URL with no transcript should come through as ok: false without stopping the others, but I haven't tested that with a two-row sheet yet.

1

u/AbdisadikPonkia-24 2d ago

how does the ad library endpoint handle pagination if a competitor is running hundreds of active variations at once? curious if the workflow pulls everything in one call or if it needs a loop node to grab all the pages.

1

u/rustpython 1d ago

It pulls one page per call, so for a brand with hundreds of active ads you'd need a loop. The response includes a cursor; pass it back as the cursor param on the next request until it comes back empty. The template as shipped only grabs the first page, so you'd add that loop yourself (an IF that routes back to the HTTP node works).