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.
- readEmailsIMAP inbox fetch with from/subject filters
- readConnectorEmailsHistorical IMAP reads through an existing connector
- classifyEmailsAI email classification and recruiting-source aggregation
- replyToEmailSMTP reply to the triggering email thread
- aiInvokeVercel AI SDK + OpenAI (single-shot completion)
- agentInvokeAI SDK agent with optional HTTP tool access
- codingAgentCodex planning, approval, implementation, and follow-up chat
- httpRequestHTTP API calls with profiles, auth, retries, and mapping
- Wait for approvalConvex + Workflow createWebhook() human gate
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.
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.