Templates / Analyze Instagram profiles with Apify, Google Gemini, and Supabase

Analyze Instagram profiles with Apify, Google Gemini, and Supabase

Unknown

by Pawan ✓ · 57 views · created 2026-06-28 · Market Research, AI Summarization

Unknown. This template uses community nodes we can't verify statically. Uses community nodes that can't be verified statically (unverified community packages are off by default in 3.0). Static check, last run 2026-10-19.

Community nodes

These come from third-party npm packages. In n8n 3.0 unverified community packages are off by default (N8N_UNVERIFIED_PACKAGES_ENABLED=false).

Nodes used (9)

SupabaseGoogle Gemini

What it does

Quick overview This workflow receives an Instagram username via webhook, checks Supabase for a recent cached analysis, and if needed scrapes recent posts with Apify and generates niche, content, and engagement insights using Google Gemini before storing and returning the report. How it works 1. Receives a POST webhook request containing an Instagram username. 2. Queries the Supabase reports table for matching records updated within the last 24 hours and returns the cached analysisreport if found. 3. If no fresh cache exists, runs the Apify Instagram Scraper actor to fetch the latest 5 posts for the requested profile. 4. Cleans and bundles the scraped post data into a compact JSON payload for analysis. 5. Sends the payload to Google Gemini to generate three sub-reports: niche/frequency, content strategy, and engagement/actions. 6. Combines the three Gemini outputs into a single analysisreport object along with the scraped data. 7. Upserts the report into Supabase (update if the username exists, otherwise insert) and returns the fresh analysisreport in the webhook response. Setup 1. Create or select a Supabase project, add Supabase credentials in n8n, and ensure a reports table exists with at least username, analysisreport, scrapeddata, and updatedat columns. 2. Add an Apify API token in n8n and ensure the workflow can run the apify/instagram-scraper actor with access to the target profiles. 3. Add Google Gemini (PaLM) API credentials in n8n for the Gemini model used in the three analysis steps. 4. Copy the production webhook URL from the webhook trigger and configure your source app (e.g. Lovable) to POST a JSON body containing username to /analyze-profile.

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.