How can I get the e-mail of the user that started a custom run of a flow in the flow itself? I've tried using the
/users/{id}
and
/me
endpoints and I keep getting 404 errors.
c
Chris Guidry
05/02/2024, 1:15 PM
One thought: your flow is running on a worker, right? Is the worker using a service account? Service accounts may not have the permissions to request user details (because users are an account-level API, not a workspace-level one)
j
Jacob Blanco
05/07/2024, 1:46 AM
I see! That's interesting. I ended up side-stepping the issue by using the
FlowRun
object's
CreatedBy.display_value
field. It's not exactly the e-mail but it's identifiable enough that it works for us.
Jacob Blanco
05/07/2024, 2:50 AM
Thanks for getting back to me. It would explain why doing this locally works but it doesn't when deployed to production.
Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.