Optimize Instagram hashtags with GPT-4o & real engagement data via Graph API
Ready for 3.0What 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).
- Generate Initial Hashtags (Basic LLM Chain): sends a prompt to an LLM, with model: OpenAI Chat Model
- Set Dummy Caption (Edit Fields (Set)): sets 1 field: caption
- Parse & Clean Tags (Code): runs custom JavaScript code
- Fetch Cached Hashtags (Google Sheets): uses Google Sheets
- Merge: merges the data from its input branches
- Check Cache Status (Code): runs custom JavaScript code
- Route Cached vs New (If): checks a condition and branches into true / false
- Merge: merges the data from its input branches
- Split In Batches (Loop Over Items (Split in Batches)): loops over the items in batches
- Aggregate & Rank Candidates (Code): runs custom JavaScript code
…plus 9 more steps. See the full node list below.
Services it uses
Other OpenAI + Google Sheets templates (2,011) · Other Facebook + Google Sheets templates (127) · Other OpenAI + Facebook templates (107)
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.
- Code node: the task timeout drops from 300s to 60s. Test with a realistic data volume.
Nodes used (12)
- Manual Trigger
n8n-nodes-base.manualTrigger - Edit Fields (Set)
n8n-nodes-base.set - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Basic LLM Chain
@n8n/n8n-nodes-langchain.chainLlm - Code
n8n-nodes-base.code - Google Sheets
n8n-nodes-base.googleSheets - Loop Over Items (Split in Batches)
n8n-nodes-base.splitInBatches - If
n8n-nodes-base.if - Wait
n8n-nodes-base.wait - Merge
n8n-nodes-base.merge - Facebook Graph API
n8n-nodes-base.facebookGraphApi - Execute Workflow Trigger
n8n-nodes-base.executeWorkflowTrigger
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…