F
Flowman docsWorkflow SDK
Back to app
All docs

Workflow step actions

Reusable primitives under src/workflows/shared/actions/. Each helper is compiled as one or more "use step" functions — they invoke Convex via @/lib/flowman-report so timelines, approvals, and run status stay observable in Flowman.

Passing workflow params

Pass the orchestrator's record into every entry action; callers build filters and prompts directly from record.input, record.projectSlug, record.workflowSlug, and record.runSlug, and record.env (project secrets snapshotted at run start — configure under Environment variables in the app). String params can opt into lookup-backed inputs for project environment keys, HTTP connection profiles, connectors, or coding repositories with projectEnvKey or httpConnectionProfile, or connector, or codingRepository.

For workflows with a required string parameter named prompt, users can build that input from project prompt templates managed under Build → Prompts. Template placeholders use {paramName} syntax. Blank placeholder values are transformed to empty strings, and the applied output is still passed to the workflow as the normal prompt value.

typescript
import type { FlowmanRunRecord } from "@/lib/flowman-route";

// Actions receive record.input, record.projectSlug, and record.env (snapshot of the
// project's Environment variables when the run started — not host .env).
export async function myWorkflow(record: FlowmanRunRecord<{ query?: string }>) {
  "use workflow";
  const hint = typeof record.input.query === "string" ? record.input.query : "";
}

See also Environment variables and codingAgent for the primary workflow integration.