{"product_id":"n8n-workflow-ask-sage-x3-sales-stock-via-openrouter-mcp","title":"n8n Workflow: Ask Sage X3 Sales \u0026 Stock via OpenRouter MCP","description":"\u003ch3\u003eAsk Sage X3 Sales \u0026amp; Stock in Natural Language—Powered by OpenRouter and MCP\u003c\/h3\u003e\n\u003cp\u003eThis n8n workflow lets you ask sales, stock, and revenue questions about your \u003cstrong\u003eSage X3\u003c\/strong\u003e database using plain English. An AI agent interprets your request with a Claude model via \u003cstrong\u003eOpenRouter\u003c\/strong\u003e, selects the correct predefined \u003cstrong\u003eSage X3 SQL tools\u003c\/strong\u003e, and returns a concise answer from live Sage X3 data. You can also expose the same tools through an \u003cstrong\u003eMCP endpoint\u003c\/strong\u003e protected by \u003cstrong\u003eBearer authentication\u003c\/strong\u003e.\u003c\/p\u003e\n\n\u003ch3\u003eWhat this workflow does\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eReceives your question\u003c\/strong\u003e through the n8n chat interface.\u003c\/li\u003e\n  \u003cli\u003eUses a \u003cstrong\u003eClaude model on OpenRouter\u003c\/strong\u003e (with conversation memory) to understand intent and support follow-up questions.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eResolves customer and item names to Sage X3 codes\u003c\/strong\u003e by querying Sage X3 reference data when needed.\u003c\/li\u003e\n  \u003cli\u003eRuns \u003cstrong\u003eparameterized SQL tools\u003c\/strong\u003e to retrieve stock levels, stock movements, sales order history, or revenue aggregates\/details.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eFormats a concise response\u003c\/strong\u003e using only the returned Sage X3 data, including \u003cstrong\u003ecurrency\u003c\/strong\u003e and relevant \u003cstrong\u003etime horizon\u003c\/strong\u003e when applicable.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eOptionally exposes the same tools as an MCP server endpoint\u003c\/strong\u003e for MCP clients, using Bearer-auth protection.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eUse cases\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e“How much stock do we have for item X3-123?”\u003c\/li\u003e\n  \u003cli\u003e“Show recent stock movements for customer Y and this time period.”\u003c\/li\u003e\n  \u003cli\u003e“What are the sales order details and revenue for product Z over the last 30 days?”\u003c\/li\u003e\n  \u003cli\u003eEnable an \u003cstrong\u003eMCP client\u003c\/strong\u003e to reuse the same Sage X3 querying tools with standardized access.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eTechnical details\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eNodes \/ integrations:\u003c\/strong\u003e `n8n-nodes-nx3nx3` (Sage X3 SOAP\/SQL tools via community package), LangChain Agent, \u003cstrong\u003eLangChain Chat Trigger\u003c\/strong\u003e, \u003cstrong\u003eLangChain MCP Trigger\u003c\/strong\u003e, and \u003cstrong\u003eLangChain LM Chat OpenRouter\u003c\/strong\u003e.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eRequired setup:\u003c\/strong\u003e install `n8n-nodes-nx3`; configure Sage X3 SOAP credentials (server URL, folder, username, password); add an \u003cstrong\u003eOpenRouter API key\u003c\/strong\u003e; set up \u003cstrong\u003eBearer Auth\u003c\/strong\u003e for the MCP endpoint path.\u003c\/li\u003e\n\u003c\/ul\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":45824202703027,"sku":"N8N-18168","price":17.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/F7ly6al9vvhyphUSlOgFP_oh37Xtv0.png?v=1786612279","url":"https:\/\/buyflowscripts.com\/products\/n8n-workflow-ask-sage-x3-sales-stock-via-openrouter-mcp","provider":"N8N Commerce","version":"1.0","type":"link"}