{ "name": "Social Ads", "nodes": [ { "parameters": { "model": { "__rl": true, "mode": "list", "value": "gpt-4o", "cachedResultName": "gpt-4o" }, "options": {} }, "id": "5b2e2efd-32ab-4b6c-95cf-bfc73635ea2c", "name": "OpenAI Chat Model", "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi", "position": [ 600, 80 ], "typeVersion": 1.2, "credentials": { "openAiApi": { "id": "uzyuJ5c9nml2NneC", "name": "OpenAi account" } } }, { "parameters": { "sessionIdType": "customKey", "sessionKey": "={{ $('Set Web Input').item.json.body.sessionId }}", "contextWindowLength": 50 }, "id": "4240c19f-d502-43de-ab9a-3be9faa27bc3", "name": "Simple Memory", "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow", "position": [ 780, 100 ], "typeVersion": 1.3 }, { "parameters": { "promptType": "define", "text": "={{ $json.body.message.text }}", "options": { "systemMessage": "=You are an expert social media advertiser. Your task is to craft catchy social media ad copy based on the input provided. Each ad must capture attention instantly, using concise and persuasive messaging that motivates action. Focus on highlighting key benefits, unique selling points, or emotional triggers relevant to the input. Keep the tone engaging, positive, and tailored to the target audience. Avoid fluff and ensure the message is clear and impactful.\n\nFormat your response as follows:\n\nAd Copy:\n[Your concise, persuasive ad copy here]\n\nIf appropriate, include a strong call-to-action. Do not use hashtags or emojis unless specifically requested." } }, "id": "8da21f34-ffaf-451b-8896-633fe84fa8ae", "name": "AI Agent", "type": "@n8n/n8n-nodes-langchain.agent", "position": [ 640, -180 ], "typeVersion": 1.9 }, { "parameters": { "chatId": "={{$('Telegram Trigger').first().json.message.chat.id}}", "text": "={{ $json.output }}", "additionalFields": { "appendAttribution": false } }, "id": "dbd609e5-dbd9-45c6-ae80-687bcf21d857", "name": "Send Response To Telegram", "type": "n8n-nodes-base.telegram", "position": [ 1160, -300 ], "webhookId": "61937a8f-9757-40da-8ddb-c32b90ce1541", "typeVersion": 1.2, "disabled": true }, { "parameters": { "httpMethod": "POST", "path": "2dc234d8-7217-454a-83e9-81afe5b4fe2d", "responseMode": "responseNode", "options": {} }, "name": "Webhook", "type": "n8n-nodes-base.webhook", "typeVersion": 1, "position": [ 180, -40 ], "id": "9ceb26d2-34d9-41bc-9cdc-e318b8c5d174", "webhookId": "2dc234d8-7217-454a-83e9-81afe5b4fe2d" }, { "parameters": { "options": {} }, "name": "Set Web Input", "type": "n8n-nodes-base.set", "typeVersion": 1, "position": [ 380, -60 ], "id": "aecc9c8d-710e-4df9-98f4-ae886e18d3f0" }, { "parameters": { "options": {} }, "name": "Respond to Web", "type": "n8n-nodes-base.respondToWebhook", "typeVersion": 1, "position": [ 1160, 60 ], "id": "8b0d18bf-0c13-44d4-bf92-b3509cbb3c8a" }, { "parameters": { "formTitle": "Social Ads", "formFields": { "values": [ { "fieldLabel": "Describe what you'd like to generate", "fieldType": "textarea" }, { "fieldLabel": "Include Emoji", "fieldType": "dropdown", "fieldOptions": { "values": [ { "option": "Yes" }, { "option": "No" } ] } }, { "fieldLabel": "For Social Media Platform", "fieldType": "dropdown", "fieldOptions": { "values": [ { "option": "Facebook" }, { "option": "Instagram" }, { "option": "LinkedIn" }, { "option": "X (Twitter)" } ] } }, { "fieldLabel": "Language" } ] }, "options": {} }, "type": "n8n-nodes-base.formTrigger", "typeVersion": 2.2, "position": [ 200, -380 ], "id": "92974cef-cb9a-42cb-9054-8989cae4d37b", "name": "On form submission", "webhookId": "2daa7ed9-6823-4eea-8ce8-e0dfdfb1110d", "disabled": true } ], "pinData": {}, "connections": { "AI Agent": { "main": [ [ { "node": "Respond to Web", "type": "main", "index": 0 } ] ] }, "Simple Memory": { "ai_memory": [ [ { "node": "AI Agent", "type": "ai_memory", "index": 0 } ] ] }, "OpenAI Chat Model": { "ai_languageModel": [ [ { "node": "AI Agent", "type": "ai_languageModel", "index": 0 } ] ] }, "Webhook": { "main": [ [ { "node": "Set Web Input", "type": "main", "index": 0 } ] ] }, "Set Web Input": { "main": [ [ { "node": "AI Agent", "type": "main", "index": 0 } ] ] }, "On form submission": { "main": [ [] ] } }, "active": true, "settings": { "executionOrder": "v1" }, "versionId": "68aa150a-4be4-4922-b387-76f721c65295", "meta": { "templateCredsSetupCompleted": true, "instanceId": "b419dceeef095c7882b7f3bc7ba03f620c77ec1f3d9d0518174b97d631dd49fa" }, "id": "d1bIXx3TKRtmdhpB", "tags": [ { "createdAt": "2025-07-01T13:54:51.754Z", "updatedAt": "2025-07-01T13:54:51.754Z", "id": "2ji4EAexY8bmiTeM", "name": "AI Agent" } ] }