{
  "name": "Workflow Domino Mattermost (Example)",
  "nodes": [
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "<webhook-path>",
        "options": {}
      },
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2.1,
      "position": [
        -1180,
        -360
      ],
      "id": "11111111-1111-1111-1111-111111111111",
      "name": "Webhook"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 3
          },
          "conditions": [
            {
              "id": "22222222-2222-2222-2222-222222222222",
              "leftValue": "={{ $json.body.user_name }}",
              "rightValue": "<allowed_user>",
              "operator": {
                "type": "string",
                "operation": "equals"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.3,
      "position": [
        -980,
        -360
      ],
      "id": "33333333-3333-3333-3333-333333333333",
      "name": "If Allowed User"
    },
    {
      "parameters": {
        "channelId": "<mattermost-channel-id>",
        "message": "Understood \u2014 analyzing your request.",
        "attachments": [],
        "otherOptions": {}
      },
      "type": "n8n-nodes-base.mattermost",
      "typeVersion": 1,
      "position": [
        -760,
        -360
      ],
      "id": "44444444-4444-4444-4444-444444444444",
      "name": "Mattermost Ack",
      "credentials": {
        "mattermostApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "=User request:\\n{{ $('Webhook').item.json.body.text }}",
        "options": {
          "systemMessage": "You are a strict read-only assistant. Use tools to retrieve facts. Never invent data. Do not perform write operations. Keep answers concise and factual.",
          "maxIterations": 15
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 3.1,
      "position": [
        -560,
        -360
      ],
      "id": "55555555-5555-5555-5555-555555555555",
      "name": "AI Agent"
    },
    {
      "parameters": {
        "endpointUrl": "http://<dommcp-host>:8088/mcp",
        "authentication": "bearerAuth",
        "include": "selected",
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.mcpClientTool",
      "typeVersion": 1.2,
      "position": [
        -420,
        -120
      ],
      "id": "66666666-6666-6666-6666-666666666666",
      "name": "MCP Client",
      "credentials": {
        "httpBearerAuth": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "value": "openai/gpt-oss-120b",
          "mode": "list",
          "cachedResultName": "openai/gpt-oss-120b"
        },
        "responsesApiEnabled": false,
        "options": {
          "temperature": 0.2,
          "topP": 0.9
        }
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1.3,
      "position": [
        -560,
        -120
      ],
      "id": "77777777-7777-7777-7777-777777777777",
      "name": "OpenAI Chat Model",
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "channelId": "<mattermost-channel-id>",
        "message": "={{ $json.output }}",
        "attachments": [],
        "otherOptions": {}
      },
      "type": "n8n-nodes-base.mattermost",
      "typeVersion": 1,
      "position": [
        -200,
        -360
      ],
      "id": "88888888-8888-8888-8888-888888888888",
      "name": "Mattermost Reply",
      "credentials": {
        "mattermostApi": {
          "name": "<your credential>"
        }
      }
    }
  ],
  "connections": {
    "Webhook": {
      "main": [
        [
          {
            "node": "If Allowed User",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If Allowed User": {
      "main": [
        [],
        [
          {
            "node": "Mattermost Ack",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Mattermost Ack": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "MCP Client": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "Mattermost Reply",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1",
    "binaryMode": "separate",
    "availableInMCP": false
  },
  "tags": []
}