MCP Control
Автоматизации · Изменение

Flow · Добавление · Узлы

flows_add_node
Карточки процесса, соединённые нитями

Попробуйте три запроса

Подготовить
  1. Вы указываетеСценарий
  2. ПомощникПодготовка
  3. Вы получаетеПредпросмотр
Запрос в чат
Подготовь «Flow / Добавление / Узлы». Для изменения нужны сценарий, тип. Покажи объект и ожидаемый эффект до выполнения.
Что входит в подготовку
flowId
Сценарий
type
Тип
display
Параметр
Применить
  1. Вы указываетеСогласованные значения
  2. ПомощникОдин вызов
  3. Вы получаетеОтвет операции
Запрос в чат
На учебной записи подготовь «Flow / Добавление / Узлы» с параметром type = trigger. Покажи остальные обязательные значения и выполни действие, когда согласованы все поля.
Фрагмент учебных параметров
type
trigger
flowId
DEMO-101
enabled
true
Проверить итог
  1. Вы указываетеИсходный ответ
  2. ПомощникСверка результата
  3. Вы получаетеПодтверждение
Запрос в чат
Проверь результат «Flow / Добавление / Узлы» по исходному ответу. Покажи сценарий, nodeId. Объясни, чем подтвердить эффект для выбранного объекта.
Как сверить изменение
  1. До измененияПрочитать версию
  2. При записиПередать выбранную версию
  3. После ответаПеречитать объект
Как работает действие

Этот вызов может изменить рабочие данные. Согласуйте точный объект, новые значения и ожидаемый результат. Присвойте операции стабильный requestId. При повторе той же операции используйте прежний ключ и те же значения. Прочитайте актуальную версию записи перед подготовкой запроса.

Описание разработчика

Add one native node with optional operational configuration to a DISABLED Flow. Stores native methed/input/output/query/headers/list, never a second graph format. Returns a server-generated node ID. Existing nodes are preserved. Parent remains disabled. The node defaults to disabled; enabled selects inclusion in safe tests only. No handler, provider, test or execution is invoked.

