pipefy-relations

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Connections & Relations

关联与关系

Link processes and cards across workflows. 8 MCP tools.

跨工作流关联流程与卡片。8种MCP工具。

Key concepts

核心概念

  • Pipe relations define parent/child structure between pipes (who connects to whom, constraints, auto-fill). Use
    get_pipe_relations
    on a pipe to list relation IDs and metadata.
  • Card relations connect individual cards through an existing pipe relation: pass
    source_id
    = the pipe relation's ID (from
    get_pipe_relations
    ). Default
    sourceType
    is
    PipeRelation
    ; use
    extra_input
    (e.g.,
    sourceType: Field
    ) when the API requires a field-based link — see
    introspect_type
    on
    CreateCardRelationInput
    .
  • Table relations in GraphQL are loaded by table-relation ID, not by database table ID:
    get_table_relations
    takes a non-empty list of those IDs.

  • Pipe关联 定义管道之间的父子结构(关联对象、约束条件、自动填充)。对管道调用
    get_pipe_relations
    可列出关联ID及元数据。
  • Card关联 通过已有的Pipe关联连接单个卡片:传入
    source_id
    为Pipe关联的ID(来自
    get_pipe_relations
    )。默认
    sourceType
    PipeRelation
    ;当API需要基于字段的关联时,使用
    extra_input
    (例如
    sourceType: Field
    )——可查看
    CreateCardRelationInput
    introspect_type
  • GraphQL中的Table关联 通过表关联ID加载,而非数据库表ID:
    get_table_relations
    需传入非空的表关联ID列表。

Tools

工具

Tool (MCP)CLIRead-onlyPurpose
get_pipe_relations
pipefy relation pipe list --pipe <id>
YesList pipe-to-pipe relations for a pipe.
create_pipe_relation
pipefy relation pipe create
NoCreate a new pipe-to-pipe relation.
update_pipe_relation
pipefy relation pipe update <id>
NoChange relation config (auto-fill, constraints).
delete_pipe_relation
pipefy relation pipe delete <id>
NoTwo-step destructive.
get_table_relations
pipefy relation table list --ids <id,...>
YesLoad table relations by relation ID.
get_card_relations
pipefy relation card list --card <id>
YesList all card-to-card relations on a card.
create_card_relation
pipefy relation card create
NoLink two cards through an existing pipe relation.
delete_card_relation
pipefy relation card delete <id>
NoTwo-step destructive.

工具(MCP)CLI 命令只读用途
get_pipe_relations
pipefy relation pipe list --pipe <id>
列出某一管道的管道间关联。
create_pipe_relation
pipefy relation pipe create
创建新的管道间关联。
update_pipe_relation
pipefy relation pipe update <id>
修改关联配置(自动填充、约束条件)。
delete_pipe_relation
pipefy relation pipe delete <id>
两步式破坏性操作。
get_table_relations
pipefy relation table list --ids <id,...>
通过关联ID加载表关联。
get_card_relations
pipefy relation card list --card <id>
列出某一卡片的所有卡片间关联。
create_card_relation
pipefy relation card create
通过已有的Pipe关联连接两张卡片。
delete_card_relation
pipefy relation card delete <id>
两步式破坏性操作。

Steps — link two cards via an existing pipe relation

步骤——通过已有Pipe关联连接两张卡片

  1. Get the pipe relation ID:
    MCP:
    get_pipe_relations pipe_id=67890
    CLI:
    pipefy relation pipe list --pipe 67890
    Note the
    id
    field on the relation (not the pipe ID).
  2. Create the card relation:
    MCP:
    create_card_relation source_id=<PIPE_RELATION_ID> source_card_id=<PARENT_CARD_ID> target_card_id=<CHILD_CARD_ID>
    CLI:
    pipefy relation card create --source-relation <id> --source-card <id> --target-card <id>
  3. Verify:
    MCP:
    get_card_relations card_id=<CHILD_CARD_ID>

  1. 获取Pipe关联ID:
    MCP:
    get_pipe_relations pipe_id=67890
    CLI:
    pipefy relation pipe list --pipe 67890
    记录关联的
    id
    字段(注意不是管道ID)。
  2. 创建Card关联:
    MCP:
    create_card_relation source_id=<PIPE_RELATION_ID> source_card_id=<PARENT_CARD_ID> target_card_id=<CHILD_CARD_ID>
    CLI:
    pipefy relation card create --source-relation <id> --source-card <id> --target-card <id>
  3. 验证:
    MCP:
    get_card_relations card_id=<CHILD_CARD_ID>

Steps — create a new pipe relation

步骤——创建新的Pipe关联

  1. Create the relation between two pipes:
    MCP:
    create_pipe_relation parent_pipe_id=111 child_pipe_id=222 name="Support Escalation" auto_fill_field_id=<field_id>
    CLI:
    pipefy relation pipe create --parent 111 --child 222 --name "Support Escalation"
  2. Use the relation — cards in the parent pipe can now be linked to cards in the child pipe using
    create_card_relation
    .

  1. 在两个管道间创建关联:
    MCP:
    create_pipe_relation parent_pipe_id=111 child_pipe_id=222 name="Support Escalation" auto_fill_field_id=<field_id>
    CLI:
    pipefy relation pipe create --parent 111 --child 222 --name "Support Escalation"
  2. 使用关联 —— 父管道中的卡片现在可通过
    create_card_relation
    关联到子管道中的卡片。

Success criteria

成功标准

  • get_pipe_relations
    returns the new relation with both pipe IDs.
  • get_card_relations
    shows the linked card ID after
    create_card_relation
    .
  • get_pipe_relations
    返回包含两个管道ID的新关联。
  • 执行
    create_card_relation
    后,
    get_card_relations
    显示已关联的卡片ID。

Failure modes

失败场景

  • create_card_relation
    fails with "relation not found":
    source_id
    must be the pipe relation ID (from
    get_pipe_relations
    ), not the pipe ID. These are different values.
  • Table relations return empty:
    get_table_relations
    requires table-relation IDs, not table IDs. Get table-relation IDs from the table's connection config.
  • delete_pipe_relation
    first call returns preview:
    expected — show preview to user, then call with
    confirm=true
    .
  • create_card_relation
    报错"relation not found":
    source_id
    必须为Pipe关联ID(来自
    get_pipe_relations
    ),而非管道ID。二者是不同的值。
  • Table关联返回空:
    get_table_relations
    需要表关联ID,而非表ID。可从表的连接配置中获取表关联ID。
  • 首次调用
    delete_pipe_relation
    返回预览:
    此为预期行为——向用户展示预览,然后传入
    confirm=true
    再次调用。

See also

参考链接

  • skills/pipes-and-cards/
    — create the pipes and cards before linking them.
  • skills/introspection/
    — discover
    CreateCardRelationInput
    when non-standard
    sourceType
    is needed.
  • skills/pipes-and-cards/
    —— 在关联前创建管道与卡片。
  • skills/introspection/
    —— 当需要非标准
    sourceType
    时,查看
    CreateCardRelationInput