Skip to main content
Glama
mlaurel

Structured Workflow Engine MCP Server

by mlaurel
ba-agent-workflow.json16.7 kB
{ "name": "BA Agent Telegram Bot", "nodes": [ { "parameters": { "updates": ["message"], "options": { "downloadImages": false, "downloadFiles": false } }, "id": "telegram-trigger", "name": "Telegram Bot Trigger", "type": "n8n-nodes-base.telegramTrigger", "typeVersion": 1, "position": [120, 300], "webhookId": "telegram-webhook", "credentials": { "telegramApi": { "id": "telegram-bot-credentials", "name": "Telegram Bot" } } }, { "parameters": { "conditions": { "options": { "caseSensitive": false }, "combinator": "and", "conditions": [ { "operator": { "type": "string", "operation": "exists" }, "leftValue": "={{ $json.message.voice }}", "rightValue": "" } ] } }, "id": "check-voice-message", "name": "Voice Message?", "type": "n8n-nodes-base.if", "typeVersion": 2, "position": [320, 300] }, { "parameters": { "conditions": { "options": { "caseSensitive": false }, "combinator": "and", "conditions": [ { "operator": { "type": "string", "operation": "exists" }, "leftValue": "={{ $json.message.text }}", "rightValue": "" } ] } }, "id": "check-text-message", "name": "Text Message?", "type": "n8n-nodes-base.if", "typeVersion": 2, "position": [320, 500] }, { "parameters": { "url": "=https://api.telegram.org/bot{{ $('Telegram Bot Trigger').item.json.bot_token }}/getFile?file_id={{ $json.message.voice.file_id }}", "options": {} }, "id": "get-voice-file-path", "name": "Get Voice File Path", "type": "n8n-nodes-base.httpRequest", "typeVersion": 4.2, "position": [520, 200] }, { "parameters": { "url": "=https://api.telegram.org/file/bot{{ $('Telegram Bot Trigger').item.json.bot_token }}/{{ $json.result.file_path }}", "options": { "response": { "response": { "neverError": true, "responseFormat": "file" } } } }, "id": "download-voice-file", "name": "Download Voice File", "type": "n8n-nodes-base.httpRequest", "typeVersion": 4.2, "position": [720, 200] }, { "parameters": { "resource": "audio", "operation": "transcribe", "binaryPropertyName": "data", "options": { "language": "auto", "temperature": 0 } }, "id": "transcribe-voice", "name": "Transcribe Voice", "type": "n8n-nodes-base.openAi", "typeVersion": 1.3, "position": [920, 200], "credentials": { "openAiApi": { "id": "openai-credentials", "name": "OpenAI" } } }, { "parameters": { "operation": "text", "text": "={{ $json.text || $('Telegram Bot Trigger').item.json.message.text }}" }, "id": "prepare-text-input", "name": "Prepare Text Input", "type": "n8n-nodes-base.set", "typeVersion": 3.4, "position": [520, 400] }, { "parameters": { "conditions": { "options": { "caseSensitive": false }, "combinator": "or", "conditions": [ { "operator": { "type": "string", "operation": "contains" }, "leftValue": "={{ $json.text.toLowerCase() }}", "rightValue": "brd" }, { "operator": { "type": "string", "operation": "contains" }, "leftValue": "={{ $json.text.toLowerCase() }}", "rightValue": "business requirements" }, { "operator": { "type": "string", "operation": "contains" }, "leftValue": "={{ $json.text.toLowerCase() }}", "rightValue": "research" } ] } }, "id": "route-brd", "name": "Route to BRD?", "type": "n8n-nodes-base.if", "typeVersion": 2, "position": [720, 400] }, { "parameters": { "conditions": { "options": { "caseSensitive": false }, "combinator": "or", "conditions": [ { "operator": { "type": "string", "operation": "contains" }, "leftValue": "={{ $json.text.toLowerCase() }}", "rightValue": "trd" }, { "operator": { "type": "string", "operation": "contains" }, "leftValue": "={{ $json.text.toLowerCase() }}", "rightValue": "technical requirements" }, { "operator": { "type": "string", "operation": "contains" }, "leftValue": "={{ $json.text.toLowerCase() }}", "rightValue": "architecture" } ] } }, "id": "route-trd", "name": "Route to TRD?", "type": "n8n-nodes-base.if", "typeVersion": 2, "position": [720, 600] }, { "parameters": { "sessionIdType": "customKey", "sessionKey": "={{ $('Telegram Bot Trigger').item.json.message.from.id }}", "systemMessage": "=You are <b>Sophia</b>, a brilliant and witty Business Analyst with a sense of humor. You're a female character who combines professional expertise with personality.\n\n📅 <b>Today is:</b> {{ DateTime.fromISO($now).toLocaleString(DateTime.DATETIME_FULL) }}\n👤 <b>User:</b> {{ $('Telegram Bot Trigger').item.json.message.from.first_name }}\n\n<b>🎯 CORE PERSONALITY:</b>\n• Professional yet approachable\n• Witty with dry humor\n• Detail-oriented but not overwhelming\n• Empathetic to business challenges\n• Confident in BA expertise\n\n<b>📋 TELEGRAM FORMATTING:</b>\nAlways use HTML formatting in responses:\n• <b>Bold</b> for emphasis\n• <i>Italic</i> for subtle points\n• <code>Code</code> for technical terms\n• <pre>Code blocks</pre> for longer code\n• Use emojis appropriately 🚀\n\n<b>🧠 MEMORY:</b>\nRemember our conversation history and reference past discussions when relevant.\n\n<b>🔄 WORKFLOW GUIDANCE:</b>\n• For BRD requests: Guide users through business requirements gathering\n• For TRD requests: Focus on technical specifications\n• For general chat: Be helpful and engaging with BA insights", "text": "={{ $json.text }}" }, "id": "brd-agent", "name": "BRD Agent (Sophia)", "type": "n8n-nodes-langchain.agent", "typeVersion": 1.6, "position": [920, 300], "credentials": { "openAiApi": { "id": "openai-credentials", "name": "OpenAI" } } }, { "parameters": { "sessionIdType": "customKey", "sessionKey": "={{ $('Telegram Bot Trigger').item.json.message.from.id }}", "systemMessage": "=You are <b>Sophia</b>, a brilliant and witty Business Analyst specializing in Technical Requirements Documents.\n\n📅 <b>Today is:</b> {{ DateTime.fromISO($now).toLocaleString(DateTime.DATETIME_FULL) }}\n👤 <b>User:</b> {{ $('Telegram Bot Trigger').item.json.message.from.first_name }}\n\n<b>🎯 TRD FOCUS:</b>\n• Create detailed technical specifications\n• Define system architecture requirements\n• Specify data models and API requirements\n• Outline implementation guidelines\n• Include testing and deployment criteria\n\n<b>📋 TELEGRAM FORMATTING:</b>\nAlways use HTML formatting:\n• <b>Bold</b> for section headers\n• <i>Italic</i> for notes\n• <code>Code</code> for technical terms\n• <pre>Code blocks</pre> for specifications\n\n<b>📄 TRD TEMPLATE STRUCTURE:</b>\n1. Project Overview\n2. Technical Architecture\n3. Data Requirements\n4. API Specifications\n5. Security Requirements\n6. Performance Criteria\n7. Testing Strategy\n8. Deployment Plan", "text": "={{ $json.text }}" }, "id": "trd-agent", "name": "TRD Agent (Sophia)", "type": "n8n-nodes-langchain.agent", "typeVersion": 1.6, "position": [920, 500], "credentials": { "openAiApi": { "id": "openai-credentials", "name": "OpenAI" } } }, { "parameters": { "sessionIdType": "customKey", "sessionKey": "={{ $('Telegram Bot Trigger').item.json.message.from.id }}", "systemMessage": "=You are <b>Sophia</b>, a brilliant and witty Business Analyst with personality and humor.\n\n📅 <b>Today is:</b> {{ DateTime.fromISO($now).toLocaleString(DateTime.DATETIME_FULL) }}\n👤 <b>User:</b> {{ $('Telegram Bot Trigger').item.json.message.from.first_name }}\n\n<b>🎯 CHAT MODE:</b>\n• Engage in natural conversation\n• Provide BA insights and advice\n• Share industry knowledge with humor\n• Remember our conversation history\n• Be helpful but entertaining\n\n<b>📋 TELEGRAM FORMATTING:</b>\nAlways format responses with HTML:\n• <b>Bold</b> for emphasis\n• <i>Italic</i> for subtle humor\n• <code>Code</code> for technical terms\n• Use relevant emojis 😊\n\n<b>💬 CONVERSATION STYLE:</b>\n• Professional but friendly\n• Inject appropriate humor\n• Reference previous conversations\n• Ask engaging follow-up questions\n• Provide valuable BA perspectives", "text": "={{ $json.text }}" }, "id": "chat-agent", "name": "Chat Agent (Sophia)", "type": "n8n-nodes-langchain.agent", "typeVersion": 1.6, "position": [920, 700], "credentials": { "openAiApi": { "id": "openai-credentials", "name": "OpenAI" } } }, { "parameters": { "chatId": "={{ $('Telegram Bot Trigger').item.json.message.chat.id }}", "text": "={{ $json.output.replace(/&/g, '&amp;').replace(/>/g, '&gt;').replace(/</g, '&lt;').replace(/\"/g, '&quot;') }}", "additionalFields": { "parse_mode": "HTML", "appendAttribution": false } }, "id": "send-response", "name": "Send Response", "type": "n8n-nodes-base.telegram", "typeVersion": 1.2, "position": [1120, 400], "credentials": { "telegramApi": { "id": "telegram-bot-credentials", "name": "Telegram Bot" } } }, { "parameters": { "chatId": "={{ $('Telegram Bot Trigger').item.json.message.chat.id }}", "text": "🤖 <i>Oops! Something went wrong while processing your message. Sophia is taking a coffee break! ☕</i>\n\nPlease try again in a moment.", "additionalFields": { "parse_mode": "HTML", "appendAttribution": false } }, "id": "send-error", "name": "Send Error Response", "type": "n8n-nodes-base.telegram", "typeVersion": 1.2, "position": [1120, 600], "credentials": { "telegramApi": { "id": "telegram-bot-credentials", "name": "Telegram Bot" } } }, { "parameters": { "memoryKey": "ba_conversations", "sessionIdType": "customKey", "sessionKey": "={{ $('Telegram Bot Trigger').item.json.message.from.id }}" }, "id": "vector-memory", "name": "Vector Memory Store", "type": "n8n-nodes-langchain.vectorStoreInMemory", "typeVersion": 1, "position": [720, 800] }, { "parameters": { "model": "gpt-4o", "options": { "temperature": 0.7, "maxTokens": 2000 } }, "id": "language-model", "name": "OpenAI Language Model", "type": "n8n-nodes-langchain.lmOpenAi", "typeVersion": 1, "position": [520, 800], "credentials": { "openAiApi": { "id": "openai-credentials", "name": "OpenAI" } } } ], "connections": { "Telegram Bot Trigger": { "main": [ [ { "node": "Voice Message?", "type": "main", "index": 0 }, { "node": "Text Message?", "type": "main", "index": 0 } ] ] }, "Voice Message?": { "main": [ [ { "node": "Get Voice File Path", "type": "main", "index": 0 } ] ] }, "Text Message?": { "main": [ [ { "node": "Prepare Text Input", "type": "main", "index": 0 } ] ] }, "Get Voice File Path": { "main": [ [ { "node": "Download Voice File", "type": "main", "index": 0 } ] ] }, "Download Voice File": { "main": [ [ { "node": "Transcribe Voice", "type": "main", "index": 0 } ] ] }, "Transcribe Voice": { "main": [ [ { "node": "Prepare Text Input", "type": "main", "index": 0 } ] ] }, "Prepare Text Input": { "main": [ [ { "node": "Route to BRD?", "type": "main", "index": 0 }, { "node": "Route to TRD?", "type": "main", "index": 0 } ] ] }, "Route to BRD?": { "main": [ [ { "node": "BRD Agent (Sophia)", "type": "main", "index": 0 } ], [ { "node": "Chat Agent (Sophia)", "type": "main", "index": 0 } ] ] }, "Route to TRD?": { "main": [ [ { "node": "TRD Agent (Sophia)", "type": "main", "index": 0 } ], [ { "node": "Chat Agent (Sophia)", "type": "main", "index": 0 } ] ] }, "BRD Agent (Sophia)": { "main": [ [ { "node": "Send Response", "type": "main", "index": 0 } ] ] }, "TRD Agent (Sophia)": { "main": [ [ { "node": "Send Response", "type": "main", "index": 0 } ] ] }, "Chat Agent (Sophia)": { "main": [ [ { "node": "Send Response", "type": "main", "index": 0 } ] ] }, "Language Model": { "ai_languageModel": [ [ { "node": "BRD Agent (Sophia)", "type": "ai_languageModel", "index": 0 }, { "node": "TRD Agent (Sophia)", "type": "ai_languageModel", "index": 0 }, { "node": "Chat Agent (Sophia)", "type": "ai_languageModel", "index": 0 } ] ] }, "Vector Memory Store": { "ai_memory": [ [ { "node": "BRD Agent (Sophia)", "type": "ai_memory", "index": 0 }, { "node": "TRD Agent (Sophia)", "type": "ai_memory", "index": 0 }, { "node": "Chat Agent (Sophia)", "type": "ai_memory", "index": 0 } ] ] } }, "pinData": {}, "settings": { "executionOrder": "v1" }, "staticData": null, "tags": [ { "createdAt": "2024-01-15T10:00:00.000Z", "updatedAt": "2024-01-15T10:00:00.000Z", "id": "ba-agent-tag", "name": "BA Agent" } ], "triggerCount": 1, "updatedAt": "2024-01-15T10:00:00.000Z", "versionId": "1" }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mlaurel/mcp-workflow-engine'

If you have feedback or need assistance with the MCP directory API, please join our Discord server