hey <@ULVA73B9P>, which of the prefect events will...
# ask-marvin
f
hey @Marvin, which of the prefect events will contain the flow input parameters, i can not see anything in the UI
m
thought for 472.6 seconds
Short answer: none of the built‑in Prefect events include your flow’s input parameters. The default
prefect.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:
Copy code
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:
Copy code
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).