pipefy-attachments
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseAttachments
附件
Upload one file at a time to a card or table-record attachment field. The
upload goes through Pipefy's presigned URL flow (request URL, S3 PUT, then
field update). 3 MCP tools, 2 CLI commands.
每次将一个文件上传至卡片或表格记录的附件字段。上传流程遵循Pipefy的预签名URL机制(请求URL、S3 PUT、然后更新字段)。3种MCP工具,2条CLI命令。
When to use
使用场景
- The user says "attach this file to card X" or "upload to the documents field on record Y".
- Pick the source by where the bytes actually are (see Trust model):
- The file is on a disk the MCP server can read → .
file_path - The file is reachable at an HTTPS URL → .
file_url - The server can't read the file (a local file on the hosted profile), or it's
larger than the 100 MiB in-tool cap → the presigned handshake
(; see "Uploading a file the server can't read" below), where the client does the upload.
create_attachment_presigned_url - The agent generated bytes in a sandbox the server cannot read → write them
to a path the server can read and use , or host them at a URL and use
file_path.file_url
- The file is on a disk the MCP server can read →
Do not use this skill for:
- Reading or listing existing attachments. There is no list/download tool in this skill scope. Cards and table records expose their attachments through the regular card/record fetch tools.
- Bulk uploads. One file per call; iterate at the agent layer.
- 用户说“将此文件附加到卡片X”或“上传到记录Y的文档字段”。
- 根据文件实际存储位置选择来源(请参考信任模型):
- 文件位于MCP服务器可读取的磁盘上 → 使用。
file_path - 文件可通过HTTPS URL访问 → 使用。
file_url - 服务器无法读取该文件(托管环境中的本地文件),或文件大小超过工具内置的100 MiB限制 → 使用预签名URL交互(;详见下文“上传服务器无法读取的文件”),由客户端完成上传。
create_attachment_presigned_url - 代理在服务器无法读取的沙箱中生成了字节数据 → 将其写入服务器可读取的路径并使用,或托管至某个URL并使用
file_path。file_url
- 文件位于MCP服务器可读取的磁盘上 → 使用
不要使用本技能的场景:
- 读取或列出现有附件。本技能范围内没有列出/下载工具。卡片和表格记录会通过常规的卡片/记录获取工具暴露其附件。
- 批量上传。每次调用仅上传一个文件;如需批量操作,请在代理层进行迭代。
Prerequisites
前提条件
- A Pipefy . Find it via
organization_idorget_organization.get_pipe - A target or
card_id.table_record_id - The attachment field's slug (the human-readable id like , not the field's uuid). Find it on the card or table record fetch tools.
document_upload - Exactly one file source: a the MCP server can read, or a
file_paththe server can download.file_url
- Pipefy 。可通过
organization_id或get_organization获取。get_pipe - 目标或
card_id。table_record_id - 附件字段的slug(类似的人类可读ID,而非字段的UUID)。可通过卡片或表格记录获取工具查找。
document_upload - 恰好一个文件来源:MCP服务器可读取的,或服务器可下载的
file_path。file_url
Tools needed
所需工具
| Tool (MCP) | CLI equivalent | Read-only |
|---|---|---|
| | No |
| | No |
| | No |
| 工具(MCP) | CLI 等效命令 | 是否只读 |
|---|---|---|
| | 否 |
| | 否 |
| | 否 |
Trust model
信任模型
The upload tools accept exactly one source. Which one depends on where the MCP
server runs relative to the bytes:
- is a path on the machine running the MCP server. In the local distribution the server is a subprocess of the agent runtime with the same filesystem access as the user, so any path the user can read works.
file_pathis local profile only: on the hosted server (a shared HTTP service) it has no meaning and is rejected — the file is not on the server's disk.file_path - is an HTTPS URL the server downloads (http only if the deployment enables insecure URLs). It works on any profile and is the hosted-safe source. The download runs behind an SSRF guard (HTTPS and public hosts only unless the deployment opts into insecure URLs) and the same 100 MiB cap as
file_url.file_path
A common trap: an agent running against the hosted server (or a local server
whose client generated the file in a separate sandbox) has no shared disk with
the server, so a temp the agent writes is unreadable by the server.
Use when the bytes are reachable at a URL; otherwise place the file
where the server can read it and use .
file_pathfile_urlfile_pathThe CLI always runs locally as the user, so it exposes (a local path)
only.
--file上传工具仅接受一种来源。具体选择哪种取决于MCP服务器与文件数据的相对位置:
- 是运行MCP服务器的机器上的路径。在本地分发版本中,服务器是代理运行时的子进程,拥有与用户相同的文件系统访问权限,因此用户可读取的任何路径均有效。
file_path仅适用于本地环境:在托管服务器(共享HTTP服务)上无实际意义且会被拒绝——文件不在服务器磁盘上。file_path - 是服务器可下载的HTTPS URL(若部署启用了不安全URL,则也支持HTTP)。它适用于任何环境,是托管环境下的安全来源。下载操作受SSRF防护(仅允许HTTPS和公共主机,除非部署选择启用不安全URL),且与
file_url一样有100 MiB的大小限制。file_path
常见误区:运行在托管服务器上的代理(或其客户端在独立沙箱中生成文件的本地服务器)与服务器无共享磁盘,因此代理写入的临时无法被服务器读取。若文件可通过URL访问,请使用;否则请将文件放置在服务器可读取的位置并使用。
file_pathfile_urlfile_pathCLI始终以用户身份在本地运行,因此仅暴露(本地路径)参数。
--fileSteps
操作步骤
Upload a local file to a card
将本地文件上传至卡片
file_nameMCP:
upload_attachment_to_card organization_id=42 card_id=1234 field_id=document_upload file_path=~/report.pdfCLI:
bash
pipefy attachment upload --org 42 --card 1234 --field document_upload --file ~/report.pdf若省略,则会从源文件的基名自动推断,因此调用方通常只需传入四个ID和来源。
file_nameMCP命令:
upload_attachment_to_card organization_id=42 card_id=1234 field_id=document_upload file_path=~/report.pdfCLI命令:
bash
pipefy attachment upload --org 42 --card 1234 --field document_upload --file ~/report.pdfUpload from a URL (hosted-safe)
从URL上传(托管环境安全)
upload_attachment_to_card organization_id=42 card_id=1234 field_id=document_upload file_url=https://example.com/report.pdfWhen the URL has no filename in its path (e.g. ), pass
explicitly so Pipefy stores it under a real name.
.../download?id=1file_nameupload_attachment_to_card organization_id=42 card_id=1234 field_id=document_upload file_url=https://example.com/report.pdf若URL路径中无文件名(例如),请显式传入,以便Pipefy使用真实名称存储文件。
.../download?id=1file_nameUpload a local file to a table record
将本地文件上传至表格记录
MCP:
upload_attachment_to_table_record organization_id=42 table_record_id=tr-555 field_id=document_upload file_path=/tmp/export.csvCLI:
bash
pipefy attachment upload --org 42 --record tr-555 --field document_upload --file /tmp/export.csvMCP命令:
upload_attachment_to_table_record organization_id=42 table_record_id=tr-555 field_id=document_upload file_path=/tmp/export.csvCLI命令:
bash
pipefy attachment upload --org 42 --record tr-555 --field document_upload --file /tmp/export.csvOverriding the file name
自定义文件名
To store the attachment under a different name than the source basename, pass
explicitly. It wins over the inferred basename.
file_nameupload_attachment_to_card ... file_url=https://example.com/abc123.pdf file_name=Invoice-2026.pdf若要以不同于源文件基名的名称存储附件,请显式传入。该参数优先级高于自动推断的基名。
file_nameupload_attachment_to_card ... file_url=https://example.com/abc123.pdf file_name=Invoice-2026.pdfUploading a file the server can't read: the presigned handshake
上传服务器无法读取的文件:预签名URL交互
file_pathfile_urlcreate_attachment_presigned_url- Call with
create_attachment_presigned_url+organization_id(optionalfile_name/content_type). It returnscontent_length(the S3 PUT url),upload_url(the object key), andstorage_path.expires_in_seconds - From an environment that can reach the upload host, HTTP the file bytes to
PUTwithinupload_url(sendexpires_in_seconds/Content-Typematching what you passed, if any).Content-Length - Set the attachment field to via
[storage_path]/update_card_field. Storeset_table_record_field_value, never a URL — the signed download URL is minted on read.storage_path
Because the bytes are handled by the client (step 2), not passed through the
tool call, this keeps the model's context clean.
Which clients can do step 2:
- Code-execution clients (Claude Code, Claude Desktop): read the file and
it from your own code — the bytes never enter the conversation.
PUT - Subagent tip: if your client can spawn subagents, run steps 1–2 inside one so even transient handling stays out of the main conversation's context.
- claude.ai caveat: the claude.ai code-execution sandbox cannot reach the S3
upload host by default (network egress allow-list). An org owner must allow-list
the upload host for the to succeed there; until then, this path is blocked on claude.ai and a
PUTthe server can fetch is the alternative.file_url
The CLI equivalent is (prints /
/ ); you run the and the field update.
pipefy attachment presignupload_urlstorage_pathexpires_in_secondsPUTfile_pathfile_urlcreate_attachment_presigned_url- 使用+
organization_id(可选file_name/content_type)调用content_length。返回结果包含create_attachment_presigned_url(S3 PUT地址)、upload_url(对象键)和storage_path(有效期秒数)。expires_in_seconds - 在能够访问上传主机的环境中,在有效期内,通过HTTP
expires_in_seconds将文件数据上传至PUT(若传入了upload_url/Content-Type,请确保请求头与之匹配)。Content-Length - 通过/
update_card_field将附件字段设置为set_table_record_field_value。请保存[storage_path],而非URL——签名下载URL会在读取时生成。storage_path
由于文件数据由客户端处理(步骤2),不会通过工具调用传递,因此可保持模型上下文整洁。
哪些客户端可执行步骤2:
- 代码执行客户端(Claude Code、Claude Desktop):读取文件并通过自有代码执行操作——文件数据不会进入对话内容。
PUT - 子代理提示:若客户端可生成子代理,请在子代理内执行步骤1–2,以便临时处理过程也不会进入主对话的上下文。
- claude.ai注意事项:claude.ai的代码执行沙箱默认无法访问S3上传主机(网络出口有允许列表)。组织所有者必须将上传主机加入允许列表,操作才能成功;在此之前,该路径在claude.ai上是被阻止的,替代方案是使用服务器可获取的
PUT。file_url
对应的CLI命令是(输出//);您需要自行执行操作和字段更新。
pipefy attachment presignupload_urlstorage_pathexpires_in_secondsPUTSuccess criteria
成功判定标准
upload_attachment_to_cardupload_attachment_to_table_recordsuccess: truedownload_urlcontent_typefile_sizecreate_attachment_presigned_urlsuccess: trueupload_url[storage_path]upload_attachment_to_cardupload_attachment_to_table_recordsuccess: truedownload_urlcontent_typefile_sizecreate_attachment_presigned_urlsuccess: truePUTupload_url[storage_path]Failure modes
失败场景
The one-shot tools carry a field on failure. The handshake tool can fail
at mint ( / , below), but its client PUT and
field update happen outside the tool — a non-2xx PUT or a failed
/ surfaces there, not as a
on the mint response. The values:
stepstep=validationpresigned_urlupdate_card_fieldset_table_record_field_valuestepstep- . No source, both sources, a
step=validationwith no inferablefile_url, orfile_namepassed on the hosted server. Recovery: pass exactly one source; on the hosted server usefile_path; supplyfile_urlwhen a URL has no basename.file_name - .
step=file_readdoes not exist, points to a directory, is unreadable, has an unknownfile_pathprefix, or is larger than 100 MiB. The path is read on the machine running the server (which may not be the agent's own environment). Recovery: verify the path exists as a regular file the server's user can read and is under the cap, or switch to~user.file_url - . The
step=downloadfailed its SSRF guard (non-HTTPS, private/internal host), exceeded 100 MiB, timed out, returned an HTTP error, or redirected too many times. Recovery: confirm the URL is a public HTTPS address serving the file directly and under the cap.file_url - . Organization id rejected, field id not an attachment, or Pipefy refused the request. Recovery: confirm
step=presigned_urlwithorganization_idand that the field is actually an attachment field on the target card or record.get_organization - . The presigned URL expired before PUT, or content/headers did not match what was signed. Recovery: retry the tool to obtain a fresh presigned URL.
step=s3_upload - . The field rejected the new attachment list (wrong type, missing permission). Recovery: confirm the field accepts attachments and that the caller has write access to the card or record.
step=field_update
If an argument has the wrong type (a coercion failure before the body runs),
the payload uses the standard Pipefy invalid-arguments envelope instead:
. Recovery: read
to see which argument failed, then retry.
{"success": false, "error": {"code": "INVALID_ARGUMENTS", "message": "...", "details": {"errors": [...]}}}error.details.errors[*].path单次调用工具失败时会包含字段。交互流程工具可能在生成地址阶段失败(/,如下所示),但其客户端PUT操作和字段更新发生在工具外部——PUT返回非2xx状态码或/失败时,会在对应操作中体现,而非在生成地址的响应中以形式返回。取值说明:
stepstep=validationpresigned_urlupdate_card_fieldset_table_record_field_valuestepstep- :未指定来源、同时指定两种来源、
step=validation无法推断file_url,或在托管服务器上传递了file_name。解决方法:仅指定一种来源;在托管服务器上使用file_path;当URL无基名时提供file_url。file_name - :
step=file_read不存在、指向目录、不可读、包含未知的file_path前缀,或大小超过100 MiB。路径是在运行服务器的机器上读取的(可能并非代理自身的环境)。解决方法:验证路径是否为服务器用户可读取的常规文件且大小未超过限制,或切换至~user。file_url - :
step=download未通过SSRF防护(非HTTPS、私有/内部主机)、大小超过100 MiB、超时、返回HTTP错误,或重定向次数过多。解决方法:确认URL是可直接提供文件的公共HTTPS地址且大小未超过限制。file_url - :组织ID被拒绝、字段ID并非附件字段,或Pipefy拒绝了请求。解决方法:通过
step=presigned_url确认get_organization,并确认目标卡片或记录上的字段确实是附件字段。organization_id - :预签名URL在PUT前已过期,或内容/请求头与签名时不匹配。解决方法:重新调用工具获取新的预签名URL。
step=s3_upload - :字段拒绝新的附件列表(类型错误、权限不足)。解决方法:确认字段接受附件,且调用方对卡片或记录有写入权限。
step=field_update
若参数类型错误(在请求体执行前发生强制转换失败),负载会使用标准Pipefy无效参数格式:。解决方法:查看确定哪个参数失败,然后重试。
{"success": false, "error": {"code": "INVALID_ARGUMENTS", "message": "...", "details": {"errors": [...]}}}error.details.errors[*].pathSee also
另请参阅
- : finding card ids and attachment field slugs.
skills/pipes-and-cards/pipefy-pipes-and-cards/SKILL.md - : finding table record ids and field slugs.
skills/database-tables/pipefy-database-tables/SKILL.md
- :查找卡片ID和附件字段slug。
skills/pipes-and-cards/pipefy-pipes-and-cards/SKILL.md - :查找表格记录ID和字段slug。
skills/database-tables/pipefy-database-tables/SKILL.md