Templates / Analyze Facebook Ads & send insights to Google Sheets with Gemini AI

Analyze Facebook Ads & send insights to Google Sheets with Gemini AI

Ready for 3.0

by JJ Tham ✓ · 15,187 views · created 2025-11-02 · Market Research, AI Summarization

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.

What this workflow does

This AI workflow has 26 nodes and runs manually, when you click “Execute workflow”. Along the way it connects Google Gemini Chat Model, Google Sheets and NocoDB. It also calls graph.facebook.com over HTTP.

How it runs

Trigger: Manually, when you click “Execute workflow”.

  1. Getting Long-Term Token (NocoDB): get many
  2. Does it Need A Token Refresh? (Code): runs custom JavaScript code
  3. Does Token Needs Refreshing? (If): checks a condition and branches into true / false
  4. Getting Long-Lived Access Token (HTTP Request): calls graph.facebook.com (POST)
  5. Getting Long-Term Token (Edit Fields (Set)): sets 1 field: longAccessToken
  6. Calculating End Date of Token (Code): runs custom JavaScript code
  7. Extracting Access Token (Edit Fields (Set)): sets 1 field: accessToken
  8. Updating Token (NocoDB): update
  9. Getting Data For the Past 28 Days Segemented Per Campaign Adset and Ad (HTTP Request): calls an HTTP API
  10. Extracting Long Term Token (Edit Fields (Set)): sets 1 field: longAccessToken

…plus 13 more steps. See the full node list below.

Services it uses

Google Gemini Chat ModelGoogle SheetsNocoDB

HTTP calls to: graph.facebook.com

Before you upgrade to n8n 3.0

Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.

Nodes used (15)

From the author

Stop manually digging through Meta Ads data and spending hours trying to connect the dots. This workflow turns n8n into an AI-powered media buyer that automatically analyzes your ad performance, categorizes your creatives, and delivers insights directly into…

Excerpt from JJ Tham's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.