pipefy-automations
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseAutomations
自动化
Traditional automations (if/then rules), AI automations (prompt-driven), task automations, and simulation. 16 MCP tools.
For AI agents (conversational agents with behaviors), see skills/ai-agents/pipefy-ai-agents/SKILL.md.
传统自动化(if/then规则)、AI自动化(提示驱动)、任务自动化和模拟。16种MCP工具。
如需了解AI代理(具备行为能力的对话式代理),请查看skills/ai-agents/pipefy-ai-agents/SKILL.md。
Traditional automations (rules engine)
传统自动化(规则引擎)
| Tool (MCP) | CLI | Purpose |
|---|---|---|
| | List all automations for a pipe. |
| | Single automation with full rule config — returns |
| | Create an if/then rule. |
| | Patch a rule: first-class typed |
| | (Two-step destructive) |
| | AI-only dry-run ( |
| | Available trigger events. |
| | Official |
| | Available action types for a pipe. |
| | Shortcut for send-a-task rules. |
Logs, usage, and job exports for automations live in skills/observability/pipefy-observability/SKILL.md (, , , , and related tools).
get_automation_logsget_automation_logs_by_repoget_automations_usageexport_automation_jobs| 工具(MCP) | CLI 命令 | 用途 |
|---|---|---|
| | 列出某个管道的所有自动化规则。 |
| | 获取单个自动化规则的完整配置——返回 |
| | 创建if/then规则。 |
| | 更新规则:支持一等类型化 |
| | (两步式破坏性操作) |
| | 仅适用于AI的试运行( |
| | 获取可用的触发事件。 |
| | 获取官方 |
| | 获取某个管道的可用动作类型。 |
| | 发送任务规则的快捷工具。 |
自动化的日志、使用情况和任务导出功能位于skills/observability/pipefy-observability/SKILL.md(包含、、、及相关工具)。
get_automation_logsget_automation_logs_by_repoget_automations_usageexport_automation_jobsAI automations (prompt-driven)
AI自动化(提示驱动)
| Tool (MCP) | CLI | Purpose |
|---|---|---|
| | List AI automations for a pipe. |
| | Full config including prompt, fields, condition. |
| | Create a prompt-driven automation (requires AI enabled on the pipe). |
| | Change name, |
| | (Two-step destructive) |
| | Pre-flight check. Returns |
| 工具(MCP) | CLI 命令 | 用途 |
|---|---|---|
| | 列出某个管道的AI自动化规则。 |
| | 获取完整配置,包括提示词、字段和条件。 |
| | 创建提示驱动的自动化规则(要求管道已启用AI功能)。 |
| | 修改名称、 |
| | (两步式破坏性操作) |
| | 预检查。返回 |
Steps — create an AI automation
步骤——创建AI自动化
-
Discover fields for any field referenced in the prompt:
internal_idget_phase_fields phase_id="<phase_id>" -
Build the prompt withreferences. Pipefy silently rejects prompts with no field reference (returns
%{<internal_id>})."Input parameters are required."Important: thewrapper and a numeric field%{...}from your pipe are required — the exact digits in examples below (e.g.internal_id) are fictional placeholders. Discover real IDs via900000101/get_phase_fields; do not copy example numbers from docs.get_start_form_fields -
Validate the prompt:
validate_ai_automation_prompt pipe_id=67890 prompt="Summarize %{900000101} and comment." field_ids=["900000101"]Returns,valid:true|false,problems,warnings. Catches mistakes in one read-only call vs 2–3 failed mutation roundtrips.field_map -
Create the automation (only if):
valid:truecreate_ai_automation pipe_id=67890 trigger_event="card_created" prompt="Summarize %{900000101} and comment." field_ids=["900000101"]
-
查找提示词中引用字段的:
internal_idget_phase_fields phase_id="<phase_id>" -
构建提示词,使用引用字段。Pipefy会静默拒绝未包含字段引用的提示词(返回
%{<internal_id>})。"Input parameters are required."重要提示:必须使用包裹,且字段%{...}为您管道中的数字ID——以下示例中的具体数字(如internal_id)为虚构占位符。请通过900000101/get_phase_fields查找真实ID,请勿直接复制文档中的示例编号。get_start_form_fields -
验证提示词:
validate_ai_automation_prompt pipe_id=67890 prompt="Summarize %{900000101} and comment." field_ids=["900000101"]返回、valid:true|false、problems和warnings。通过一次只读调用即可捕获错误,避免2-3次失败的变更往返操作。field_map -
创建自动化规则(仅当时执行):
valid:truecreate_ai_automation pipe_id=67890 trigger_event="card_created" prompt="Summarize %{900000101} and comment." field_ids=["900000101"]
Steps — create a traditional automation
步骤——创建传统自动化
- Discover events for the pipe: .
get_automation_events pipe_id=67890 - Discover actions for the pipe: . (Always discover first; never guess
get_automation_actions pipe_id=67890/trigger_id.)action_id - Build the rule with the discovered IDs and call .
create_automation - Verify by reading back with .
get_automation
- 查找管道的可用事件:。
get_automation_events pipe_id=67890 - 查找管道的可用动作:。(务必先查找,切勿猜测
get_automation_actions pipe_id=67890/trigger_id。)action_id - 使用查找到的ID构建规则,并调用。
create_automation - 验证:通过读取已创建的规则。
get_automation
Conditions — gate a rule on field tests
条件——基于字段测试管控规则
create_automationupdate_automationcondition--conditionjson
{
"expressions": [
{"field_address": "900000101", "operation": "equals", "value": "Done", "structure_id": 0}
],
"expressions_structure": [[0]]
}- is the field
field_address(numeric, frominternal_id/get_start_form_fields), not the slug. For a connected card's field useget_phase_fields.<connectorFieldId>.<targetFieldId> - (soft enum — any value is passed through, the API validates):
operation,equals,not_equals,present,blank,string_contains,string_not_contains,number_greater_than,number_less_than,date_is_today,date_is_yesterday,date_in_current_week,date_in_last_week,date_in_current_month,date_in_last_month,date_in_current_year,date_in_last_year,date_is,date_is_after. Omitdate_is_beforeforvalue/present.blank - groups expressions (by
expressions_structure) as AND-of-ORs: inner arrays are OR'd, the inner arrays are AND'd —structure_idis[[0, 1], [2]].(expr0 OR expr1) AND expr2
Omit to leave a traditional rule unconditional (no default is injected). A argument wins over any in .
conditionconditionconditionextra_inputcreate_automationupdate_automationcondition--conditionjson
{
"expressions": [
{"field_address": "900000101", "operation": "equals", "value": "Done", "structure_id": 0}
],
"expressions_structure": [[0]]
}- 为字段的**
field_address**(数字格式,来自internal_id/get_start_form_fields),而非slug。对于关联卡片的字段,请使用get_phase_fields格式。<connectorFieldId>.<targetFieldId> - (软枚举——任何值都会被传递,由API进行验证):
operation、equals、not_equals、present、blank、string_contains、string_not_contains、number_greater_than、number_less_than、date_is_today、date_is_yesterday、date_in_current_week、date_in_last_week、date_in_current_month、date_in_last_month、date_in_current_year、date_in_last_year、date_is、date_is_after。使用date_is_before/present时可省略blank。value - 按
expressions_structure对表达式进行分组,采用“或的与”逻辑:内部数组为或关系,内部数组之间为与关系——structure_id表示[[0, 1], [2]]。(expr0 或 expr1) 且 expr2
若省略,则传统规则将无任何条件(不会注入默认条件)。参数的优先级高于中的。
conditionconditionextra_inputconditionSteps — update a card field with a dynamic value
步骤——使用动态值更新卡片字段
Use when the user wants an if/then rule to stamp or copy values onto the triggering card (for example, set a datetime when fires). This is with and — not the MCP tool (that tool uses field slug for one-off card edits).
card_createdcreate_automationaction_id: update_card_fieldextra_input.action_params.field_mapupdate_card_field-
Discover fields (digits only — never slug in
internal_id):fieldIdget_start_form_fields pipe_id=67890 get_phase_fields phase_id="<phase_id>" -
Discover trigger, action, and event-attribute tokens:
get_automation_events pipe_id=67890 get_automation_actions pipe_id=67890 get_automation_event_attributesFor,update_card_fieldomitsacceptedParameters; use the payload shape below (seefield_map). Preferdocs/mcp/tools/automations-and-ai.mdfromvalue_tokenwhen stamping execution time.get_automation_event_attributes -
Create disabled () so the rule does not fire while you verify:
active=falsecreate_automation pipe_id=67890 name="Stamp execution time on new cards" trigger_id=card_created action_id=update_card_field active=false extra_input={"action_params":{"card_id":"%{id}","field_map":[{"fieldId":"<destination_internal_id>","inputMode":"copy_from","value":"%{automation_event_execution_datetime}"}],"fields_map_order":["<destination_internal_id>"]}}Commontokens whenvalueisinputMode:copy_from(also use in%{id}),card_id,%{created_at},%{automation_event_execution_datetime}to copy another field.%{<other_internal_id>} -
Verify persisted config:
get_automation automation_id=<id>Confirmround-tripped.action_params.field_map -
Enable when correct:
update_automation automation_id=<id> extra_input={"active":true}
当用户希望通过if/then规则标记或复制值到触发卡片时使用此方法(例如,当触发时设置日期时间)。需使用,并指定和——请勿使用MCP工具(该工具通过字段slug进行单次卡片编辑)。
card_createdcreate_automationaction_id: update_card_fieldextra_input.action_params.field_mapupdate_card_field-
查找字段的(仅数字——
internal_id中切勿使用slug):fieldIdget_start_form_fields pipe_id=67890 get_phase_fields phase_id="<phase_id>" -
查找触发事件、动作和事件属性令牌:
get_automation_events pipe_id=67890 get_automation_actions pipe_id=67890 get_automation_event_attributes对于,update_card_field中不包含acceptedParameters;请使用以下负载格式(参见field_map)。标记执行时间时,优先使用docs/mcp/tools/automations-and-ai.md返回的get_automation_event_attributes。value_token -
创建禁用状态的规则(),以便在验证期间规则不会触发:
active=falsecreate_automation pipe_id=67890 name="Stamp execution time on new cards" trigger_id=card_created action_id=update_card_field active=false extra_input={"action_params":{"card_id":"%{id}","field_map":[{"fieldId":"<destination_internal_id>","inputMode":"copy_from","value":"%{automation_event_execution_datetime}"}],"fields_map_order":["<destination_internal_id>"]}}当为inputMode时,常见的copy_from令牌包括:value(也可用于%{id})、card_id、%{created_at}、%{automation_event_execution_datetime}(用于复制其他字段)。%{<other_internal_id>} -
验证持久化配置:
get_automation automation_id=<id>确认已正确保存。action_params.field_map -
启用规则(验证正确后):
update_automation automation_id=<id> extra_input={"active":true}
Steps — simulate a traditional automation
步骤——模拟传统自动化
simulate_automationgenerate_with_aiaction_idget_automation_logs-
Read a working rule first:— copy
get_automation automation_id=<id>andevent_paramsverbatim.action_params -
Simulate with a real sample card:
simulate_automation pipe_id=67890 action_id=generate_with_ai sample_card_id=456 -
Result is async: returns+
simulation_idwith nullstatus:"processing". No polling tool exists in v0.1 — wait, then re-invokesimulationResultorget_automation_logs.simulate_automation
目前仅适用于AI(仅接受作为)。对于非AI规则,请在触发事件后查看。
simulate_automationgenerate_with_aiaction_idget_automation_logs-
先读取一个可用规则:——直接复制
get_automation automation_id=<id>和event_params。action_params -
使用真实示例卡片进行模拟:
simulate_automation pipe_id=67890 action_id=generate_with_ai sample_card_id=456 -
结果为异步:返回+
simulation_id,且status:"processing"为null。v0.1版本中无轮询工具——请等待一段时间后,重新调用simulationResult或get_automation_logs。simulate_automation
Traditional automation preflight
传统自动化预检查
field_map
destination fieldId
field_mapfieldIdfield_map
目标fieldId
field_mapfieldIdOn , when is present, the SDK checks each against numeric values on the action pipe (, default ). Slug-shaped values and unknown numeric ids fail before GraphQL with and the offending id. Recovery: / → use , not slug.
create_automationextra_input.action_params.field_mapfieldIdinternal_idaction_repo_idpipe_idfieldIdsuccess: falseget_start_form_fieldsget_phase_fieldsinternal_id在中,当存在时,SDK会检查每个是否与动作管道(,默认为)中的数字匹配。slug格式的或未知数字ID会在GraphQL请求前失败,返回及错误ID。解决方法:使用 / 获取,而非slug。
create_automationextra_input.action_params.field_mapfieldIdaction_repo_idpipe_idinternal_idfieldIdsuccess: falseget_start_form_fieldsget_phase_fieldsinternal_idPhase transition (move_single_card
)
move_single_card阶段转移(move_single_card
)
move_single_cardFor actions with trigger , only validates that the destination phase is reachable from the source via (same read-only data as ). does not run this check.
move_single_cardcard_movedcreate_automationcards_can_be_moved_to_phasesmove_card_to_phaseupdate_automationIf invalid, the tool returns with a text error message listing allowed destination phases by name and id, plus a hint that transition rules are configured in the Pipefy UI only (not editable via API). There is no structured field on this envelope.
success: falsevalid_destinationsRecovery: read the allowed phases in , or call on the source phase from , then re-issue with a permitted destination phase id.
error.messageget_phase_allowed_move_targets(phase_id=<source_phase_id>)event_params.to_phase_idcreate_automation对于触发事件为的动作,**仅**会验证目标阶段是否可从源阶段通过到达(与使用相同的只读数据)。不会执行此检查。
card_movedmove_single_cardcreate_automationcards_can_be_moved_to_phasesmove_card_to_phaseupdate_automation若验证失败,工具会返回及文本错误消息,列出允许的目标阶段名称和ID,并提示阶段转移规则仅可在Pipefy UI中配置(无法通过API编辑)。该响应中无结构化的字段。
success: falsevalid_destinations解决方法:在中读取允许的阶段,或调用(源阶段ID来自),然后使用允许的目标阶段ID重新调用。
error.messageget_phase_allowed_move_targets(phase_id=<source_phase_id>)event_params.to_phase_idcreate_automationNotification disambiguation
通知工具区分
Pick the right tool for "notification" intent:
| User signal words | Tool | Why |
|---|---|---|
| "notificação", "tarefa", "lembrete para alguém validar" | | Built-in: handles |
| "enviar e-mail", "responder ao cliente" | | Email surface, not automations. |
| "webhook", "chamar serviço externo" | | HTTP callback on card events. |
| "automação", "regra if/then" | | Generic rules engine. |
Do NOT hand-build via when is the right tool.
action_params.taskParamscreate_automationcreate_send_task_automation根据“通知”意图选择合适的工具:
| 用户关键词 | 工具 | 原因 |
|---|---|---|
| "notificação"、"tarefa"、"lembrete para alguém validar" | | 内置功能:处理 |
| "enviar e-mail"、"responder ao cliente" | | 邮件相关功能,不属于自动化范畴。 |
| "webhook"、"chamar serviço externo" | | 卡片事件触发的HTTP回调。 |
| "automação"、"regra if/then" | | 通用规则引擎。 |
当为合适工具时,请勿通过手动构建。
create_send_task_automationcreate_automationaction_params.taskParamsAgentic + human-in-the-loop pattern
智能代理+人工审核模式
Combine AI automations with task automations so AI handles routine work and humans validate high-impact decisions. The highest-leverage pattern in the catalog.
Example flow:
- : when card enters "Análise", AI fills classification and risk fields automatically.
create_ai_automation - : when the AI-filled field is updated, send a task to the manager — "Validate the classification on card [title]".
create_send_task_automation - or
create_automation: when the manager marks "Approved", move the card to the next phase.create_field_condition
Use this pattern for approvals, financial decisions, content publication, and any step where errors have real-world consequences. See also: skills/process-design/ Orchestration patterns.
将AI自动化与任务自动化结合,让AI处理常规工作,人工审核高影响决策。这是目录中价值最高的模式。
示例流程:
- :当卡片进入“分析”阶段时,AI自动填充分类和风险字段。
create_ai_automation - :当AI填充的字段更新时,向经理发送任务——“验证卡片[标题]的分类”。
create_send_task_automation - 或
create_automation:当经理标记“已批准”时,将卡片移至下一阶段。create_field_condition
此模式适用于审批、财务决策、内容发布及任何错误会产生实际影响的步骤。另请参阅:skills/process-design/ 编排模式。
Success criteria
成功标准
- returns the new rule with correct trigger and actions.
get_automation - returns
validate_ai_automation_promptbefore AI automation creation.valid:true - (AI rules) eventually returns a non-null
simulate_automation.simulationResult
- 返回包含正确触发事件和动作的新规则。
get_automation - 创建AI自动化前,返回
validate_ai_automation_prompt。valid:true - (AI规则)最终返回非空的
simulate_automation。simulationResult
Failure modes
失败模式
- is AI-only. Only
simulate_automationgenerate_with_aiaccepted. For traditional rules, useaction_idafter the rule fires.get_automation_logs - Async simulation result. returns
simulate_automation+simulation_id+ nullstatus:"processing"; no polling tool in v0.1. Wait, then callsimulationResultor re-invokeget_automation_logs.simulate_automation - returns
validate_ai_automation_prompt. Readvalid:false(per-field) andproblems. Most common: prompt missingwarningsreference, or%{internal_id}overlap with promptfield_idstokens.%{id} - cycle detection. Same-pipe
create_automation+card_createdrejected withcreate_cardUse a different trigger, target a different pipe, or use"This automation can't be created! It would result in an endless card creation cycle."instead.update_card - fails with unknown event/action. Always run
create_automation+get_automation_eventsfirst; do not guess IDs.get_automation_actions - Phase transition error on . Only
move_single_cardpreflights transitions. Read allowed phase ids in the error text or callcreate_automation, then re-issue with a permitted destination. UI is the only edit surface for transition rules.get_phase_allowed_move_targets - Cross-pipe . SA must be member of both source and destination pipes for
PERMISSION_DENIED/ cross-pipecreate_connected_card. Recovery:create_card+get_pipe_members.invite_members - returns empty. Pipe has no traditional automation executions; not an error. AI agent executions are separate (see
get_automation_logs_by_repo).get_ai_agent_logs - fires immediately when
create_send_task_automation. Passactive=truefirst if you want to wire it up before the rule starts firing. The 2026-04-16 orphaned-task incident is the cautionary tale.active=false - API asymmetry.
update_automationtakes a top-levelcreate_automationparam;activerequiresupdate_automation. Passextra_input={"active": false}throughactivewhen toggling on an existing rule.extra_input - semantics. For cross-pipe actions (
action_repo_id,create_connected_cardinto another pipe), this is the destination pipe, not the source.create_card - Simulation reuses real rule params. Before simulating, call to read
get_automationandevent_paramsof a working rule and pass them verbatim. Don't hand-craft params.action_params - uses slug in
field_map. Preflight rejects non-numericfieldIdbefore GraphQL; slugs (e.g.fieldId) used to surface asdue_date. Recovery:INTERNAL_SERVER_ERROR/get_start_form_fields→ useget_phase_fields.internal_id - Unknown
field_map.fieldIdpreflight fails with the offending id when the destination field is not on the action pipe. Re-discover ids oncreate_automation(not only the trigger pipe for cross-pipe actions).action_repo_id - Used MCP tool for a rule. That tool updates one card by slug; automations need
update_card_field+create_automationwith numericfield_map.fieldId - Missing or wrong . Set
card_idtoaction_params.card_idfor the triggering card; empty/wrong values prevent the intended update."%{id}" - Token typo in . Typos in
field_map.valuetemplates leave fields unchanged at runtime. Compare with Automation Event Attributes and a working rule from%{…}.get_automation - Rule runs but field unchanged. Check /
get_automation_logsfor execution errors; invalidget_automation_logs_by_repomay fail silently (no card update).fieldId
- 仅适用于AI。仅接受
simulate_automation作为generate_with_ai。对于传统规则,请在规则触发后使用action_id。get_automation_logs - 模拟结果异步。返回
simulate_automation+simulation_id+ nullstatus:"processing";v0.1版本中无轮询工具。请等待一段时间后,调用simulationResult或重新调用get_automation_logs。simulate_automation - 返回
validate_ai_automation_prompt。查看valid:false(按字段)和problems。最常见原因:提示词缺少warnings引用,或%{internal_id}与提示词中的field_ids令牌重叠。%{id} - 循环检测。同一管道中
create_automation+card_created的组合会被拒绝,返回create_card。请使用其他触发事件、目标其他管道,或改用"This automation can't be created! It would result in an endless card creation cycle."。update_card - 因未知事件/动作失败。务必先运行
create_automation+get_automation_events;切勿猜测ID。get_automation_actions - 阶段转移错误。仅
move_single_card会预检查阶段转移。在错误文本中读取允许的阶段ID,或调用create_automation,然后使用允许的目标阶段重新调用。阶段转移规则仅可在UI中编辑。get_phase_allowed_move_targets - 跨管道。服务账号必须同时是源管道和目标管道的成员,才能执行
PERMISSION_DENIED/ 跨管道create_connected_card。解决方法:create_card+get_pipe_members。invite_members - 返回空。管道无传统自动化执行记录;这并非错误。AI代理执行记录单独存储(参见
get_automation_logs_by_repo)。get_ai_agent_logs - 在
create_send_task_automation时立即触发。如果希望先配置规则再启用,请先传递active=true。2026-04-16的孤立事件就是前车之鉴。active=false - API不对称。
update_automation接受顶级create_automation参数;active要求传入update_automation。启用现有规则时,请通过extra_input={"active": false}传递extra_input参数。active - 语义。对于跨管道动作(
action_repo_id、向其他管道create_connected_card),此参数为目标管道ID,而非源管道。create_card - 模拟复用真实规则参数。模拟前,调用读取可用规则的
get_automation和event_params,并直接传递这些参数。请勿手动构建参数。action_params - 在
field_map中使用slug。预检查会在GraphQL请求前拒绝非数字fieldId;此前slug(如fieldId)会导致due_date。解决方法:使用INTERNAL_SERVER_ERROR/get_start_form_fields获取get_phase_fields。internal_id - 中存在未知
field_map。当目标字段不在动作管道中时,fieldId预检查会失败并返回错误ID。请在create_automation中重新查找ID(跨管道动作时,切勿仅在触发管道中查找)。action_repo_id - 使用MCP工具配置规则。该工具通过slug更新单张卡片;自动化规则需使用
update_card_field+ 包含数字create_automation的fieldId。field_map - 缺失或错误。将
card_id设置为action_params.card_id以指向触发卡片;空值/错误值会导致预期的更新无法执行。"%{id}" - 中令牌拼写错误。
field_map.value模板中的拼写错误会导致运行时字段无变化。请与Automation Event Attributes及%{…}返回的可用规则进行对比。get_automation - 规则运行但字段未更新。查看/
get_automation_logs中的执行错误;无效get_automation_logs_by_repo可能会静默失败(无卡片更新)。fieldId
See also
另请参阅
- skills/ai-agents/pipefy-ai-agents/SKILL.md — conversational agents with behaviors (different from AI automations).
- skills/observability/pipefy-observability/SKILL.md — execution logs and usage stats.
- skills/introspection/pipefy-introspection/SKILL.md — discover trigger and action types via raw schema.
- skills/process-design/pipefy-process-design/SKILL.md — Orchestration patterns (agentic + human validation).
- — canonical map of which tool/argument expects slug vs
docs/mcp/tools/identifiers.md#field-references-slug-vs-internal_idvs uuid vs numeric id (internal_idandfield_addresswant internal_id).field_map[].fieldId
- skills/ai-agents/pipefy-ai-agents/SKILL.md —— 具备行为能力的对话式代理(与AI自动化不同)。
- skills/observability/pipefy-observability/SKILL.md —— 执行日志和使用统计。
- skills/introspection/pipefy-introspection/SKILL.md —— 通过原始架构发现触发事件和动作类型。
- skills/process-design/pipefy-process-design/SKILL.md —— 编排模式(智能代理+人工审核)。
- —— 规范说明不同工具/参数应使用slug、
docs/mcp/tools/identifiers.md#field-references-slug-vs-internal_id、uuid还是数字ID(internal_id和field_address需使用internal_id)。field_map[].fieldId