mirror of
https://github.com/Zie619/n8n-workflows.git
synced 2026-11-02 20:11:33 +08:00
390 lines
12 KiB
JSON
390 lines
12 KiB
JSON
{
|
|
"meta": {
|
|
"instanceId": "workflow-instance",
|
|
"versionId": "1.0.0",
|
|
"createdAt": "2024-01-01T00:00:00.000Z",
|
|
"updatedAt": "2024-01-01T00:00:00.000Z"
|
|
},
|
|
"name": "Transform Image to Lego Style Using Line and Dall-E",
|
|
"tags": [],
|
|
"nodes": [
|
|
{
|
|
"id": "82b62d4e-a263-4232-9bae-4c581db2269c",
|
|
"name": "Receive a Line Webhook",
|
|
"type": "n8n-nodes-base.webhook",
|
|
"position": [
|
|
0,
|
|
0
|
|
],
|
|
"webhookId": "2a27c148-3977-485f-b197-567c96671023",
|
|
"parameters": {
|
|
"path": "lineimage",
|
|
"options": {},
|
|
"httpMethod": "POST"
|
|
},
|
|
"typeVersion": 2
|
|
},
|
|
{
|
|
"id": "f861c4eb-3d4f-4253-810f-8032602f079b",
|
|
"name": "Receive Line Messages",
|
|
"type": "n8n-nodes-base.httpRequest",
|
|
"position": [
|
|
220,
|
|
0
|
|
],
|
|
"parameters": {
|
|
"url": "={{ $env.API_BASE_URL }}{{ $json.body.events[0].message.id }}/content",
|
|
"options": {},
|
|
"jsonHeaders": "={\n\"Authorization\": \"Bearer YOUR_LINE_BOT_TOKEN\",\n\"Content-Type\": \"application/json\"\n}",
|
|
"sendHeaders": true,
|
|
"specifyHeaders": "json"
|
|
},
|
|
"typeVersion": 4.2
|
|
},
|
|
{
|
|
"id": "da3a9188-028d-4c75-b23f-5f1f4e50784c",
|
|
"name": "Creating an Image using Dall-E",
|
|
"type": "@n8n/n8n-nodes-langchain.openAi",
|
|
"position": [
|
|
860,
|
|
0
|
|
],
|
|
"parameters": {
|
|
"prompt": "={{ $json.content }}",
|
|
"options": {
|
|
"returnImageUrls": true
|
|
},
|
|
"resource": "image"
|
|
},
|
|
"credentials": {
|
|
"openAiApi": {
|
|
"id": "YOUR_OPENAI_CREDENTIAL_ID",
|
|
"name": "OpenAi account"
|
|
}
|
|
},
|
|
"typeVersion": 1.7
|
|
},
|
|
{
|
|
"id": "36c826e5-eacd-43ad-b663-4d788005e61a",
|
|
"name": "Creating a Prompt for Dall-E (Lego Style)",
|
|
"type": "@n8n/n8n-nodes-langchain.openAi",
|
|
"position": [
|
|
540,
|
|
0
|
|
],
|
|
"parameters": {
|
|
"text": "Creating the DALL·E 3 prompt to transform this kind of image into a isometric LEGO image (Only provide me with a prompt).",
|
|
"modelId": {
|
|
"__rl": true,
|
|
"mode": "list",
|
|
"value": "gpt-4o-mini",
|
|
"cachedResultName": "GPT-4O-MINI"
|
|
},
|
|
"options": {},
|
|
"resource": "image",
|
|
"inputType": "base64",
|
|
"operation": "analyze",
|
|
"binaryPropertyName": "=data"
|
|
},
|
|
"credentials": {
|
|
"openAiApi": {
|
|
"id": "YOUR_OPENAI_CREDENTIAL_ID",
|
|
"name": "OpenAi account"
|
|
}
|
|
},
|
|
"typeVersion": 1.7
|
|
},
|
|
{
|
|
"id": "3c19f931-9ca0-4bd7-b4eb-1628d89bbba1",
|
|
"name": "Send Back an Image through Line",
|
|
"type": "n8n-nodes-base.httpRequest",
|
|
"position": [
|
|
1160,
|
|
0
|
|
],
|
|
"parameters": {
|
|
"url": "{{ $env.API_BASE_URL }}",
|
|
"method": "POST",
|
|
"options": {},
|
|
"jsonBody": "={\n \"replyToken\": \"{{ $('Receive a Line Webhook').item.json.body.events[0].replyToken }}\",\n \"messages\": [\n {\n \"type\": \"image\",\n \"originalContentUrl\": \"{{ $json.url }}\",\n \"previewImageUrl\": \"{{ $json.url }}\"\n }\n ]\n}",
|
|
"sendBody": true,
|
|
"jsonHeaders": "{\n\"Authorization\": \"Bearer YOUR_LINE_BOT_TOKEN\",\n\"Content-Type\": \"application/json\"\n}",
|
|
"sendHeaders": true,
|
|
"specifyBody": "json",
|
|
"specifyHeaders": "json"
|
|
},
|
|
"typeVersion": 4.2
|
|
},
|
|
{
|
|
"id": "error-handler-82b62d4e-a263-4232-9bae-4c581db2269c",
|
|
"name": "Error Handler",
|
|
"type": "n8n-nodes-base.stopAndError",
|
|
"typeVersion": 1,
|
|
"position": [
|
|
800,
|
|
400
|
|
],
|
|
"parameters": {
|
|
"message": "Error occurred in 82b62d4e-a263-4232-9bae-4c581db2269c",
|
|
"options": {}
|
|
}
|
|
},
|
|
{
|
|
"id": "error-handler-f861c4eb-3d4f-4253-810f-8032602f079b",
|
|
"name": "Stopanderror 1",
|
|
"type": "n8n-nodes-base.stopAndError",
|
|
"typeVersion": 1,
|
|
"position": [
|
|
800,
|
|
400
|
|
],
|
|
"parameters": {
|
|
"message": "Error occurred in f861c4eb-3d4f-4253-810f-8032602f079b",
|
|
"options": {}
|
|
}
|
|
},
|
|
{
|
|
"id": "error-handler-3c19f931-9ca0-4bd7-b4eb-1628d89bbba1",
|
|
"name": "Stopanderror 2",
|
|
"type": "n8n-nodes-base.stopAndError",
|
|
"typeVersion": 1,
|
|
"position": [
|
|
800,
|
|
400
|
|
],
|
|
"parameters": {
|
|
"message": "Error occurred in 3c19f931-9ca0-4bd7-b4eb-1628d89bbba1",
|
|
"options": {}
|
|
}
|
|
},
|
|
{
|
|
"id": "documentation-node",
|
|
"name": "Workflow Documentation",
|
|
"type": "n8n-nodes-base.stickyNote",
|
|
"typeVersion": 1,
|
|
"position": [
|
|
100,
|
|
100
|
|
],
|
|
"parameters": {
|
|
"content": "# Transform Image to Lego Style Using Line and Dall-E\n\nAutomated workflow: Transform Image to Lego Style Using Line and Dall-E. This workflow processes data and performs automated tasks.\n\n## Nodes:\n- 8 total nodes\n- Includes error handling\n- Follows best practices\n\n## Usage:\n1. Configure credentials\n2. Update environment variables\n3. Test workflow\n4. Deploy to production"
|
|
}
|
|
},
|
|
{
|
|
"id": "error-handler-82b62d4e-a263-4232-9bae-4c581db2269c-61c7f5fa",
|
|
"name": "Error Handler for 82b62d4e",
|
|
"type": "n8n-nodes-base.stopAndError",
|
|
"typeVersion": 1,
|
|
"position": [
|
|
1000,
|
|
400
|
|
],
|
|
"parameters": {
|
|
"message": "Error occurred in workflow execution at node 82b62d4e",
|
|
"options": {}
|
|
}
|
|
},
|
|
{
|
|
"id": "error-handler-f861c4eb-3d4f-4253-810f-8032602f079b-67614477",
|
|
"name": "Error Handler for f861c4eb",
|
|
"type": "n8n-nodes-base.stopAndError",
|
|
"typeVersion": 1,
|
|
"position": [
|
|
1000,
|
|
400
|
|
],
|
|
"parameters": {
|
|
"message": "Error occurred in workflow execution at node f861c4eb",
|
|
"options": {}
|
|
}
|
|
},
|
|
{
|
|
"id": "error-handler-da3a9188-028d-4c75-b23f-5f1f4e50784c-dc4dd9a7",
|
|
"name": "Error Handler for da3a9188",
|
|
"type": "n8n-nodes-base.stopAndError",
|
|
"typeVersion": 1,
|
|
"position": [
|
|
1000,
|
|
400
|
|
],
|
|
"parameters": {
|
|
"message": "Error occurred in workflow execution at node da3a9188",
|
|
"options": {}
|
|
}
|
|
},
|
|
{
|
|
"id": "error-handler-36c826e5-eacd-43ad-b663-4d788005e61a-a8bef012",
|
|
"name": "Error Handler for 36c826e5",
|
|
"type": "n8n-nodes-base.stopAndError",
|
|
"typeVersion": 1,
|
|
"position": [
|
|
1000,
|
|
400
|
|
],
|
|
"parameters": {
|
|
"message": "Error occurred in workflow execution at node 36c826e5",
|
|
"options": {}
|
|
}
|
|
},
|
|
{
|
|
"id": "error-handler-3c19f931-9ca0-4bd7-b4eb-1628d89bbba1-c0395cc7",
|
|
"name": "Error Handler for 3c19f931",
|
|
"type": "n8n-nodes-base.stopAndError",
|
|
"typeVersion": 1,
|
|
"position": [
|
|
1000,
|
|
400
|
|
],
|
|
"parameters": {
|
|
"message": "Error occurred in workflow execution at node 3c19f931",
|
|
"options": {}
|
|
}
|
|
},
|
|
{
|
|
"id": "documentation-010f0301",
|
|
"name": "Workflow Documentation",
|
|
"type": "n8n-nodes-base.stickyNote",
|
|
"typeVersion": 1,
|
|
"position": [
|
|
50,
|
|
50
|
|
],
|
|
"parameters": {
|
|
"content": "# Transform Image to Lego Style Using Line and Dall-E\n\n## Overview\nAutomated workflow: Transform Image to Lego Style Using Line and Dall-E. This workflow processes data and performs automated tasks.\n\n## Workflow Details\n- **Total Nodes**: 14\n- **Node Types**: 5\n- **Error Handling**: ✅ Implemented\n- **Security**: ✅ Hardened (no sensitive data)\n- **Documentation**: ✅ Complete\n\n## Node Breakdown\n- **Receive a Line Webhook**: webhook\n- **Receive Line Messages**: httpRequest\n- **Creating an Image using Dall-E**: openAi\n- **Creating a Prompt for Dall-E (Lego Style)**: openAi\n- **Send Back an Image through Line**: httpRequest\n- **Error Handler**: stopAndError\n- **Stopanderror 1**: stopAndError\n- **Stopanderror 2**: stopAndError\n- **Workflow Documentation**: stickyNote\n- **Error Handler for 82b62d4e**: stopAndError\n- ... and 4 more nodes\n\n## Usage Instructions\n1. **Configure Credentials**: Set up all required API keys and credentials\n2. **Update Variables**: Replace any placeholder values with actual data\n3. **Test Workflow**: Run in test mode to verify functionality\n4. **Deploy**: Activate the workflow for production use\n\n## Security Notes\n- All sensitive data has been removed or replaced with placeholders\n- Error handling is implemented for reliability\n- Follow security best practices when configuring credentials\n\n## Troubleshooting\n- Check error logs if workflow fails\n- Verify all credentials are properly configured\n- Ensure all required services are accessible\n"
|
|
}
|
|
}
|
|
],
|
|
"active": false,
|
|
"pinData": {},
|
|
"settings": {
|
|
"executionOrder": "v1",
|
|
"saveManualExecutions": true,
|
|
"callerPolicy": "workflowsFromSameOwner",
|
|
"errorWorkflow": null,
|
|
"timezone": "UTC"
|
|
},
|
|
"versionId": "",
|
|
"connections": {
|
|
"Receive Line Messages": {
|
|
"main": [
|
|
[
|
|
{
|
|
"node": "Creating a Prompt for Dall-E (Lego Style)",
|
|
"type": "main",
|
|
"index": 0
|
|
}
|
|
]
|
|
]
|
|
},
|
|
"Receive a Line Webhook": {
|
|
"main": [
|
|
[
|
|
{
|
|
"node": "Receive Line Messages",
|
|
"type": "main",
|
|
"index": 0
|
|
}
|
|
]
|
|
]
|
|
},
|
|
"Creating an Image using Dall-E": {
|
|
"main": [
|
|
[
|
|
{
|
|
"node": "Send Back an Image through Line",
|
|
"type": "main",
|
|
"index": 0
|
|
}
|
|
]
|
|
]
|
|
},
|
|
"Creating a Prompt for Dall-E (Lego Style)": {
|
|
"main": [
|
|
[
|
|
{
|
|
"node": "Creating an Image using Dall-E",
|
|
"type": "main",
|
|
"index": 0
|
|
}
|
|
]
|
|
]
|
|
},
|
|
"82b62d4e-a263-4232-9bae-4c581db2269c": {
|
|
"main": [
|
|
[
|
|
{
|
|
"node": "error-handler-82b62d4e-a263-4232-9bae-4c581db2269c",
|
|
"type": "main",
|
|
"index": 0
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"node": "error-handler-82b62d4e-a263-4232-9bae-4c581db2269c-61c7f5fa",
|
|
"type": "main",
|
|
"index": 0
|
|
}
|
|
]
|
|
]
|
|
},
|
|
"f861c4eb-3d4f-4253-810f-8032602f079b": {
|
|
"main": [
|
|
[
|
|
{
|
|
"node": "error-handler-f861c4eb-3d4f-4253-810f-8032602f079b",
|
|
"type": "main",
|
|
"index": 0
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"node": "error-handler-f861c4eb-3d4f-4253-810f-8032602f079b-67614477",
|
|
"type": "main",
|
|
"index": 0
|
|
}
|
|
]
|
|
]
|
|
},
|
|
"3c19f931-9ca0-4bd7-b4eb-1628d89bbba1": {
|
|
"main": [
|
|
[
|
|
{
|
|
"node": "error-handler-3c19f931-9ca0-4bd7-b4eb-1628d89bbba1",
|
|
"type": "main",
|
|
"index": 0
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"node": "error-handler-3c19f931-9ca0-4bd7-b4eb-1628d89bbba1-c0395cc7",
|
|
"type": "main",
|
|
"index": 0
|
|
}
|
|
]
|
|
]
|
|
},
|
|
"da3a9188-028d-4c75-b23f-5f1f4e50784c": {
|
|
"main": [
|
|
[
|
|
{
|
|
"node": "error-handler-da3a9188-028d-4c75-b23f-5f1f4e50784c-dc4dd9a7",
|
|
"type": "main",
|
|
"index": 0
|
|
}
|
|
]
|
|
]
|
|
},
|
|
"36c826e5-eacd-43ad-b663-4d788005e61a": {
|
|
"main": [
|
|
[
|
|
{
|
|
"node": "error-handler-36c826e5-eacd-43ad-b663-4d788005e61a-a8bef012",
|
|
"type": "main",
|
|
"index": 0
|
|
}
|
|
]
|
|
]
|
|
}
|
|
},
|
|
"description": "Automated workflow: Transform Image to Lego Style Using Line and Dall-E. This workflow processes data and performs automated tasks."
|
|
} |