<!--
{
  "availability" : [
    "macCatalyst: 14.0.0 -",
    "macOS: 10.5.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Automator",
  "identifier" : "/documentation/Automator/AMAction/runAsynchronously(withInput:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Automator"
    ],
    "preciseIdentifier" : "c:objc(cs)AMAction(im)runAsynchronouslyWithInput:"
  },
  "title" : "runAsynchronously(withInput:)"
}
-->

# runAsynchronously(withInput:)

Causes Automator to wait for notification that the action has completed execution, which allows the action to perform an asynchronous operation.

```
func runAsynchronously(withInput input: Any?)
```

## Parameters

`input`

The input for the action. Should contain one or more objects compatible with one of the types specified in the action’s [`selectedInputType`](/documentation/Automator/AMAction/selectedInputType) property.

## Discussion

Override this method in actions that need to make asynchronous calls. After [`runAsynchronously(withInput:)`](/documentation/Automator/AMAction/runAsynchronously(withInput:)) is invoked, Automator doesn’t continue until the action invokes [`finishRunningWithError(_:)`](/documentation/Automator/AMAction/finishRunningWithError(_:)). In your override of this method, you can make an asynchronous call, wait to be notified of its completion, then invoke [`finishRunningWithError(_:)`](/documentation/Automator/AMAction/finishRunningWithError(_:)) to signal to Automator that the action has completed.

> Warning:
> Failure to invoke ``doc://com.apple.automator/documentation/Automator/AMAction/finishRunningWithError(_:)`` can cause a workflow to stall indefinitely.

For actions that don’t need to make asynchronous calls, use [`runWithInput:fromAction:error:`](/documentation/Automator/AMAction/runWithInput:fromAction:error:) instead.

---

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)