what's the best way to get a url back to a flow ru...
# ask-community
w
what's the best way to get a url back to a flow run when running locally? for context I'm trying to include this url inside of an email message I send on flow failure
k
Hi @Will Milner, you want to include a URL in an email message sent on flow failure?
w
yes, this is running with the backend server
k
So are emails successful already, and the problem is getting the URL in? or are emails not working yet?
w
I have emails sending fine, I just need to include the URL of the current flow that sent the email
k
Ok I gotcha now. Let me look.
w
the closest thing I can find is to just get the flow url returned on registration, but not the url to a specific run of that flow
k
At the moment, I’m not sure this can be done for server because you have access to
flow_id
and
flow_run_id
through the
context
in Cloud. https://docs.prefect.io/api/latest/utilities/context.html#context-2
and you can construct the URL from this. I will continue to dig to confirm though.
👍 1
w
that's the same conclusion I came to, it doesn't seem possible to grab the
flow_run_id
with the server backend
k
@Will Milner this should be available in Server.
w
yup it is available in the context object, thanks!
k
awesome! thanks for telling me @Will Milner