Flows

作者 postmanlabs67cff8f385d8無授權條款收錄於 2026年10月8日更新於 2026年10月8日

Runs, deploys, and debugs Postman Flows from the command line — executing a flow file locally, triggering a deployed flow over its webhook, deploying one so it becomes callable, and tracing a failed run to the block that broke. Use when the user names a flow and an action ("run the Checkout flow", "deploy this flow", "why did that flow run fail", "what flows do I have"). Covers `postman flows list`, `run`, `trigger`, `deploy`, `update`, `list-runs`, and `get-run`.

僅含說明DevOps & Cloud
AI 產生的概覽

透過命令列操作 Postman Flows:列出、執行、觸發、部署、更新並偵錯流程及其執行紀錄。

功能
引導代理使用 postman flows 指令系列:列舉工作區中的流程、執行本機流程 JSON 檔案、透過 Webhook 觸發已部署的流程、部署或更新流程使其可被呼叫,以及檢視執行紀錄。它說明 Local View 與 Cloud View 流程的差異,輸入、情境、標頭與查詢參數如何對應到命令列旗標,以及如何把失敗的執行追溯到出問題的區塊。產出包括命令列指令、附確認步驟的部署提案,以及標明失敗區塊、原因與狀態的執行報告。
適用情境
當使用者提到某個 Postman 流程並附帶操作意圖時使用,例如執行、部署、觸發或排查該流程,或詢問有哪些流程。也適合診斷失敗的流程執行或未生效的部署。
執行需求
需要具備 postman flows 子指令的 Postman CLI、已登入的 postman login 憑證,以及工作區 id(通常來自 .postman/resources.yaml)。部分指令文件標示為僅企業版可用,雲端子指令需要網路存取。不附帶指令碼,僅包含一份 CLI 旗標表的參考文件。

Postman Flows

Overview

Listing flows, running them, deploying them so they become callable, and tracing a failed run to the block that caused it — all through postman flows.

Core knowledge

A flow is a graph of blocks, not a script. That single fact drives the rest of this skill: a flow has two independent execution paths, and its HTTP response describes one block rather than the whole graph, so debugging takes a different command than running.

Local file vs deployed artifact

run and trigger are not two ways to execute one flow. Postman Flows has two Native Git modes, and they are isolated from each other:

  • Cloud View (the default) syncs flows to Postman Cloud, which is what makes them shareable and deployable — so Cloud View is the only side deploy, trigger, update, list-runs and get-run ever address.
  • Local View stores flows as JSON in a local Git repo, updated as they are edited. Those flows cannot be shared or deployed, have no snapshots, and are isolated from the flows in Cloud View.
flows run <path>flows trigger <flowId>
Executesa flow JSON file on this machinethe cloud-deployed flow, via its webhook
Returnsstatus, output, test results, exit codeRun ID + HTTP status + response body
Observabilityown stdout, --output, --reportersget-run, per block
Environment file-e/--environmentnot supported

run exits nonzero on failure, which is what lets a CI job gate on it. trigger goes through the real webhook URL, so it exercises the deployed path end-to-end — auth and trigger configuration included — and registers a cloud run that get-run can explain block by block.

postman init scaffolds postman/flows/, and Postman's flows run examples use that path. Note what puts files there: the Git-connected Flows experience is desktop-app only, so postman/flows/*.json is written by the desktop app's Local View, not by the CLI — workspace push/pull carry no flows handling whatever else they sync. Don't tell a user to workspace pull to obtain a flow file.

What deploying buys, and what it requires

Deploying puts the flow in Postman's cloud and attaches an HTTP trigger, which is what makes it reachable by schedules, webhooks, third-party apps, and other APIs — the flow stops being something a human opens and becomes callable infrastructure.

Three preconditions sit outside the CLI, so no flag or retry satisfies them: the flow must be in Cloud View, its Start block must be configured with an API request trigger, and its canvas must have a Response block. Check these before re-running a failed deploy with different arguments.

--path is a suffix appended to a generated base URL, not a full URL.

Inputs: -i versus a scenario

A scenario is a named input set stored in the flow definition, generated when someone adds an input to the Start block. Because it travels with the flow, -s "Staging" is reproducible across invocations and across people, where -i key=value is per-invocation. Start-block inputs can be declared secret, which is what --show-secrets unmasks in dry-run output.

Precedence: -s supplies payload, headers, and query; --headers and --query override it; -i/-f override its values.

Identifiers

flows list is the only way to turn a flow name into an id — .postman/resources.yaml maps collections to cloud ids but has no flows section, so there is nothing local to read. Both list and list-runs require -w/--workspace; take that id from workspace.id in .postman/resources.yaml, which bootstrap records.

