{"id": "heyKyETy1uK0xoX4", "name": "Optimize Prompt", "nodes": [{"id": "a58be0f5-d11d-4bec-bd8c-0c3a7325b22b", "name": "When Executed by Another Workflow", "type": "n8n-nodes-base.executeWorkflowTrigger", "position": [-1880, 820], "parameters": {"inputSource": "passthrough"}, "typeVersion": 1.1}, {"id": "67fe408f-e889-4eeb-9e48-f60a579c69f0", "name": "AI Agent", "type": "@n8n/n8n-nodes-langchain.agent", "position": [-1600, 720], "parameters": {"text": "={{ $json.query }}", "options": {"systemMessage": "Given the user's initial prompt below, please enhance it. Start with a clear, precise instruction at the beginning. Include specific details about the desired context, outcome, length, format, and style. Provide examples of the desired output format, if applicable. Use appropriate leading words or phrases to guide the desired output, especially for code generation. Avoid any vague or imprecise language. Rather than only stating what not to do, provide guidance on what should be done instead. Ensure the revised prompt remains true to the user's original intent. Do not provide examples of desired prompt format, only describe it. Format your response in markdown."}, "promptType": "define", "hasOutputParser": true}, "typeVersion": 1.7}, {"id": "8a041b31-1873-4559-96d0-35d313bffbbd", "name": "Telegram3", "type": "n8n-nodes-base.telegram", "onError": "continueErrorOutput", "position": [-1000, 820], "webhookId": "4f57022f-14cf-4c3e-b810-ae9395bf3d04", "parameters": {"text": "={{ $json.text }}", "chatId": "={{ $('When Executed by Another Workflow').item.json.chat_id }}", "additionalFields": {}}, "credentials": {"telegramApi": {"id": "Vh36aBswWhClYxBM", "name": "Telegram account 2"}}, "typeVersion": 1.1}, {"id": "5161b177-0663-41c5-b778-ac14756f699c", "name": "OpenAI Chat Model", "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi", "position": [-1680, 860], "parameters": {"model": {"__rl": true, "mode": "list", "value": "gpt-4o-mini"}, "options": {}}, "credentials": {"openAiApi": {"id": "vIXW5likFrTSZUgz", "name": "Litellm-account"}}, "typeVersion": 1.2}, {"id": "d5f36955-74a0-4a9a-b49d-0230d6ee35bf", "name": "Split into chunks1", "type": "n8n-nodes-base.code", "position": [-1180, 820], "parameters": {"jsCode": "// Get the entire output of the previous node\nlet text = $input.all()