Florian Giroud
09/11/2025, 11:51 AMMarvin
09/11/2025, 11:51 AMMarvin
09/11/2025, 11:59 AMprefect.flow-run.* and prefect.task-run.* events carry state/identity metadata but do not embed the parameters payload.
Where you can see parameters:
- UI: Open a specific Flow Run page and look in the run details “Inputs/Parameters” panel. (Events/Automations views won’t show them.)
- API: Parameters are stored on the flow run record. You can fetch them via the client:
import asyncio
from prefect.client.orchestration import get_client
async def get_params(flow_run_id: str):
async with get_client() as client:
fr = await client.read_flow_run(flow_run_id)
return fr.parameters # dict of your inputs
# Example:
# asyncio.run(get_params("your-flow-run-id"))
If you need parameters in events (e.g., to drive an Automation), emit a custom event at flow start with only the safe/sanitized values you need:
from prefect import flow, get_run_context
from prefect.events import emit_event
@flow
def my_flow(a: int, b: str):
run_id = get_run_context().flow_run.id
emit_event(
event="app.flow.parameters",
resource={"prefect.resource.id": f"prefect.flow-run.{run_id}"},
# include only non-sensitive, minimal info
payload={"a": a, "b_present": b is not None},
)
# ...rest of your flow...
Quick check questions so I can point you to the exact spot:
- Are you looking in the Flow Run details page or the Events/Automations views?
- Cloud or self‑hosted Server, and roughly which Prefect 3.x version?
If your goal is to trigger automations based on parameter values, say the word and I can suggest a pattern (either via custom events like above, or by writing the parameter(s) to an artifact/label that an automation can filter on).