📱 Find top Instagram hashtag posts and AI-drafted comments with Google Sheets
⚡ 0 views · 📱 Social Media & Email Marketing
💡 Pro Tip — Heads up — if this workflow’s Instagram scraping breaks (it happens whenever Meta updates their frontend), ScraperNode is a community node that handles profiles, posts, reels, and comments without any HTML parsing.
Description
Quick overview
This workflow runs daily to fetch top Instagram hashtag posts via the Meta (Facebook) Graph API, uses OpenAI to score relevance and draft comment options, and appends high-scoring posts to a Google Sheets review digest.
How it works
- Runs every day at 9:00 on a schedule.
- Splits a comma-separated hashtag list and looks up each hashtag ID using the Meta (Facebook) Graph API.
- Fetches top media for each hashtag from the Instagram Graph API and selects the top posts per hashtag by total engagement.
- Uses OpenAI to score each post’s relevance, generate a one-sentence summary, explain why to engage, and draft three comment options in the specified brand voice.
- Formats each analyzed post into a digest row with links, metrics, AI outputs, and a default “To Review” status.
- Filters to posts with a relevance score of 6 or higher and appends them to a Google Sheets document.
Setup
- Connect a Meta (Facebook) Graph API credential with access to your Instagram Business/Creator account and set your Instagram user ID in the configuration.
- Add an OpenAI API credential for the chat model used to analyze posts and draft comments.
- Connect a Google Sheets account, then select the target spreadsheet and sheet name and ensure the header columns match the digest fields the workflow writes.
🔗 Nodes Used
Google Sheets, HTTP Request, Schedule Trigger, Filter, Basic LLM Chain, OpenAI Chat Model
📥 Import
Download workflow.json and import into n8n:
Workflow menu → Import from File