Run IDs have no single documented shape (session-abc123 and main/1a123ab1 both appear in Postman's own material). Use whatever trigger or list-runs printed, verbatim, and apply the same rule to flow ids.

Plan and permission gating

flows run is documented as Enterprise-only, and the cloud subcommands need postman login. Access denied. Please check your permissions for the specified resource. on every workspace is a credential-scope or plan signal, not a wrong-workspace signal — and never means the workspace has no flows.

Deploying: propose, confirm, then verify

Deploy is the one multi-phase workflow here, because it is mutating and because its result is only half-useful without the follow-up check.

  1. Resolve the id. flows list --workspace <id> --filter "Checkout". On multiple matches, show name + id + last-updated and let the user pick.
  2. Propose the path. Derive it from the flow name — "Checkout" → /checkout — so the user is confirming a concrete value rather than answering an open question. Raise --auth here if the trigger will be reachable by anyone who learns the URL.
  3. Confirm, then run flows deploy <flowId> --path /checkout.
  4. Report the Trigger URL and whether the trigger is enabled. A deploy can land with the trigger off, which looks identical to a broken deploy at call time. If it is off, offer flows update <flowId> --trigger on.

When the deploy existed only so the flow could be run, trigger it in the same turn and report the Run ID — deploy-then-trigger is one job.

Running and triggering

Show the command before running it, and map the request onto flags: inputs to -i, a payload file to -f, query to -q, headers to --headers, a named scenario to -s.

bash
postman flows run postman/flows/checkout.json -i amount=4200postman flows trigger <flowId> -i amount=4200

run is documented as Enterprise-only, so check the plan before building a workflow on the local path. Where the flow is already in Cloud View, trigger covers the gap; a Local View flow has no such fallback, since it cannot be deployed.

-n/--dry-run on trigger prints the resolved URL and payload without sending — worth reaching for when a flow writes to real systems, since a trigger is not a read-only probe. For CI, --output json and --reporters html persist results, and --workspace is required if the flow contains connector blocks (it fails at the block, not at startup).

Report the Run ID on every trigger, including successes; it is the only handle on the run afterwards.

Two failures are recoverable rather than terminal, and both recover through a confirmed mutation. A 404 hinting To deploy it, run: postman flows deploy means the flow exists but was never deployed — offer the deploy above, then re-trigger. A disabled-trigger error means it is deployed but not accepting calls — offer flows update <flowId> --trigger on, then trigger.

Debugging a run

A trigger's response body is the Response block's output. A flow can answer 200 with a failed block upstream, and a 500 says nothing about which block produced it — so read the run, not the response.

bash
postman flows list-runs --workspace <id> --flow <flowId> --range 3dpostman flows get-run --run-id <runId> --logs

list-runs recovers a Run ID nobody wrote down; its --range defaults to 1h, so widen it before concluding a run is missing. Start get-run without --logs and add them when the summary does not explain the failure; --filter narrows to a block-id prefix.

Report the failing block, the reason, and the run status:

Run session-abc123 — failed  Failing block: "HTTP Request (Get Orders)"  Reason:        downstream returned 504 after 10s timeout  Status:        error

Critical Rules

  1. Resolve ids, never infer them. A name is not an id, and no id format is documented well enough to validate against. Ambiguous name → present candidates and ask.
  2. deploy and update need explicit confirmation. They change what the flow does for every caller: a deploy exposes a trigger path, --trigger on|off starts or stops accepting calls, and --auth off removes authentication from a live trigger.
  3. Report the failing block, not the log. --logs output is input to your analysis; the user needs the block, the reason, and the status.
  4. Surface CLI errors verbatim and read them literally. "Flow file not found", a required-option error, and "Access denied" have three different fixes, and only the last is about permissions.
  5. A missing or unauthenticated CLI is bootstrap's job — route there rather than improvising an install or a second login.

Anti-patterns

  1. Don't substitute run for trigger when a flow isn't deployed. A green local run says nothing about the deployed path a caller hits, and a Local View flow cannot be deployed at all.
  2. Don't hunt for a different workspace id when access is denied across every workspace you try. A blanket denial points at the credential's scope or the plan, not at the id.
  3. Don't pass -x/--suppress-exit-code in CI. It makes a failed flow report success to the pipeline, which removes the only thing gating it.
  4. Don't put reusable inputs on the command line. A payload that matters more than once belongs in a Start-block scenario, where it travels with the flow.

Reference

  • Flows CLI flags [blocked] — full flag tables per subcommand, the BETA dataset-iteration flags, and the short-flag collisions between subcommands. Read before composing a command with flags not shown above.
  • bootstrap skill — CLI install, login, and the workspace id these commands require.
  • api-discovery skill — postman search flows finds a flow by text across Postman, a different dataset from flows list's workspace enumeration.

來源與署名

來源:postmanlabs/postman-plugin位於skills/flows提交67cff8f

授權條款: 無授權條款

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架

更多來自 postmanlabs/postman-plugin 的技能

Performance Testing

postmanlabs

以虛擬使用者、負載設定檔和通過/失敗門檻執行 Postman 集合負載測試。

Software Development2026年10月8日

Ci Integration

postmanlabs

將 Postman CLI 檢查以獨立的通過/失敗關卡加入 CI 流程。

DevOps & Cloud2026年10月8日

Api Testing

postmanlabs

Runs tests against an API from the command line — a single ad-hoc request, a full collection of pm.test assertions, or matching real captured app traffic against a collection contract. Use when the user asks to "test this endpoint," "run this collection," "check the API still works," or "verify my app's requests match the contract." Covers `postman request`, `postman collection run`, and `postman application test`. Depends on bootstrap when the target is a cloud collection or workspace-bound environment; a bare URL or local collection needs nothing from bootstrap.

待分類2026年10月8日

Api Monitoring

postmanlabs

Creates, schedules, and manages Postman Monitors — recurring checks against a live API — triggers ad hoc runs, inspects job/run history to diagnose failures, and hosts self-hosted execution runners for monitors on a private network. Use when the user asks to "set up a monitor," "run this monitor now," "check monitor results," "pause/resume a monitor," or "set up a runner for our internal APIs." Covers `postman monitor` (create, update, delete, list, get, pause, resume, run, jobs, runs) and `postman runner` (start, list, regions).

待分類2026年10月8日

Api Mocking

postmanlabs

在本機或雲端建立並執行模擬 API 後端,支援情境與狀態碼覆寫以便測試。

Software Development2026年10月8日

Api Engineer

postmanlabs

指導 API 工程工作,涵蓋契約設計、實作、模擬、測試、文件與部署。

Software Development2026年10月8日