Finding the userName from within the workflow

I’m trying to obtain the name of the user that submitted the workflow (for reporting purposes). I see in the tower landing page that it is aware that I submitted a workflow (see screen shot) but inside the workflow I accessed workflow.userName (as noted here: Workflow introspection — Nextflow 23.10.0 documentation) but got “root” as the user.

Since tower is aware of my username, I was hoping that I would be able to find this from within the workflow.

Any hints on what I am doing wrong would be greatly appreciated.

image

workflow.userName is a Nextflow variable. It contains the system user account name, not the Seqera Platform username. If I’m not mistaken, Nextflow is not provided with the information you’re looking for, so it’s not possible to get it from within the Nextflow pipeline run.

1 Like

Thanks @mribeirodantas for the fast reply. This is quite unfortunate, but I guess I’ll try to find it during the commandline invocation, if possible.

1 Like