Instagram to Google Sheets, competitor insights logged
Competitor research on Instagram sounds simple until you’re 40 minutes deep in scrolling, taking screenshots, and trying to remember what “worked” last week.
Marketing managers feel it when reporting day hits. Agency owners feel it when clients ask, “What changed?” And founders doing their own marketing get stuck in the loop too. This Instagram Sheets automation turns daily competitor posts into a clean log, plus AI insights you can actually act on.
Below, you’ll see how the workflow runs, what it replaces, and what you need to get it live without turning your week into a setup project.
How This Automation Works
See how this solves the problem:
n8n Workflow Template: Instagram to Google Sheets, competitor insights logged
flowchart LR
subgraph sg0["Flow 1"]
direction LR
n0@{ icon: "mdi:cog", form: "rounded", label: "Schedule Trigger", pos: "b", h: 48 }
n1@{ icon: "mdi:database", form: "rounded", label: "Get Competitor List", pos: "b", h: 48 }
n2@{ icon: "mdi:swap-vertical", form: "rounded", label: "Loop Over Competitors", 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/>Get Competitor Posts"]
n4["<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/code.svg' width='40' height='40' /></div><br/>Calculate Performance Metrics"]
n5["<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/>Generate AI Insights (Claude.."]
n6@{ icon: "mdi:message-outline", form: "rounded", label: "Send Email Alert", pos: "b", h: 48 }
n7["<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/twilio.svg' width='40' height='40' /></div><br/>Send WhatsApp Alert (Twilio)"]
n8@{ icon: "mdi:database", form: "rounded", label: "Log Alert", pos: "b", h: 48 }
n9@{ icon: "mdi:swap-vertical", form: "rounded", label: "End Workflow", pos: "b", h: 48 }
n8 --> n9
n0 --> n1
n6 --> n9
n1 --> n2
n3 --> n4
n2 --> n3
n7 --> n9
n4 --> n5
n5 --> n6
n5 --> n7
n5 --> n8
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 n1,n8 database
class n3,n5 api
class n4 code
classDef customIcon fill:none,stroke:none
class n3,n4,n5,n7 customIcon
The Challenge: Competitor monitoring that eats your mornings
Most “competitive analysis” on Instagram is just reactive scrolling. You notice a reel popped off, you guess why, you drop a link into Slack, and then it disappears into the chat history forever. Next week, you’re back to square one because nothing was logged consistently, and nobody tracked engagement in a comparable way. Worse, the manual approach makes you focus on what’s loud, not what’s changing, so you miss early signals like a steady lift in saves or a new format that’s repeating across posts.
It adds up fast. Here’s where it breaks down in real life.
- Pulling the last 10 posts for each competitor turns into a daily tab-fest, especially once you track more than five accounts.
- Engagement gets judged by gut feel because you’re not calculating an average or trend the same way every time.
- Insights are scattered across screenshots, bookmarks, and “I’ll write this up later,” which rarely happens.
- When a client or exec asks for proof, you can’t easily show a history of what changed and when.
The Fix: Daily Instagram competitor tracking with AI insights
This workflow runs a daily competitor scan and turns it into a repeatable system. It starts by loading your competitor list from a Google Sheet, then loops through each competitor one at a time (important for staying polite with API limits). For every competitor, it fetches the last 10 Instagram posts via the Instagram Graph API and calculates performance metrics like average engagement and the direction of the trend. Then an AI step generates a tight set of strategic bullets you can share without rewriting everything. Finally, it sends the report to your team via email and a shorter alert via WhatsApp, while logging the full audit trail back into Google Sheets for historical comparison.
The workflow starts on a schedule (daily at 10 AM) or via an on-demand webhook when you want an ad-hoc check. From there, Google Sheets feeds the competitor list, Instagram data fills in the latest posts, and the AI layer turns raw numbers into “so what” takeaways. You end the day with alerts delivered and a growing AlertsLog you can filter, chart, or hand to a client.
What Changes: Before vs. After
| What This Eliminates | Impact You’ll See |
|---|---|
|
|
Real-World Impact
Say you track 12 competitors and you want the last 10 posts each day. Manually, you’ll spend maybe 8 minutes per competitor to open profiles, skim posts, note engagement, and paste links, which is about 90 minutes daily (and it still won’t be consistent). With this workflow, you spend about 5 minutes keeping the competitor list clean in Google Sheets, then the scheduled run pulls posts, calculates metrics, generates insights, and sends alerts automatically. You get the same coverage, but without the daily research hole.
Requirements
- n8n instance (try n8n Cloud free)
- Self-hosting option if you prefer (Hostinger works well)
- Google Sheets to store competitors and AlertsLog.
- Instagram Graph API to fetch the last 10 posts.
- Anthropic (Claude) API key (get it from the Anthropic Console).
Skill level: Intermediate. You’ll connect a few accounts, paste API keys, and confirm your sheet columns match the workflow.
Need help implementing this? Talk to an automation expert (free 15-minute consultation).
The Workflow Flow
A daily schedule (or an on-demand webhook) starts the run. Most teams stick with the 10 AM check-in, then fire the webhook when they see something odd and want a quick refresh.
Google Sheets provides the competitor list. You maintain one simple table (competitor name, Instagram user ID, and industry focus), and the workflow reads from that sheet every time so you’re not editing the automation whenever your list changes.
Instagram post data gets pulled and turned into metrics. The workflow fetches the last 10 posts for each competitor via HTTP request to the Instagram Graph API, then calculates average engagement and a trend indicator using a code step. This is the part that removes the “I think they’re doing better?” uncertainty.
AI generates the strategy layer, then alerts go out. Claude produces three tight bullet insights based on the numbers and recent post performance, then n8n sends a detailed email and a shorter WhatsApp alert via Twilio. Everything is logged back into your AlertsLog sheet so you have a permanent record.
You can easily modify the competitor sheet fields to include things like “campaign name” or “region,” then tailor the AI prompt to produce insights for that context. See the full implementation guide below for customization options.
Step-by-Step Implementation Guide
Step 1: Configure the Cron Trigger
Set the schedule that kicks off the competitor trend analysis.
- Add the Timed Schedule Starter node as your trigger.
- Define the run frequency you want in Timed Schedule Starter (e.g., daily or hourly) to control how often alerts are generated.
Step 2: Connect Google Sheets
Pull the competitor list and log the alert outcomes to Google Sheets.
- Open Fetch Rival List and set Sheet ID to
[YOUR_ID]!A:C. - Credential Required: Connect your googleApi credentials in Fetch Rival List.
- Open Record Alert Log and set Sheet ID to
[YOUR_ID]!A:Eand Operation toappend. - Credential Required: Connect your googleApi credentials in Record Alert Log.
- Connect Timed Schedule Starter → Fetch Rival List → Iterate Competitor Set.
Step 3: Set Up Processing & AI Insights
Fetch rival posts, compute engagement metrics, and generate AI insights for each competitor.
- In Iterate Competitor Set, set Batch Size to
1to process competitors one at a time. - Configure Retrieve Rival Posts with URL set to
=https://graph.facebook.com/v12.0/{{ $json["competitorUserId"] }}/media?fields=id,media_type,media_url,like_count,comments_count,caption,timestamp&access_token=[CONFIGURE_YOUR_TOKEN]&limit=10. - Paste the provided JavaScript into Compute Engagement Metrics to calculate
avgEngagementandtrend. - In Generate AI Insights, set URL to
https://api.anthropic.com/v1/messages, Request Method toPOST, JSON Parameters totrue, and Body Parameters JSON to={"model": "claude-3-5-sonnet-20241022", "max_tokens": 1024, "messages": [{"role": "user", "content": "Analyze these competitor Instagram trends: {{ JSON.stringify($json) }}. Provide 3 strategic insights to stay ahead, focusing on content strategy, posting frequency, and engagement tactics. Output as bullet points."}]}. - Connect Iterate Competitor Set → Retrieve Rival Posts → Compute Engagement Metrics → Generate AI Insights.
[CONFIGURE_YOUR_TOKEN] appears. Generate AI Insights also needs an Anthropic API key added via HTTP headers (e.g., Authorization) even though no credentials are configured.Step 4: Configure Output/Action Nodes
Send alerts via email and WhatsApp, and log results. These nodes run in parallel after AI insights are generated.
- In Dispatch Email Notice, set To Email to
[YOUR_EMAIL], From Email to[YOUR_EMAIL], and Subject to=Competitor Trends Alert: {{ $node["Iterate Competitor Set"].json["competitorName"] }} - {{ $json["trend"] }} Engagement. - Credential Required: Connect your smtp credentials in Dispatch Email Notice.
- In WhatsApp Alert Dispatch, set To to
[YOUR_ID], From to[YOUR_ID], and Message to=🚨 Competitor Alert: {{ $node["Iterate Competitor Set"].json["competitorName"] }} | Engagement: {{ $json["avgEngagement"] }} | Trend: {{ $json["trend"] }} Insights: {{ $json["content"][0]["text"].substring(0, 100) }}.... - Credential Required: Connect your twilioApi credentials in WhatsApp Alert Dispatch.
- Note the parallel split: Generate AI Insights outputs to both Dispatch Email Notice and WhatsApp Alert Dispatch and Record Alert Log in parallel.
- Connect each of those outputs to Finalize Flow, which has Keep Only Set enabled.
Step 5: Test and Activate Your Workflow
Run a full test to validate data flow, insights, and notifications before turning on production scheduling.
- Click Execute Workflow to run the workflow manually from Timed Schedule Starter.
- Confirm Fetch Rival List pulls rows correctly and Iterate Competitor Set loops through each competitor.
- Verify Retrieve Rival Posts returns media data and Compute Engagement Metrics produces
avgEngagementandtrend. - Check that Generate AI Insights returns text content and that alerts arrive via Dispatch Email Notice and WhatsApp Alert Dispatch, while Record Alert Log appends a row.
- When everything succeeds, toggle the workflow to Active so Timed Schedule Starter runs on schedule.
Watch Out For
- Instagram Graph API credentials can expire or lack the right permissions. If things break, check your Meta app token status and business account access first.
- If you’re using Wait nodes or external rendering, processing times vary. Bump up the wait duration if downstream nodes fail on empty responses.
- Default prompts in AI nodes are generic. Add your brand voice early or you’ll be editing outputs forever.
Common Questions
About an hour if your Instagram and Google credentials are ready.
Yes. You won’t write code, but you will need to paste API keys and match your Google Sheets columns to the workflow.
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 Anthropic (Claude) API usage and any Meta/Instagram API constraints.
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.
Start with the Google Sheets “Competitors” columns, because that’s what controls what gets monitored. You can adjust the “Retrieve Rival Posts” HTTP request to pull different fields from the Instagram Graph API, then tweak the “Compute Engagement Metrics” logic to match how you define engagement. The fastest win is updating the AI prompt in the “Generate AI Insights” step so it outputs insights in your exact format (for example: “hook idea,” “creative pattern,” and “CTA suggestion”).
Usually it’s an expired access token or missing business permissions for the Instagram Graph API. Regenerate the token in your Meta app setup and update the credential in n8n, then confirm the Instagram user IDs in your sheet are correct. If it fails only when you add more competitors, you may be hitting rate limits, so slow the loop and keep the “process each competitor” approach.
If you self-host, capacity is mostly your server plus Instagram API limits.
Often, yes, because this isn’t just “send data from A to B.” You’re looping through a list, calling the Instagram Graph API, calculating metrics, and then generating AI insights, which is a lot of moving parts in Zapier or Make. n8n also gives you more control over retries and logging, so debugging is less painful when an API token expires. If you self-host, you’re not paying per task in the same way, which matters when you run daily scans. Zapier or Make can still be fine for a lightweight version (one competitor, one alert), but this workflow is built for ongoing monitoring. Talk to an automation expert if you’re not sure which fits.
Competitor monitoring becomes a background process instead of a daily distraction. You get the numbers, the context, and a clean trail in Sheets, ready when someone asks, “What’s changing?”
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.