{
  "name": "Create a room, invite members from a different room, and send a message in the room we created",
  "nodes": [
    {
      "name": "On clicking 'execute'",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        240,
        300
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "name": "Matrix",
      "type": "n8n-nodes-base.matrix",
      "position": [
        400,
        300
      ],
      "parameters": {
        "resource": "room",
        "roomName": "n8n",
        "roomAlias": "discussion-n8n"
      },
      "typeVersion": 1
    },
    {
      "name": "IF",
      "type": "n8n-nodes-base.if",
      "position": [
        840,
        300
      ],
      "parameters": {
        "conditions": {
          "string": [
            {
              "value1": "={{$node[\"Matrix1\"].json[\"user_id\"]}}",
              "value2": "={{$node[\"Matrix2\"].json[\"user_id\"]}}",
              "operation": "notEqual"
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "name": "Matrix3",
      "type": "n8n-nodes-base.matrix",
      "position": [
        990,
        200
      ],
      "parameters": {
        "roomId": "={{$node[\"Matrix\"].json[\"room_id\"]}}",
        "userId": "={{$node[\"IF\"].json[\"user_id\"]}}",
        "resource": "room",
        "operation": "invite"
      },
      "typeVersion": 1
    },
    {
      "name": "Matrix4",
      "type": "n8n-nodes-base.matrix",
      "position": [
        1140,
        200
      ],
      "parameters": {
        "text": "Welcome to n8n!",
        "roomId": "={{$node[\"Matrix\"].json[\"room_id\"]}}"
      },
      "typeVersion": 1
    },
    {
      "name": "NoOp",
      "type": "n8n-nodes-base.noOp",
      "position": [
        990,
        400
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "name": "Matrix1",
      "type": "n8n-nodes-base.matrix",
      "position": [
        540,
        300
      ],
      "parameters": {
        "resource": "account"
      },
      "typeVersion": 1,
      "continueOnFail": true
    },
    {
      "name": "Matrix2",
      "type": "n8n-nodes-base.matrix",
      "position": [
        690,
        300
      ],
      "parameters": {
        "roomId": "!cMUIsUgevrhCoeMkSG:matrix.org",
        "filters": {},
        "resource": "roomMember"
      },
      "typeVersion": 1
    },
    {
      "id": "b7306f7a-6178-5d6c-b65f-9c9b81e0d52a",
      "name": "Publication · Overview and setup",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -800,
        0
      ],
      "parameters": {
        "content": "# Create a room, invite members from a different room, and send a message in the room we created\n\n## Purpose and structure\nThis folder contains the **Create a room, invite members from a different room, and send a message in the room we created** workflow. Its executable nodes use `if`, `manualTrigger`, `matrix`, `noOp`. The table and connection map below are derived from the JSON, not an inferred guarantee of behavior.\n\n## Setup\nImport inactive. Configure your own credentials and replace REPLACE_WITH_* values. Review external destinations and Code nodes before running.\n\n## Entry points\nOn clicking 'execute'\n\n## Verification\nSanitized source candidate; not runtime-tested. This overview is generated from node metadata. Read the folder README for the connection map, credential types, and license.\n\n## Attribution\nhttps://github.com/Zie619/n8n-workflows/blob/94007c1445d9258a7da116646b79473e7c7c3282/workflows/Manual/1158_Manual_Matrix_Create_Triggered.json\nMIT; preserve source notices.",
        "width": 700,
        "height": 800,
        "color": 1
      }
    }
  ],
  "active": false,
  "settings": {},
  "connections": {
    "IF": {
      "main": [
        [
          {
            "node": "Matrix3",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "NoOp",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Matrix": {
      "main": [
        [
          {
            "node": "Matrix1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Matrix1": {
      "main": [
        [
          {
            "node": "Matrix2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Matrix2": {
      "main": [
        [
          {
            "node": "IF",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Matrix3": {
      "main": [
        [
          {
            "node": "Matrix4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "On clicking 'execute'": {
      "main": [
        [
          {
            "node": "Matrix",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
