使用 Apify + GPT-4o-mini 从标签分析生成 Instagram 标题
高级
这是一个Content Creation, Multimodal AI领域的自动化工作流,包含 17 个节点。主要使用 Set, Code, Merge, SplitOut, Aggregate 等节点。 使用 Apify + GPT-4o-mini 从标签分析生成 Instagram 标题
前置要求
- •可能需要目标 API 的认证凭证
- •OpenAI API Key
使用的节点 (17)
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"meta": {
"instanceId": "efb474b59b0341d7791932605bd9ff04a6c7ed9941fdd53dc4a2e4b99a6f9439"
},
"nodes": [
{
"id": "2ea0c49a-6706-4272-8990-06f578c5c5a7",
"name": "当点击\"执行工作流\"时",
"type": "n8n-nodes-base.manualTrigger",
"position": [
-360,
1080
],
"parameters": {},
"typeVersion": 1
},
{
"id": "a889197b-b78d-4808-948c-6d57883ee34f",
"name": "AI 代理",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
920,
1060
],
"parameters": {
"text": "=posts: {{ $json.text }}",
"options": {
"systemMessage": "=I'm looking for ideas for posts about {{ $('Create Search Term').item.json.Search_Term }}\n\nHere's the last 5 posts on instagram about the topic. Use those to help me generate a list of relevent captions to post on my instagram. \n\ndo not make up ideas that are not like the others in the list. \n\noutput like this. \n\n{\n\t\"Post Idea\": [\"Idea1\", \"Idea2\"], \n \"Most Common Post\": [\"common post 1\", \"common post 2\"]\n}"
},
"promptType": "define",
"hasOutputParser": true
},
"typeVersion": 2
},
{
"id": "47f4b1cb-9361-4aff-a439-2c8979fe93f4",
"name": "OpenAI Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
960,
1280
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4o-mini"
},
"options": {}
},
"credentials": {
"openAiApi": {
"id": "ghJTvay8CvwXDsXz",
"name": "OpenAi account"
}
},
"typeVersion": 1.2
},
{
"id": "2b0f574d-7976-469a-bf84-00a37ef15def",
"name": "结构化输出解析器",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
1140,
1280
],
"parameters": {
"jsonSchemaExample": "{\n\t\"Post Idea\": [\"Idea1\", \"Idea2\"], \n \"Most Common Post\": [\"common post 1\", \"common post 2\"]\n}"
},
"typeVersion": 1.2
},
{
"id": "00910de9-80ba-41c9-8200-81fcb6d15f45",
"name": "查找最近帖子",
"type": "n8n-nodes-base.httpRequest",
"position": [
140,
1120
],
"parameters": {
"url": "=https://api.apify.com/v2/acts/apify~instagram-hashtag-scraper/run-sync-get-dataset-items\n",
"method": "POST",
"options": {},
"jsonBody": "={\n \"hashtags\": [\n \"{{ $json.Search_Term }}\"\n ],\n \"resultsLimit\": 20,\n \"resultsType\": \"posts\"\n}",
"sendBody": true,
"specifyBody": "json",
"authentication": "genericCredentialType",
"genericAuthType": "httpQueryAuth"
},
"credentials": {
"httpQueryAuth": {
"id": "yLUXsSPePLOGnHmf",
"name": "Query Auth account"
}
},
"typeVersion": 4.2
},
{
"id": "5a62f897-74a6-4899-a8c9-a51a6d011373",
"name": "创建搜索词",
"type": "n8n-nodes-base.set",
"position": [
-140,
1000
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "ad5c9a23-7fe0-4ed4-b1e7-d3da417bcb86",
"name": "Search_Term",
"type": "string",
"value": "n8n"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "33a01e12-8820-4184-92fb-6682470940b1",
"name": "设置简介和粉丝数",
"type": "n8n-nodes-base.set",
"position": [
440,
920
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "ac638d8c-fa83-4cf6-92af-e0489d7349dd",
"name": "caption",
"type": "string",
"value": "={{ $json.caption }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "7275daae-bf7a-4c06-928a-16f0bfdc0a3b",
"name": "便签",
"type": "n8n-nodes-base.stickyNote",
"position": [
-400,
100
],
"parameters": {
"color": 3,
"width": 780,
"height": 1380,
"content": "### 1️⃣ 手动触发器"
},
"typeVersion": 1
},
{
"id": "09a04fbd-a16b-4166-a623-555770c81605",
"name": "便签1",
"type": "n8n-nodes-base.stickyNote",
"position": [
400,
100
],
"parameters": {
"color": 4,
"width": 440,
"height": 1380,
"content": ""
},
"typeVersion": 1
},
{
"id": "6a88d748-9563-49b8-9398-9d2032413f94",
"name": "便签 2",
"type": "n8n-nodes-base.stickyNote",
"position": [
860,
100
],
"parameters": {
"color": 6,
"width": 420,
"height": 1380,
"content": "### 7️⃣ 使用 AI 生成标题创意"
},
"typeVersion": 1
},
{
"id": "812c1007-ba56-4934-b88f-fcfe1f0bcf01",
"name": "便签 3",
"type": "n8n-nodes-base.stickyNote",
"position": [
-400,
-80
],
"parameters": {
"width": 2320,
"content": "## 📬 需要更多帮助?"
},
"typeVersion": 1
},
{
"id": "5fee94d6-f796-4785-a806-07714c2f0d64",
"name": "聚合",
"type": "n8n-nodes-base.aggregate",
"position": [
600,
1100
],
"parameters": {
"options": {},
"fieldsToAggregate": {
"fieldToAggregate": [
{
"fieldToAggregate": "caption"
}
]
}
},
"typeVersion": 1
},
{
"id": "0381aa63-dfa9-4e94-9991-6b266325d8ad",
"name": "将表名和列转换为代理的单个文本",
"type": "n8n-nodes-base.code",
"position": [
700,
880
],
"parameters": {
"jsCode": "return [\n {\n json: {\n text: items\n .map(item => `- ${JSON.stringify(item.json)}`)\n .join('\\n\\n'),\n },\n },\n];\n"
},
"typeVersion": 2
},
{
"id": "1d2af5fa-b9ef-401d-8b29-b0376d1317b4",
"name": "拆分输出",
"type": "n8n-nodes-base.splitOut",
"position": [
1400,
1020
],
"parameters": {
"options": {},
"fieldToSplitOut": "output['Post Idea']"
},
"typeVersion": 1
},
{
"id": "12b8c5e9-3448-4459-ad9b-d6e1af7a7c84",
"name": "拆分输出1",
"type": "n8n-nodes-base.splitOut",
"position": [
1420,
1260
],
"parameters": {
"options": {},
"fieldToSplitOut": "output['Most Common Post']"
},
"typeVersion": 1
},
{
"id": "73fd8217-6eae-4ce5-a2b5-f0325ea9154e",
"name": "合并",
"type": "n8n-nodes-base.merge",
"position": [
1660,
1140
],
"parameters": {
"mode": "combine",
"options": {},
"combineBy": "combineByPosition"
},
"typeVersion": 3.2
},
{
"id": "a25480f7-c832-4f8c-80e7-5e1ebd486305",
"name": "便签 4",
"type": "n8n-nodes-base.stickyNote",
"position": [
1300,
100
],
"parameters": {
"width": 620,
"height": 1380,
"content": "### 🔟 拆分输出"
},
"typeVersion": 1
}
],
"pinData": {
"AI Agent": [
{
"output": {
"Post Idea": [
"What are the top 3 automations you've implemented with n8n? Share your experiences!",
"Ever wondered how n8n can streamline your daily tasks? Let’s discuss the best workflows!",
"How can n8n transform your business processes? Share your thoughts!",
"Join our n8n community and learn from others’ automation journeys! What tips do you have to share?",
"Post about how you used n8n to solve a particular challenge—encourage followers to share their experiences!"
],
"Most Common Post": [
"Automate your business processes with n8n and focus on what truly matters!",
"Join our free webinar on using n8n for efficient workflow automation!",
"Discover how n8n connects different tools to save you time!",
"Share your favorite tools and how n8n helps you integrate them!",
"Tag a friend who needs to explore automation with n8n!"
]
}
}
]
},
"connections": {
"AI Agent": {
"main": [
[
{
"node": "Split Out",
"type": "main",
"index": 0
},
{
"node": "Split Out1",
"type": "main",
"index": 0
}
]
]
},
"Aggregate": {
"main": [
[
{
"node": "Convert table names and columns into single text for agent",
"type": "main",
"index": 0
}
]
]
},
"Split Out": {
"main": [
[
{
"node": "Merge",
"type": "main",
"index": 0
}
]
]
},
"Split Out1": {
"main": [
[
{
"node": "Merge",
"type": "main",
"index": 1
}
]
]
},
"Find Recent Posts": {
"main": [
[
{
"node": "Set bio and follower count",
"type": "main",
"index": 0
}
]
]
},
"OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "AI Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Create Search Term": {
"main": [
[
{
"node": "Find Recent Posts",
"type": "main",
"index": 0
}
]
]
},
"Structured Output Parser": {
"ai_outputParser": [
[
{
"node": "AI Agent",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"Set bio and follower count": {
"main": [
[
{
"node": "Aggregate",
"type": "main",
"index": 0
}
]
]
},
"When clicking ‘Execute workflow’": {
"main": [
[
{
"node": "Create Search Term",
"type": "main",
"index": 0
}
]
]
},
"Convert table names and columns into single text for agent": {
"main": [
[
{
"node": "AI Agent",
"type": "main",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
高级 - 内容创作, 多模态 AI
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
博客内容多语言自动翻译
使用GPT-4o和Markdown自动将博客内容翻译为多种语言
Set
Merge
Split Out
+5
12 节点Robert Breen
内容创作
内容生成器 v3
AI驱动博客自动化:使用GPT-4生成并发布SEO文章至WordPress和Twitter
If
Set
Code
+25
144 节点Jay Emp0
内容创作
💥 使用NanoBanana、Seedream 4、ChatGPT Image和Veo 3自动化视频广告 - VIDE
使用AI(NanoBanana、Seedream、GPT-4o、Veo 3)自动化和发布视频广告活动
Set
Code
Wait
+16
63 节点Dr. Firas
内容创作
使用GPT-5和fal.ai图像从关键词到WordPress自动化SEO博客流程
使用GPT-5和fal.ai图像从关键词到WordPress自动化SEO博客流程
Set
Code
Wait
+20
96 节点Paul
内容创作
WordPress博客自动化专业版(深度研究)v2.1市场
使用GPT-4o、Perplexity AI和多语言支持自动化SEO优化的博客创建
If
Set
Xml
+27
125 节点Daniel Ng
内容创作
内容聚合
使用Gemini AI从网站文章自动化社交媒体帖子发布到LinkedIn和X/Twitter
If
Set
Xml
+16
34 节点Vadim
内容创作
工作流信息
难度等级
高级
节点数量17
分类2
节点类型11
作者
Robert Breen
@rbreenProfessional services consultant with over 10 years of experience solving complex business problems across industries. I specialize in n8n and process automation—designing custom workflows that integrate tools like Google Calendar, Airtable, GPT, and internal systems. Whether you need to automate scheduling, sync data, or streamline operations, I build solutions that save time and drive results.
外部链接
在 n8n.io 查看 →
分享此工作流