Instagram 私信生成模板
中级
这是一个Lead Nurturing, Multimodal AI领域的自动化工作流,包含 10 个节点。主要使用 HttpRequest, GoogleSheets, Apify, ManualTrigger, SplitInBatches 等节点。 使用 Apify、OpenAI 和 Google Sheets 编写个性化 Instagram 私信
前置要求
- •可能需要目标 API 的认证凭证
- •Google Sheets API 凭证
- •OpenAI API Key
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"id": "3qMwe3NoMu4hbgS0",
"meta": {
"instanceId": "3d4f6f82ad714311bb383a0cddf651da8753530e5575f46d078b9a29d27557e0",
"templateCredsSetupCompleted": true
},
"name": "Instagram 私信生成模板",
"tags": [
{
"id": "8WkXubSlHCFtBXls",
"name": "template",
"createdAt": "2025-08-05T12:28:28.123Z",
"updatedAt": "2025-08-07T19:01:30.974Z"
}
],
"nodes": [
{
"id": "b88a86c0-c6e7-4404-9fb5-b02c864e4371",
"name": "当点击“执行工作流”时",
"type": "n8n-nodes-base.manualTrigger",
"position": [
0,
0
],
"parameters": {},
"typeVersion": 1
},
{
"id": "d65b05f5-7037-4933-8576-c0670c33712c",
"name": "遍历项目",
"type": "n8n-nodes-base.splitInBatches",
"position": [
480,
0
],
"parameters": {
"options": {}
},
"typeVersion": 3
},
{
"id": "9d7fd662-9b0b-4357-a3fe-fdd23d5b1780",
"name": "分析图片",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
1616,
0
],
"parameters": {
"text": "=Describe what is on the image in a short simple to understand paragraph. Also include text from the image in the description.",
"modelId": {
"__rl": true,
"mode": "list",
"value": "gpt-4o",
"cachedResultName": "GPT-4O"
},
"options": {},
"resource": "image",
"simplify": false,
"inputType": "base64",
"operation": "analyze"
},
"credentials": {
"openAiApi": {
"id": "j4314KXs7eD2lghV",
"name": "OpenAi account"
}
},
"typeVersion": 1.8
},
{
"id": "29be68c3-aaa5-4344-83ab-14a894ea5940",
"name": "获取 Instagram 账户",
"type": "n8n-nodes-base.googleSheets",
"position": [
208,
0
],
"parameters": {
"options": {},
"sheetName": {
"__rl": true,
"mode": "list",
"value": 842468139,
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1ATZijpA_kFQyO8afIA-EEx_dA6TSWlyvn8jzTp1eLqs/edit#gid=842468139",
"cachedResultName": "en_instagram"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1ATZijpA_kFQyO8afIA-EEx_dA6TSWlyvn8jzTp1eLqs",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1ATZijpA_kFQyO8afIA-EEx_dA6TSWlyvn8jzTp1eLqs/edit?usp=drivesdk",
"cachedResultName": "Example Instagram Cold Call Batch Messaging"
},
"authentication": "serviceAccount"
},
"credentials": {
"googleApi": {
"id": "CEWCuoGMaP93jgCn",
"name": "GCP Service account"
}
},
"typeVersion": 4.6
},
{
"id": "7009a2f5-41ab-445a-87dc-972f56a8d9db",
"name": "获取 Instagram 账户数据",
"type": "@apify/n8n-nodes-apify.apify",
"position": [
816,
0
],
"parameters": {
"resource": "Actor tasks",
"operation": "Run task",
"customBody": "={\n \"resultsLimit\": 10,\n \"skipPinnedPosts\": false,\n \"username\": [\n \"{{ $json.Account }}\"\n ]\n}",
"actorTaskId": {
"__rl": true,
"mode": "list",
"value": "NjLsrdBc4eJThVCPd",
"cachedResultUrl": "https://console.apify.com/actors/tasks/NjLsrdBc4eJThVCPd/input",
"cachedResultName": "Instagram Post Scraper (Task)"
},
"useCustomBody": true,
"waitForFinish": 60
},
"credentials": {
"apifyApi": {
"id": "sn9TC2lAVwtoXYBj",
"name": "Apify Github Login"
}
},
"typeVersion": 1
},
{
"id": "97bb8f7e-d763-4072-94b7-8053887ce3f7",
"name": "获取 Instagram 账户数据",
"type": "@apify/n8n-nodes-apify.apify",
"position": [
1168,
0
],
"parameters": {
"offset": {},
"resource": "Datasets",
"datasetId": "={{ $json.defaultDatasetId }}",
"operation": "Get items"
},
"credentials": {
"apifyApi": {
"id": "sn9TC2lAVwtoXYBj",
"name": "Apify Github Login"
}
},
"typeVersion": 1
},
{
"id": "594d877e-92e1-4f97-95f7-8aa114d5bec2",
"name": "获取最新帖子的图片",
"type": "n8n-nodes-base.httpRequest",
"position": [
1392,
0
],
"parameters": {
"url": "={{ $json.displayUrl }}",
"options": {
"response": {
"response": {
"responseFormat": "file"
}
}
},
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "User-Agent",
"value": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36"
},
{
"name": "Accept",
"value": "image/webp,image/apng,image/*,*/*;q=0.8"
}
]
}
},
"typeVersion": 4.2
},
{
"id": "b1e24aad-8a19-4da4-842f-f1bbcaeed1be",
"name": "生成个性化私信",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
1776,
0
],
"parameters": {
"modelId": {
"__rl": true,
"mode": "list",
"value": "gpt-5",
"cachedResultName": "GPT-5"
},
"options": {},
"messages": {
"values": [
{
"content": "=You need to conduct a 30-minute interview with a successful investors via Google Meet to understand their domain expertise and stock investment workflow. You gather insights to build products to make them even more successful.\n\nYour task: Write a Instagram DM to this person following this exact structure:\n- Message Structure (Single paragraph, 3 short sentences):\n-- Opening Connection (1 sentence): Reference something specific from their recent post that demonstrates you've researched them. Be genuine, not generic. Focus on the content, not the visual style of their post.\n-- Value Demonstration (1 sentence): Show domain expertise by sharing a short relevant insight from your stock investment expertise. Do not sound academic.\n-- Clear Ask (1 sentence): Request 30 minutes of their valuable time using this booking link.\n\nthe message should be a single \"message\" field in the returned json.\n\nRequired Elements:\n- Start the conversation with a greetling, like \"Hi\".\n- End the conversation with a goodbye and hope hearing back, your name is \"Herbert\"\n- Do not use \"-\" symbols in the text\n- Lead with their benefit, not your need\n- Include the exact booking link provided\n- Position as peer exchange, not favor request\n- Do not imply what problem they have, focus on understanding their desire to relentless research and drive for better stock market returns.\n- No apologies, hedging, or self-deprecating language\n- Do not imply that a product has already been built and will be shown or sold\n- Do not mention or advertise any KPIs to use in stock investing.\n\nContext for the person you write the message to:\n- Name: {{ $('Get Instagram accounts').item.json['Full Name'] }} (include name in the text, when it sounds like a person's name. Do not include when it sounds like something you would not also use in an e-mail)\n- Biography description:\n{{ $('Get Instagram accounts').item.json.Biography }}\n- Last post (maybe irrelevant, but could be used as a conversation starter):\n-- image content:\n{{ $json.choices[0].message.content }}\n-- caption:\n{{ $('Get Instagram Account Data').item.json.caption }}\n- comments:\n{{ $('Get Instagram Account Data').item.json.latestComments[0].text }}\n{{ $('Get Instagram Account Data').item.json.latestComments[1].text }}\n{{ $('Get Instagram Account Data').item.json.latestComments[2].text }}\n\nYou MUST choose ONE of these options based on what would most appeal to the specific investor:\n- Early access - First look at your product/service before launch. do not mention when this will happen\n- Small monetary incentive - $10 Amazon gift card\n\nDeliverable needed:\nInstagram DM optimized for maximum response rate while maintaining authenticity and respect for their time."
},
{
"role": "system",
"content": "You are a seasoned growth stock investor and business strategist with a track record of identifying high-potential opportunities before they become obvious to the market.\n\nYour communication style:\n- Value-first - you lead with what you can offer, not what you need\n- Human and authentic - you build genuine connections, not transactional relationships\n- Confident without arrogance - you know your worth but respect others' time\n- Results-focused - you think in terms of concrete outcomes and next steps\n\nYour methodology:\n- You make single, clear asks that remove cognitive load from others\n- You demonstrate domain expertise through precise observations\n- You position interactions as peer-to-peer value exchanges\n- You scale personal touch - mass personalization, not mass messaging\n- Every interaction should advance both parties' objectives\n- Preparation and research are non-negotiable investments\n- You never apologize for making contact when you've done the work to earn that contact.\n- You communicate like someone who belongs in the conversation."
}
]
},
"jsonOutput": true
},
"credentials": {
"openAiApi": {
"id": "j4314KXs7eD2lghV",
"name": "OpenAi account"
}
},
"executeOnce": false,
"typeVersion": 1.8
},
{
"id": "4afd8206-d3b0-40aa-965c-3d7ca4d100a9",
"name": "将消息添加到账户",
"type": "n8n-nodes-base.googleSheets",
"position": [
2176,
0
],
"parameters": {
"columns": {
"value": {
"Account": "={{ $('Get Instagram accounts').item.json.Account }}",
"Message": "={{ $json.message.content.message }}"
},
"schema": [
{
"id": "Account",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Account",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Full Name",
"type": "string",
"display": true,
"required": false,
"displayName": "Full Name",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Biography",
"type": "string",
"display": true,
"required": false,
"displayName": "Biography",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Message",
"type": "string",
"display": true,
"required": false,
"displayName": "Message",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [
"Account"
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "appendOrUpdate",
"sheetName": {
"__rl": true,
"mode": "list",
"value": 842468139,
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1dYpIHToOOsEAmgiXArqT3Qg24MKxbQKyG9Dg3IJJd70/edit#gid=842468139",
"cachedResultName": "en_instagram"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1ATZijpA_kFQyO8afIA-EEx_dA6TSWlyvn8jzTp1eLqs",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1ATZijpA_kFQyO8afIA-EEx_dA6TSWlyvn8jzTp1eLqs/edit?usp=drivesdk",
"cachedResultName": "Example Instagram Cold Call Batch Messaging"
},
"authentication": "serviceAccount"
},
"credentials": {
"googleApi": {
"id": "CEWCuoGMaP93jgCn",
"name": "GCP Service account"
}
},
"typeVersion": 4.6
},
{
"id": "17c403c3-3726-4a18-9b1c-b7fe927fd2a5",
"name": "## 试试看!",
"type": "n8n-nodes-base.stickyNote",
"position": [
-624,
-256
],
"parameters": {
"width": 460,
"height": 816,
"content": "## 受众问题关键词研究工作流"
},
"typeVersion": 1
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "7f0b2bb3-98c6-4d6c-b370-cd175f344942",
"connections": {
"Analyze image": {
"main": [
[
{
"node": "Generate Personalized DM",
"type": "main",
"index": 0
}
]
]
},
"Loop Over Items": {
"main": [
[],
[
{
"node": "Fetch Instagram Account Data",
"type": "main",
"index": 0
}
]
]
},
"Add message to Account": {
"main": [
[
{
"node": "Loop Over Items",
"type": "main",
"index": 0
}
]
]
},
"Get Instagram accounts": {
"main": [
[
{
"node": "Loop Over Items",
"type": "main",
"index": 0
}
]
]
},
"Generate Personalized DM": {
"main": [
[
{
"node": "Add message to Account",
"type": "main",
"index": 0
}
]
]
},
"Fetch Image of latest post": {
"main": [
[
{
"node": "Analyze image",
"type": "main",
"index": 0
}
]
]
},
"Get Instagram Account Data": {
"main": [
[
{
"node": "Fetch Image of latest post",
"type": "main",
"index": 0
}
]
]
},
"Fetch Instagram Account Data": {
"main": [
[
{
"node": "Get Instagram Account Data",
"type": "main",
"index": 0
}
]
]
},
"When clicking ‘Execute workflow’": {
"main": [
[
{
"node": "Get Instagram accounts",
"type": "main",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
中级 - 客户培育, 多模态 AI
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
受众问题关键词研究模板
使用OpenAI、Ahrefs和Google表格的受众问题关键词研究工作流
If
Set
Code
+6
17 节点Michael Muenzer
市场调研
自动化高级潜在客户触达与培育活动系统(含AI)
通过GPT-4、LinkedIn和Hunter.io自动化个性化B2B触达
If
Code
Wait
+9
30 节点Marth
客户培育
我的冷邮件生成器
使用Anthropic、GPT-4和谷歌表格生成个性化冷邮件
If
Set
Code
+10
24 节点Bhuvanesh R
客户培育
重新排名 #1
通过网页爬取、GPT-4o和WhatsApp自动化电话营销
Set
Code
Webhook
+18
48 节点Khaisa Studio
客户培育
B2B 外联自动化:LinkedIn 到邮件序列
B2B 外联自动化:使用 GPT、AnyMailFinder 和 Perplexity 从 LinkedIn 到邮件序列
If
Set
Code
+11
25 节点LukaszB
客户培育
使用AI研究生成个性化B2B外联邮件
通过Tavily研究和OpenRouter LLM创建个性化B2B外联邮件
Limit
Http Request
Google Sheets
+8
17 节点Haruki Kuwai
客户培育