i have been trying to make it work but its not working i am new to this what am i doing wrong
Preformatted text
{“name”: “My workflow”,
“nodes”: [
{
“parameters”: {
“updates”: [
“message”
],
“additionalFields”: {}
},
“type”: “n8n-nodes-base.telegramTrigger”,
“typeVersion”: 1.2,
“position”: [
-620,
-160
],
“id”: “3abb45e4-38e3-481e-b667-1325a984919a”,
“name”: “Telegram Trigger”,
“webhookId”: “97954b59-02c2-4a70-a580-4ad906c1bd60”,
“credentials”: {
“telegramApi”: {
“id”: “JMD8T4LAIXT70eue”,
“name”: “Telegram account”
}
}
},
{
“parameters”: {
“assignments”: {
“assignments”: [
{
“id”: “f16e2015-09f0-4760-ac17-611cf36a0e81”,
“name”: “prompt_text”,
“value”: “={{ $json.message.text }}”,
“type”: “string”
}
]
},
“options”: {}
},
“type”: “n8n-nodes-base.set”,
“typeVersion”: 3.4,
“position”: [
-400,
-140
],
“id”: “5da3be9b-9358-46e8-8055-bd6ff8901ec3”,
“name”: “Edit Fields”
},
{
“parameters”: {
“resource”: “image”,
“model”: “dall-e-2”,
“prompt”: “={{ $json.prompt_text }}”,
“options”: {
“size”: “1024x1024”,
“returnImageUrls”: true
}
},
“type”: “@n8n/n8n-nodes-langchain.openAi”,
“typeVersion”: 1.8,
“position”: [
-200,
-120
],
“id”: “67eae6ed-0ff1-44ca-a151-629e1cd6f1b3”,
“name”: “Generate an image”,
“credentials”: {
“openAiApi”: {
“id”: “juz9hkkZ8qAWuUwn”,
“name”: “OpenAi account 2”
}
}
},
{
“parameters”: {
“modelId”: {
“__rl”: true,
“value”: “gpt-3.5-turbo”,
“mode”: “list”,
“cachedResultName”: “GPT-3.5-TURBO”
},
“messages”: {
“values”: [
{}
]
},
“options”: {}
},
“type”: “@n8n/n8n-nodes-langchain.openAi”,
“typeVersion”: 1.8,
“position”: [
-20,
-40
],
“id”: “8d3000dd-abe4-4b72-a461-bd5456f2688c”,
“name”: “Message a model”,
“credentials”: {
“openAiApi”: {
“id”: “IG1qbvcfcwdUKAii”,
“name”: “OpenAi account”
}
}
}
],
“pinData”: {},
“connections”: {
“Telegram Trigger”: {
“main”: [
[
{
“node”: “Edit Fields”,
“type”: “main”,
“index”: 0
}
]
]
},
“Edit Fields”: {
“main”: [
[
{
“node”: “Generate an image”,
“type”: “main”,
“index”: 0
}
]
]
},
“Generate an image”: {
“main”: [
[
{
“node”: “Message a model”,
“type”: “main”,
“index”: 0
}
]
]
}
},
“active”: false,
“settings”: {
“executionOrder”: “v1”
},
“versionId”: “a0dc949f-5a34-48a2-8dd5-104cf5c233cf”,
“meta”: {
“templateCredsSetupCompleted”: true,
“instanceId”: “a86ee42821dbe0f1770a58ddc0c386bea76a090e78c7ec47f62b1492aa44f386”
},
“id”: “pVosBmrYEYV0dq3M”,
“tags”:
}