使用AI和Slack审批的LinkedIn帖子自动化
高级
这是一个AI, Marketing领域的自动化工作流,包含 32 个节点。主要使用 If, Set, Code, Limit, Slack 等节点,结合人工智能技术实现智能自动化。 LinkedIn帖子自动化:AI(GPT-4o)生成与Slack审批
前置要求
- •Slack Bot Token 或 Webhook URL
- •HTTP Webhook 端点(n8n 会自动生成)
- •可能需要目标 API 的认证凭证
- •Google Sheets API 凭证
- •OpenAI API Key
使用的节点 (32)
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"id": "YOUR_WORKFLOW_ID",
"meta": {
"instanceId": "YOUR_INSTANCE_ID",
"templateCredsSetupCompleted": true
},
"name": "使用 AI 和 Slack 审批的 LinkedIn 帖子自动化",
"tags": [],
"nodes": [
{
"id": "workflow-overview-linkedin",
"name": "工作流概览",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1050,
-450
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "sheets-trigger-note",
"name": "Sheets 触发器信息",
"type": "n8n-nodes-base.stickyNote",
"position": [
-750,
-400
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "ai-generation-note",
"name": "AI 生成",
"type": "n8n-nodes-base.stickyNote",
"position": [
130,
-400
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "slack-approval-note",
"name": "Slack 审批",
"type": "n8n-nodes-base.stickyNote",
"position": [
730,
-380
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "webhook-handler-note",
"name": "Webhook 处理器",
"type": "n8n-nodes-base.stickyNote",
"position": [
-750,
-800
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "image-upload-note",
"name": "图片上传流程",
"type": "n8n-nodes-base.stickyNote",
"position": [
950,
-800
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "linkedin-publish-note",
"name": "LinkedIn 发布",
"type": "n8n-nodes-base.stickyNote",
"position": [
1450,
-780
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "status-update-note",
"name": "状态更新",
"type": "n8n-nodes-base.stickyNote",
"position": [
2110,
-900
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "0cd3e628-1720-49f7-9280-a1039d2c2ca9",
"name": "限制",
"type": "n8n-nodes-base.limit",
"notes": "Processes one item at a time to prevent API overload",
"position": [
-260,
-180
],
"parameters": {},
"typeVersion": 1
},
{
"id": "c36d36d6-0035-49ac-a757-4598d56e574e",
"name": "结构化输出解析器",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
328,
40
],
"parameters": {},
"typeVersion": 1.2
},
{
"id": "9f521172-07f4-4a17-b358-bd998e9a9d02",
"name": "OpenAI 聊天模型",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
208,
40
],
"parameters": {},
"typeVersion": 1.2
},
{
"id": "09b0b22f-eb64-468f-85b0-1c9a0608631e",
"name": "Webhook",
"type": "n8n-nodes-base.webhook",
"notes": "Receives approval responses - ensure URL is configured in Slack app",
"position": [
-700,
-590
],
"webhookId": "YOUR_WEBHOOK_ID",
"parameters": {},
"typeVersion": 2
},
{
"id": "4e2954d7-e4de-48bf-a974-5ec80c7b7b0c",
"name": "Linkedin-帖子-主题",
"type": "n8n-nodes-base.googleSheetsTrigger",
"notes": "Triggers every minute for new posts in your spreadsheet",
"position": [
-700,
-180
],
"parameters": {},
"typeVersion": 1
},
{
"id": "47c4cdd0-48ef-4e41-996b-ed29811b092e",
"name": "验证-状态",
"type": "n8n-nodes-base.if",
"notes": "Filters to process only 'Pending' items - prevents duplicates",
"position": [
-480,
-180
],
"parameters": {},
"typeVersion": 2.2
},
{
"id": "908eee31-78eb-482c-b331-2d3467d56b0d",
"name": "Linkedin-帖子-创建器",
"type": "@n8n/n8n-nodes-langchain.agent",
"notes": "Uses GPT-4 to generate LinkedIn content - customize prompt for your brand voice",
"position": [
180,
-180
],
"parameters": {},
"typeVersion": 1.9
},
{
"id": "882d6e5c-a7f0-425f-a501-1f7179f8857b",
"name": "格式化-内容",
"type": "n8n-nodes-base.code",
"notes": "Formats content for Slack display - handles special characters and newlines",
"position": [
556,
-180
],
"parameters": {},
"typeVersion": 2
},
{
"id": "31aea874-516c-47c7-9c5f-bde873faae4d",
"name": "Slack-审批",
"type": "n8n-nodes-base.slack",
"notes": "Sends for human review - edit the Slack user to change approver",
"position": [
780,
-180
],
"webhookId": "YOUR_SLACK_WEBHOOK_ID",
"parameters": {},
"notesInFlow": true,
"typeVersion": 2.3
},
{
"id": "8592224a-0370-48c3-b803-fe3653284545",
"name": "格式化-响应",
"type": "n8n-nodes-base.code",
"notes": "Extracts edited content from Slack response",
"position": [
-260,
-590
],
"parameters": {},
"typeVersion": 2
},
{
"id": "2c503653-e3b6-4229-a733-25fa666ba85a",
"name": "验证-响应",
"type": "n8n-nodes-base.if",
"notes": "Ensures response contains content before proceeding",
"position": [
-40,
-590
],
"parameters": {},
"typeVersion": 2.2
},
{
"id": "be68592f-f6a8-4698-8343-58d439eed3ac",
"name": "设置-最终消息",
"type": "n8n-nodes-base.set",
"notes": "Prepares approved content for publishing",
"position": [
180,
-590
],
"parameters": {},
"typeVersion": 3.4
},
{
"id": "4ec34acf-1704-4fd7-b14d-680409acbeda",
"name": "Linkedin-用户-详情",
"type": "n8n-nodes-base.httpRequest",
"notes": "Fetches LinkedIn user ID for post attribution",
"position": [
400,
-580
],
"parameters": {},
"typeVersion": 4.2
},
{
"id": "78293261-7fbd-4757-8353-c2275ba2089a",
"name": "Linkedin-帖子",
"type": "n8n-nodes-base.httpRequest",
"notes": "Publishes to your profile - update with your LinkedIn credentials",
"position": [
1500,
-590
],
"parameters": {},
"typeVersion": 4.2
},
{
"id": "54ee84f1-42e2-4f25-96a4-958b27f798f4",
"name": "获取-群组-ID",
"type": "n8n-nodes-base.googleSheets",
"notes": "Retrieves LinkedIn group IDs from Groups sheet",
"position": [
1720,
-590
],
"parameters": {},
"typeVersion": 4.5
},
{
"id": "4e3e1fc5-a0ae-469f-8399-79b9bf98ff41",
"name": "逐一选择",
"type": "n8n-nodes-base.splitInBatches",
"notes": "Processes groups one at a time to avoid rate limits",
"position": [
1940,
-590
],
"parameters": {},
"typeVersion": 3
},
{
"id": "7309d6c0-bfec-4d06-b3c3-5b05ccab6df3",
"name": "发布-Linkedin-群组",
"type": "n8n-nodes-base.httpRequest",
"notes": "Posts to multiple groups - add group IDs in Groups sheet",
"onError": "continueRegularOutput",
"position": [
2160,
-540
],
"parameters": {},
"typeVersion": 4.2
},
{
"id": "63b25ac7-e5dc-4836-96cf-5767b57c7784",
"name": "更新-状态",
"type": "n8n-nodes-base.googleSheets",
"notes": "Marks as 'Posted' to prevent reprocessing",
"position": [
2160,
-740
],
"parameters": {},
"typeVersion": 4.5
},
{
"id": "348ca4b6-fbb0-4a07-9c3d-9a581b95c7fe",
"name": "注册图片",
"type": "n8n-nodes-base.httpRequest",
"notes": "Initiates LinkedIn media upload - requires valid image URL from sheet",
"position": [
620,
-580
],
"parameters": {},
"typeVersion": 4.2
},
{
"id": "2dfdfc17-78f7-488b-82f2-cb229488062f",
"name": "上传-图片-数据",
"type": "n8n-nodes-base.set",
"notes": "Extracts upload URL and asset ID from LinkedIn response",
"position": [
840,
-580
],
"parameters": {},
"typeVersion": 3.4
},
{
"id": "a68a5ba8-8913-455f-9893-12013322e9c0",
"name": "获取图片二进制",
"type": "n8n-nodes-base.httpRequest",
"notes": "Downloads image from URL specified in spreadsheet",
"position": [
1060,
-590
],
"parameters": {},
"typeVersion": 4.2
},
{
"id": "37cfc754-d66f-43f8-b881-4b5f0e927fa2",
"name": "上传图片",
"type": "n8n-nodes-base.httpRequest",
"notes": "Uploads image binary to LinkedIn servers",
"position": [
1280,
-590
],
"parameters": {},
"typeVersion": 4.2
},
{
"id": "c67c5ae9-c0c0-4400-a5ed-c2f96842e24d",
"name": "编辑字段",
"type": "n8n-nodes-base.set",
"notes": "Extracts post ID for tracking through workflow",
"position": [
-40,
-180
],
"parameters": {},
"typeVersion": 3.4
},
{
"id": "8202c5f6-aa24-44d9-989e-b67d0c481e17",
"name": "设置主题和图片进行处理",
"type": "n8n-nodes-base.code",
"notes": "Extracts post ID and image URL from Slack approval response",
"position": [
-480,
-600
],
"parameters": {},
"typeVersion": 2
}
],
"active": false,
"pinData": {
"Webhook": [
{
"json": {
"body": {
"payload": "{'type':'block_actions','user':{'id':'USER_ID','username':'username','name':'user.name','team_id':'TEAM_ID'},'api_app_id':'APP_ID','token':'TOKEN','container':{'type':'message','message_ts':'1234567890.123456','channel_id':'CHANNEL_ID','is_ephemeral':false},'trigger_id':'1234567890123.1234567890123.abcdef1234567890abcdef1234567890','team':{'id':'TEAM_ID','domain':'team-domain'},'enterprise':null,'is_enterprise_install':false,'channel':{'id':'CHANNEL_ID','name':'directmessage'},'message':{'user':'BOT_USER_ID','type':'message','ts':'1234567890.123456','bot_id':'BOT_ID','app_id':'APP_ID','text':'*Content Review Request*\\nPlease review the following content: :mag: Sample LinkedIn post content here...\\n\\n#SampleHashtag #LinkedInPost #Automation','team':'TEAM_ID','blocks':[{'type':'section','block_id':'BLOCK_1','text':{'type':'mrkdwn','text':'*Content Review Request*\\nPlease review the following content:','verbatim':false}},{'type':'section','block_id':'BLOCK_2','text':{'type':'mrkdwn','text':':mag: Sample LinkedIn post content here...\\n\\n#SampleHashtag #LinkedInPost #Automation','verbatim':false}},{'type':'input','block_id':'INPUT_BLOCK','label':{'type':'plain_text','text':'Edit content if needed:','emoji':true},'optional':false,'dispatch_action':false,'element':{'type':'plain_text_input','action_id':'content_input','initial_value':'Sample LinkedIn post content here...\\n\\n#SampleHashtag #LinkedInPost #Automation','multiline':true,'dispatch_action_config':{'trigger_actions_on':['on_enter_pressed']}}},{'type':'actions','block_id':'ACTION_BLOCK','elements':[{'type':'button','action_id':'approve_button','text':{'type':'plain_text','text':'Approve As Is','emoji':true},'style':'primary','value':'approve'},{'type':'button','action_id':'edit_button','text':{'type':'plain_text','text':'Submit Edited Version','emoji':true},'style':'danger','value':'edit'}]},{'type':'section','block_id':'FOOTER_BLOCK','text':{'type':'mrkdwn','text':'_Automated with this n8n workflow_','verbatim':false}}]},'state':{'values':{'INPUT_BLOCK':{'content_input':{'type':'plain_text_input','value':'Sample LinkedIn post content here...\\n\\n#SampleHashtag #LinkedInPost #Automation'}}}},'response_url':'https://hooks.slack.com/actions/TEAM_ID/ACTION_ID/TOKEN','actions':[{'action_id':'approve_button','block_id':'ACTION_BLOCK','text':{'type':'plain_text','text':'Approve As Is','emoji':true},'value':'approve','style':'primary','type':'button','action_ts':'1234567890.123456'}]}"
},
"query": {},
"params": {},
"headers": {
"host": "YOUR_N8N_HOST",
"accept": "application/json,*/*",
"cf-ray": "CF_RAY_ID",
"cdn-loop": "cloudflare; loops=1; subreqs=1",
"cf-ew-via": "15",
"cf-worker": "n8n.cloud",
"x-real-ip": "REAL_IP",
"cf-visitor": "{\"scheme\":\"https\"}",
"user-agent": "Slackbot 1.0 (+https://api.slack.com/robots)",
"cf-ipcountry": "US",
"content-type": "application/x-www-form-urlencoded",
"x-is-trusted": "yes",
"content-length": "12089",
"accept-encoding": "gzip, br",
"x-forwarded-for": "IP_Address_1, IP_Address_2",
"cf-connecting-ip": "54.224.31.149",
"x-forwarded-host": "N8N_HOST",
"x-forwarded-port": "443",
"x-forwarded-proto": "https",
"x-slack-signature": "SIGNATURE",
"x-forwarded-server": "SERVER_NAME",
"x-slack-request-timestamp": "TIMESTAMP"
},
"webhookUrl": "WEBHOOK_URL",
"executionMode": "production"
}
}
]
},
"settings": {
"executionOrder": "v1"
},
"versionId": "YOUR_VERSION_ID",
"connections": {
"Limit": {
"main": [
[
{
"node": "Edit Fields",
"type": "main",
"index": 0
}
]
]
},
"Webhook": {
"main": [
[
{
"node": "Set Topics and Images for Processing",
"type": "main",
"index": 0
}
]
]
},
"Edit Fields": {
"main": [
[
{
"node": "Linedin-Post-Creator",
"type": "main",
"index": 0
}
]
]
},
"Pick 1 by 1": {
"main": [
[
{
"node": "Update-Status",
"type": "main",
"index": 0
}
],
[
{
"node": "Post-Linkedin-Groups",
"type": "main",
"index": 0
}
]
]
},
"Get-Group-id": {
"main": [
[
{
"node": "Pick 1 by 1",
"type": "main",
"index": 0
}
]
]
},
"Upload Image": {
"main": [
[
{
"node": "Linkedin-post",
"type": "main",
"index": 0
}
]
]
},
"Linkedin-post": {
"main": [
[
{
"node": "Get-Group-id",
"type": "main",
"index": 0
}
]
]
},
"Update-Status": {
"main": [
[]
]
},
"Format-Content": {
"main": [
[
{
"node": "Approval-on-Slack",
"type": "main",
"index": 0
}
]
]
},
"Register Image": {
"main": [
[
{
"node": "Upload-Image-data",
"type": "main",
"index": 0
}
]
]
},
"Format-Response": {
"main": [
[
{
"node": "Validate-Response",
"type": "main",
"index": 0
}
]
]
},
"Validate-Status": {
"main": [
[
{
"node": "Limit",
"type": "main",
"index": 0
}
]
]
},
"Get Image Binary": {
"main": [
[
{
"node": "Upload Image",
"type": "main",
"index": 0
}
]
]
},
"Approval-on-Slack": {
"main": [
[]
]
},
"OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "Linedin-Post-Creator",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Set-Final-Message": {
"main": [
[
{
"node": "Linkedin-User-Detail",
"type": "main",
"index": 0
}
]
]
},
"Upload-Image-data": {
"main": [
[
{
"node": "Get Image Binary",
"type": "main",
"index": 0
}
]
]
},
"Validate-Response": {
"main": [
[
{
"node": "Set-Final-Message",
"type": "main",
"index": 0
}
]
]
},
"Linkedin-Post-Topic": {
"main": [
[
{
"node": "Validate-Status",
"type": "main",
"index": 0
}
]
]
},
"Linedin-Post-Creator": {
"main": [
[
{
"node": "Format-Content",
"type": "main",
"index": 0
}
]
]
},
"Linkedin-User-Detail": {
"main": [
[
{
"node": "Register Image",
"type": "main",
"index": 0
}
]
]
},
"Post-Linkedin-Groups": {
"main": [
[
{
"node": "Pick 1 by 1",
"type": "main",
"index": 0
}
]
]
},
"Structured Output Parser": {
"ai_outputParser": [
[
{
"node": "Linedin-Post-Creator",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"Set Topics and Images for Processing": {
"main": [
[
{
"node": "Format-Response",
"type": "main",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
高级 - 人工智能, 营销
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
LinkedIn 群组发帖
使用 GPT-4o 从电子表格主题自动发布 LinkedIn 更新
If
Code
Limit
+7
13 节点Amit Mehta
人工智能
YouTube 评论抓取器
使用 GPT-4o 的 YouTube 评论抓取与分析器 + 邮件摘要报告
If
Set
Code
+9
18 节点Amit Mehta
人工智能
使用GPT-4o、WordPress和LinkedIn发布自动化RSS内容到博客文章
使用GPT-4o、WordPress和LinkedIn发布自动化RSS内容到博客文章
If
Set
Code
+21
40 节点Immanuel
人工智能
使用 GPT-4 自动生成并分发 LinkedIn 帖子到个人资料和群组
使用 GPT-4 自动生成并分发 LinkedIn 帖子到个人资料和群组
If
Code
Limit
+8
14 节点Yaron Been
人工智能
使用AI、ElevenLabs和多平台发布创建和审批POV视频
使用AI、ElevenLabs和多平台发布创建和审批POV视频(TikTok/IG/YT)
If
Set
Code
+20
60 节点Immanuel
设计
(Duc)深度研究市场模板
集成PerplexityAI研究和OpenAI内容的多层级WordPress博客生成器
If
Set
Xml
+28
132 节点Daniel Ng
人工智能
工作流信息
难度等级
高级
节点数量32
分类2
节点类型14
作者
Amit Mehta
@amitswbaI'm a workflow automation expert with 15+ years in IT industry. I build smart, scalable n8n workflows for AI automation, marketing, CRM, and SaaS integrations. My focus is on simplifying business processes with tools like OpenAI, WhatsApp, Gmail, and Airtable. I help teams and solopreneurs automate smarter, reduce manual tasks, and grow faster—one workflow at a time.
外部链接
在 n8n.io 查看 →
分享此工作流