Trigger name variable for runbooks missing


I have a runbook, and I need to know if it was triggered by a user og by an automated trigger. However when reading the variable $OctopusParameters[‘Octopus.Deployment.Trigger.Name’] within the runbook, being triggered by either a user or a scheduled trigger, it’s empty. Is this system variable not supported in Runbooks?

OD v2020.4.6

Hi Jasper,

Thanks for getting in touch!

It is possible to output all available variables to the task log by adding OctopusPrintEvaluatedVariables with a value of true as a project variable.

I’ve run a test of this and it does look like the Octopus.Deployment.Trigger.Name variable is not included with Runbooks.

You could perhaps use the Octopus.Deployment.CreatedBy.DisplayName variable though, it should state System for a trigger or the applicable user name otherwise.

I will reach out to our engineers to see if we can get Octopus.Deployment.Trigger.Name added to RunBooks as it does seem like it should be there.


This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.