Hi, Can we access the flow-run-id inside the flow ...
# ask-community
s
Hi, Can we access the flow-run-id inside the flow when it's running? I mean, something like
this.id
in the currently running flow.
d
Yes perfect context contain this information. Look here in the doc https://docs.prefect.io/api/latest/utilities/context.html
👍 1
You can access it from any task
s
Thanks @davzucky 👍
p
Copy code
prefect.context.get("flow_run_id")
this will get you the flow run id.
👍 1