基于OpenAI的AI发型预览生成器与LINE群组分享
中级
这是一个Content Creation, Multimodal AI领域的自动化工作流,包含 8 个节点。主要使用 Webhook, FormTrigger, HttpRequest, ConvertToFile 等节点。 基于OpenAI的AI发型预览生成器与LINE群组分享
前置要求
- •HTTP Webhook 端点(n8n 会自动生成)
- •可能需要目标 API 的认证凭证
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"id": "3nvbG23fEvkCCBSy",
"meta": {
"instanceId": "9101df148a9ab5ba09dd343a0c584806dbd6c3b74e74be8e97699184269b6877",
"templateCredsSetupCompleted": true
},
"name": "export_hairstyle-preview",
"tags": [],
"nodes": [
{
"id": "b6cf5de7-a5ef-47ae-9423-1c4afe97888e",
"name": "表单提交时",
"type": "n8n-nodes-base.formTrigger",
"position": [
-144,
0
],
"webhookId": "3445cfdf-3bc9-4548-bd5c-bf5d20e7b089",
"parameters": {
"options": {},
"formTitle": "Hairstyle Preview",
"formFields": {
"values": [
{
"fieldType": "file",
"fieldLabel": "pic",
"multipleFiles": false,
"requiredField": true
},
{
"fieldType": "textarea",
"fieldLabel": "content",
"requiredField": true
}
]
},
"authentication": "basicAuth"
},
"credentials": {
"httpBasicAuth": {
"id": "2Xi9J8KKgilhioyb",
"name": "Unnamed credential"
}
},
"typeVersion": 2.2
},
{
"id": "ebb4764a-c163-4d9b-a2b7-65d64e1f4acd",
"name": "Create Image",
"type": "n8n-nodes-base.httpRequest",
"position": [
96,
0
],
"parameters": {
"url": "https://api.openai.com/v1/images/edits",
"method": "POST",
"options": {},
"sendBody": true,
"contentType": "multipart-form-data",
"authentication": "predefinedCredentialType",
"bodyParameters": {
"parameters": [
{
"name": "prompt",
"value": "=Keep the person's face exactly the same as in the input image. Do not alter or replace the face. \nOnly modify the hairstyle. Make sure the hairstyle looks natural and realistic. \nThe overall identity of the person must remain unchanged.\n\nUser request: {{ $json.content }}"
},
{
"name": "model",
"value": "gpt-image-1"
},
{
"name": "size",
"value": "1024x1536"
},
{
"name": "image",
"parameterType": "formBinaryData",
"inputDataFieldName": "pic"
},
{
"name": "quality",
"value": "high"
}
]
},
"nodeCredentialType": "openAiApi"
},
"credentials": {
"openAiApi": {
"id": "mO23EZGRXh9cFi9G",
"name": "OpenAi account 2"
}
},
"typeVersion": 4.2
},
{
"id": "1156faf1-46ee-45ab-ac91-0325f735be62",
"name": "转换为文件",
"type": "n8n-nodes-base.convertToFile",
"position": [
336,
0
],
"parameters": {
"options": {},
"operation": "toBinary",
"sourceProperty": "data[0].b64_json"
},
"typeVersion": 1.1
},
{
"id": "ae98386d-cc94-49dd-a8dd-7a042f976fd8",
"name": "上传图像",
"type": "n8n-nodes-base.httpRequest",
"position": [
592,
0
],
"parameters": {
"url": "https://api.cloudinary.com/v1_1/{{CLOUDINARY_CLOUD_NAME}}/image/upload",
"method": "POST",
"options": {},
"sendBody": true,
"contentType": "multipart-form-data",
"bodyParameters": {
"parameters": [
{
"name": "file",
"parameterType": "formBinaryData",
"inputDataFieldName": "data"
},
{
"name": "upload_preset",
"value": "{{CLOUDINARY_UPLOAD_PRESET}}"
}
]
}
},
"typeVersion": 4.2
},
{
"id": "399838c0-b325-4f28-bf43-ff45a54d54aa",
"name": "LINE 输出",
"type": "n8n-nodes-base.httpRequest",
"position": [
800,
0
],
"parameters": {
"url": "https://api.line.me/v2/bot/message/push",
"method": "POST",
"options": {},
"jsonBody": "={\n\"to\": \"{{LINE_GROUP_ID}}\",\n\"messages\": [\n{\n \"type\": \"image\",\n \"originalContentUrl\": \"{{ $json.secure_url }}\",\n \"previewImageUrl\": \"{{ $json.secure_url }}\"\n}\n]\n} ",
"sendBody": true,
"sendHeaders": true,
"specifyBody": "json",
"headerParameters": {
"parameters": [
{
"name": "Authorization",
"value": "Bearer {{LINE_CHANNEL_TOKEN}}"
},
{
"name": "Content-Type",
"value": "application/json"
}
]
}
},
"typeVersion": 4.2
},
{
"id": "71b229c4-bbf4-4b1a-a463-9898f7a2dee5",
"name": "LINE 输入",
"type": "n8n-nodes-base.webhook",
"position": [
-16,
448
],
"webhookId": "01d98d79-2c96-4a75-a4e1-b2faddb8d0a6",
"parameters": {
"path": "01d98d79-2c96-4a75-a4e1-b2faddb8d0a6",
"options": {},
"httpMethod": "POST"
},
"typeVersion": 2
},
{
"id": "2d679cdf-83b1-4a32-9a15-08ad8ee93de1",
"name": "便签",
"type": "n8n-nodes-base.stickyNote",
"position": [
-784,
-128
],
"parameters": {
"color": 5,
"width": 560,
"height": 896,
"content": "# 发型预览与 LINE 群组分享"
},
"typeVersion": 1
},
{
"id": "49d75f49-9a26-47a4-ae78-37f5db81b08d",
"name": "便签 1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-192,
224
],
"parameters": {
"color": 3,
"width": 464,
"height": 384,
"content": "## 请使用此节点获取 LINE 群组 ID"
},
"typeVersion": 1
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "7b478bb1-7e58-47aa-be3e-f002aa8e404a",
"connections": {
"ebb4764a-c163-4d9b-a2b7-65d64e1f4acd": {
"main": [
[
{
"node": "1156faf1-46ee-45ab-ac91-0325f735be62",
"type": "main",
"index": 0
}
]
]
},
"ae98386d-cc94-49dd-a8dd-7a042f976fd8": {
"main": [
[
{
"node": "399838c0-b325-4f28-bf43-ff45a54d54aa",
"type": "main",
"index": 0
}
]
]
},
"1156faf1-46ee-45ab-ac91-0325f735be62": {
"main": [
[
{
"node": "ae98386d-cc94-49dd-a8dd-7a042f976fd8",
"type": "main",
"index": 0
}
]
]
},
"b6cf5de7-a5ef-47ae-9423-1c4afe97888e": {
"main": [
[
{
"node": "ebb4764a-c163-4d9b-a2b7-65d64e1f4acd",
"type": "main",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
中级 - 内容创作, 多模态 AI
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
导出_dian-memo_03
AI语音与文本笔记 - 集成LINE消息、Supabase向量数据库和Gmail
If
Set
Code
+
If
Set
Code
30 节点kote2
AI RAG 检索增强
从趋势电子表格生成SEO内容到存储(SharePoint/Drive/Dropbox)
使用GPT-4o、FAL AI和多存储支持从趋势自动生成SEO内容
If
Set
Code
+
If
Set
Code
47 节点plemeo
内容创作
开发完成 - 通过Veo3生成产品广告
使用Google Veo 3、Gemini和Airtable自动化AI视频广告生成
Code
Form
Wait
+
Code
Form
Wait
16 节点Intuz
内容创作
使用OpenAI、RunwayML和ElevenLabs自动化无脸短视频
使用OpenAI、RunwayML和ElevenLabs自动化无脸短视频:从脚本到社交媒体
Set
Code
Wait
+
Set
Code
Wait
56 节点LeeWei
内容创作
WordPress博客自动化专业版(深度研究)v2.1市场
使用GPT-4o、Perplexity AI和多语言支持自动化SEO优化的博客创建
If
Set
Xml
+
If
Set
Xml
125 节点Daniel Ng
内容创作
使用 OpenAI、ElevenLabs 和 Fal.ai 自动化病毒式内容创作
使用 OpenAI、ElevenLabs 和 Fal.ai 自动化病毒式内容创作,适用于视频、播客和 ASMR
Set
Code
Wait
+
Set
Code
Wait
97 节点Adam Crafts
内容创作
工作流信息
难度等级
中级
节点数量8
分类2
节点类型5
作者
kote2
@kote2I share practical examples and ideas for AI automation using tools like n8n, explained in a way that’s easy for beginners to understand. While Dify is currently more well-known in Japan, n8n complements it and is expected to gain even more attention in the future. This channel aims to be a practical guide you can rely on when that wave of popularity arrives. That said, I’m still learning too—so let’s learn and grow together!
外部链接
在 n8n.io 查看 →
分享此工作流