Templates / Optimize Instagram hashtags with GPT-4o & real engagement data via Graph API

Optimize Instagram hashtags with GPT-4o & real engagement data via Graph API

Ready for 3.0

by Shun Nakayama ✓ · 261 views · created 2025-12-21 · Content Creation, 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 23 nodes and runs when another workflow calls it (plus 1 other trigger). Along the way it connects OpenAI Chat Model, Google Sheets and Facebook Graph API.

How it runs

Trigger: When another workflow calls it (plus 1 other trigger).

  1. Generate Initial Hashtags (Basic LLM Chain): sends a prompt to an LLM, with model: OpenAI Chat Model
  2. Set Dummy Caption (Edit Fields (Set)): sets 1 field: caption
  3. Parse & Clean Tags (Code): runs custom JavaScript code
  4. Fetch Cached Hashtags (Google Sheets): uses Google Sheets
  5. Merge: merges the data from its input branches
  6. Check Cache Status (Code): runs custom JavaScript code
  7. Route Cached vs New (If): checks a condition and branches into true / false
  8. Merge: merges the data from its input branches
  9. Split In Batches (Loop Over Items (Split in Batches)): loops over the items in batches
  10. Aggregate & Rank Candidates (Code): runs custom JavaScript code

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

Services it uses

OpenAI Chat ModelGoogle SheetsFacebook Graph API

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 (12)

From the author

Instagram Hashtag Generator Workflow This workflow automatically generates optimal hashtags for your Instagram posts by analyzing captions and fetching real-time engagement data. Key Features 100% Official API & Free: Uses ONLY the official Instagram Graph…

Excerpt from Shun Nakayama'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.