Параметры запроса
flowId
Flow ID in the server-verified company; the stored Flow must be disabled. обязательно по схеме · string · до символов 160
expectedRevision
Версия, прочитанная перед изменением. обязательно по схеме · string
requestId
Ключ этой операции. Для повтора с теми же аргументами сохраните исходное значение. обязательно по схеме · string · до символов 128
type
One of the 13 recorded native node types. Native configuration is accepted separately; this does not activate or execute the handler. обязательно по схеме · string · варианты trigger, webhook, action, if, mapping, filter, fields, limit, merge, calculate, crypto, json, end
display
Native editor fields and handler name. Operational rowdata belongs in configuration; activation and credentials are not accepted. обязательно по схеме · object · по умолчанию {}
configuration
Supplied native operational fields. Omitted fields are preserved; supplied row arrays replace in full. No execution occurs. необязательно · object
enabled
Native node active flag inside a DISABLED parent Flow. Enables this node for safe testing only; never activates the parent or registers a trigger. New nodes default to false; updates preserve the stored flag when omitted. необязательно · boolean
Что вернёт команда
flowId
Flow ID in the server-verified company; the stored Flow must be disabled. обязательно по схеме · string · до символов 160
nodeId
Existing native node ID in this Flow. обязательно по схеме · string · до символов 160
nodeType
One of the 13 recorded native node types. Native configuration is accepted separately; this does not activate or execute the handler. обязательно по схеме · string · варианты trigger, webhook, action, if, mapping, filter, fields, limit, merge, calculate, crypto, json, end
operation
Committed configuration operation. обязательно по схеме · string · варианты add_node, update_node, remove_node, connect, disconnect, duplicate_node
appliedFromRevision
Exact current revision from flows_get_metadata; any intervening Studio or MCP edit conflicts. обязательно по схеме · string
active
Parent Flow remains disabled. обязательно по схеме · boolean
executionStarted
No Flow, test or node handler was invoked. обязательно по схеме · boolean
Поля и технические схемы
Входные поля и поля ответа flows_add_node
Вход · JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "flowId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160,
      "pattern": "^[A-Za-z0-9_~:@+.-]+$",
      "description": "Flow ID in the server-verified company; the stored Flow must be disabled."
    },
    "expectedRevision": {
      "type": "string",
      "pattern": "^fsv1:-?\\d{1,12}:\\d{1,9}$",
      "description": "Exact current revision from flows_get_metadata; any intervening Studio or MCP edit conflicts."
    },
    "requestId": {
      "type": "string",
      "minLength": 8,
      "maxLength": 128,
      "pattern": "^[A-Za-z0-9_-]+$",
      "description": "Idempotency ID for these exact arguments; retry unchanged after an uncertain response."
    },
    "type": {
      "type": "string",
      "enum": [
        "trigger",
        "webhook",
        "action",
        "if",
        "mapping",
        "filter",
        "fields",
        "limit",
        "merge",
        "calculate",
        "crypto",
        "json",
        "end"
      ],
      "description": "One of the 13 recorded native node types. Native configuration is accepted separately; this does not activate or execute the handler."
    },
    "display": {
      "default": {},
      "type": "object",
      "properties": {
        "name": {
          "description": "Native node name. For action and trigger nodes this selects the native handler/source; it is not merely a visual label.",
          "type": "string",
          "maxLength": 300
        },
        "description": {
          "description": "Node description, stored as display metadata.",
          "type": "string",
          "maxLength": 4000
        },
        "namelist": {
          "description": "Replacement localized node labels.",
          "maxItems": 30,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "Language": {
                "type": "string",
                "minLength": 1,
                "maxLength": 40,
                "description": "Native language label."
              },
              "Text": {
                "type": "string",
                "maxLength": 300,
                "description": "Localized display text."
              }
            },
            "required": [
              "Language",
              "Text"
            ],
            "additionalProperties": false
          }
        },
        "coordinates": {
          "description": "Native Double[] editor coordinates, preserved in supplied order; no coordinate conversion.",
          "maxItems": 8,
          "type": "array",
          "items": {
            "type": "number",
            "minimum": -1000000,
            "maximum": 1000000,
            "description": "Native finite editor coordinate."
          }
        }
      },
      "additionalProperties": false,
      "description": "Native editor fields and handler name. Operational rowdata belongs in configuration; activation and credentials are not accepted."
    },
    "configuration": {
      "description": "Supplied native operational fields. Omitted fields are preserved; supplied row arrays replace in full. No execution occurs.",
      "type": "object",
      "properties": {
        "methed": {
          "type": "string",
          "maxLength": 300,
          "description": "Native method/event spelling. Examples: INSERT for an action named Task, or the native trigger event."
        },
        "url": {
          "type": "string",
          "maxLength": 4000,
          "description": "Native outbound destination, stored without making a request. Credentials must remain in the existing secure configuration."
        },
        "input": {
          "description": "Complete replacement of native input rowdata. Omit to preserve; [] clears.",
          "maxItems": 100,
          "type": "array",
          "items": {
            "$ref": "#/$defs/_mcp6"
          }
        },
        "output": {
          "description": "Complete replacement of native output rowdata. Omit to preserve; [] clears.",
          "maxItems": 100,
          "type": "array",
          "items": {
            "$ref": "#/$defs/_mcp6"
          }
        },
        "query": {
          "description": "Complete replacement of native query rowdata. Omit to preserve; [] clears.",
          "maxItems": 100,
          "type": "array",
          "items": {
            "$ref": "#/$defs/_mcp6"
          }
        },
        "headers": {
          "description": "Complete replacement of native header rowdata. Plaintext authentication values are not accepted.",
          "maxItems": 100,
          "type": "array",
          "items": {
            "$ref": "#/$defs/_mcp6"
          }
        },
        "list": {
          "description": "Native list-processing flag; configuration does not process business data.",
          "type": "boolean"
        },
        "authentication": {
          "description": "Existing native authentication mode. Credentials are configured through the secure Chat UI, never literal secrets.",
          "type": "string",
          "enum": [
            "none",
            "api key",
            "bearer token",
            "basic auth",
            "oauth2"
          ]
        },
        "key_location": {
          "description": "Native API key placement, required with api key authentication.",
          "type": "string",
          "enum": [
            "header",
            "query",
            "body"
          ]
        },
        "key_name": {
          "type": "string",
          "maxLength": 100,
          "description": "Native API key parameter name; not the key value."
        }
      },
      "additionalProperties": false
    },
    "enabled": {
      "description": "Native node active flag inside a DISABLED parent Flow. Enables this node for safe testing only; never activates the parent or registers a trigger. New nodes default to false; updates preserve the stored flag when omitted.",
      "type": "boolean"
    }
  },
  "required": [
    "flowId",
    "expectedRevision",
    "requestId",
    "type",
    "display"
  ],
  "additionalProperties": false,
  "$defs": {
    "_mcp6": {
      "type": "object",
      "properties": {
        "row": {
          "type": "string",
          "maxLength": 300,
          "description": "Native case-sensitive property path or configuration key."
        },
        "name": {
          "$ref": "#/$defs/_mcp0"
        },
        "type": {
          "$ref": "#/$defs/_mcp1"
        },
        "required": {
          "description": "Native required flag.",
          "type": "boolean"
        },
        "list": {
          "description": "Native array flag.",
          "type": "boolean"
        },
        "parent": {
          "type": "string",
          "maxLength": 300,
          "description": "Native parent property path."
        },
        "json": {
          "$ref": "#/$defs/_mcp5"
        }
      },
      "required": [
        "row"
      ],
      "additionalProperties": false
    },
    "_mcp0": {
      "type": "string",
      "maxLength": 16000,
      "description": "Native literal value or data binding such as {local.order.Amount}. Stored without resolving it."
    },
    "_mcp1": {
      "type": "string",
      "maxLength": 80,
      "description": "Native row type or condition operator (for example number, json, string, >, ==)."
    },
    "_mcp5": {
      "description": "Native nested rowdata; maximum three row levels.",
      "maxItems": 100,
      "type": "array",
      "items": {
        "$ref": "#/$defs/_mcp4"
      }
    },
    "_mcp4": {
      "type": "object",
      "properties": {
        "row": {
          "type": "string",
          "maxLength": 300,
          "description": "Native case-sensitive property path or configuration key."
        },
        "name": {
          "$ref": "#/$defs/_mcp0"
        },
        "type": {
          "$ref": "#/$defs/_mcp1"
        },
        "required": {
          "description": "Native required flag.",
          "type": "boolean"
        },
        "list": {
          "description": "Native array flag.",
          "type": "boolean"
        },
        "parent": {
          "type": "string",
          "maxLength": 300,
          "description": "Native parent property path."
        },
        "json": {
          "$ref": "#/$defs/_mcp3"
        }
      },
      "required": [
        "row"
      ],
      "additionalProperties": false
    },
    "_mcp3": {
      "description": "Native rowdata children.",
      "maxItems": 100,
      "type": "array",
      "items": {
        "$ref": "#/$defs/_mcp2"
      }
    },
    "_mcp2": {
      "type": "object",
      "properties": {
        "row": {
          "type": "string",
          "maxLength": 300,
          "description": "Native case-sensitive property path or configuration key."
        },
        "name": {
          "$ref": "#/$defs/_mcp0"
        },
        "type": {
          "$ref": "#/$defs/_mcp1"
        },
        "required": {
          "description": "Native required flag.",
          "type": "boolean"
        },
        "list": {
          "description": "Native array flag.",
          "type": "boolean"
        },
        "parent": {
          "type": "string",
          "maxLength": 300,
          "description": "Native parent property path."
        },
        "json": {
          "description": "Empty leaf children.",
          "maxItems": 0,
          "type": "array",
          "items": {
            "not": {}
          }
        }
      },
      "required": [
        "row"
      ],
      "additionalProperties": false
    }
  }
}
Выход · JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "flowId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160,
      "pattern": "^[A-Za-z0-9_~:@+.-]+$",
      "description": "Flow ID in the server-verified company; the stored Flow must be disabled."
    },
    "nodeId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160,
      "pattern": "^[A-Za-z0-9_~:@+.-]+$",
      "description": "Existing native node ID in this Flow."
    },
    "nodeType": {
      "type": "string",
      "enum": [
        "trigger",
        "webhook",
        "action",
        "if",
        "mapping",
        "filter",
        "fields",
        "limit",
        "merge",
        "calculate",
        "crypto",
        "json",
        "end"
      ],
      "description": "One of the 13 recorded native node types. Native configuration is accepted separately; this does not activate or execute the handler."
    },
    "operation": {
      "type": "string",
      "enum": [
        "add_node",
        "update_node",
        "remove_node",
        "connect",
        "disconnect",
        "duplicate_node"
      ],
      "description": "Committed configuration operation."
    },
    "appliedFromRevision": {
      "type": "string",
      "pattern": "^fsv1:-?\\d{1,12}:\\d{1,9}$",
      "description": "Exact current revision from flows_get_metadata; any intervening Studio or MCP edit conflicts."
    },
    "active": {
      "type": "boolean",
      "const": false,
      "description": "Parent Flow remains disabled."
    },
    "executionStarted": {
      "type": "boolean",
      "const": false,
      "description": "No Flow, test or node handler was invoked."
    }
  },
  "required": [
    "flowId",
    "nodeId",
    "nodeType",
    "operation",
    "appliedFromRevision",
    "active",
    "executionStarted"
  ],
  "additionalProperties": false
}