<!--
{
  "availability" : [
    "macCatalyst: 14.0.0 -",
    "macOS: 10.4.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Automator",
  "identifier" : "/documentation/Automator/AMWorkflowControllerDelegate/workflowController(_:willRun:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Automator"
    ],
    "preciseIdentifier" : "c:objc(pl)AMWorkflowControllerDelegate(im)workflowController:willRunAction:"
  },
  "title" : "workflowController(_:willRun:)"
}
-->

# workflowController(_:willRun:)

Notifies the delegate when the specified action is about to run.

```
optional func workflowController(_ controller: AMWorkflowController, willRun action: AMAction)
```

## Parameters

`controller`

The controller object sending the message.

`action`

The workflow action to run.

## Discussion

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)