<!--
{
  "availability" : [
    "macCatalyst: 14.0.0 -",
    "macOS: 10.4.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Automator",
  "identifier" : "/documentation/Automator/AMBundleAction",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Automator"
    ],
    "preciseIdentifier" : "c:objc(cs)AMBundleAction"
  },
  "title" : "AMBundleAction"
}
-->

# AMBundleAction

An object that represents an Automator action that’s a loadable bundle.

```
class AMBundleAction
```

## Overview

Automator loads action bundles from standard locations in the file system: `/System/Library/Automator`, `/Library/Automator`, and `~/Library/Automator`.

[`AMBundleAction`](/documentation/Automator/AMBundleAction) objects have several important properties:

- The <doc://com.apple.documentation/documentation/Foundation/Bundle> object associated with the action’s physical bundle
- The action’s view, which holds its user interface
- A parameters dictionary that reflects the settings in the user interface

When you create a Cocoa Automator Action project in Xcode, the project template includes a custom subclass of [`AMBundleAction`](/documentation/Automator/AMBundleAction). This custom class uses the name of the project.

You must provide an implementation of [`run(withInput:)`](/documentation/Automator/AMAction/run(withInput:)), which is declared by the superclass [`AMAction`](/documentation/Automator/AMAction). If you add any instance variables, you must override the [`init(definition:fromArchive:)`](/documentation/Automator/AMAction/init(definition:fromArchive:)) method and the [`write(to:)`](/documentation/Automator/AMAction/write(to:)) method of [`AMAction`](/documentation/Automator/AMAction) to work with them.

## Topics

### Initializing the Action

[`-  awakeFromBundle`](/documentation/Automator/AMBundleAction/awakeFromBundle())

Allows the action object to perform setup tasks requiring the presence of all bundle objects.

### Managing Action Properties

[`bundle`](/documentation/Automator/AMBundleAction/bundle)

The action’s bundle object.

[`hasView`](/documentation/Automator/AMBundleAction/hasView)

A Boolean value that indicates whether the action has a view associated with it.

[`view`](/documentation/Automator/AMBundleAction/view)

The action’s view object.

[`parameters`](/documentation/Automator/AMBundleAction/parameters)

The action’s parameters.

## Relationships

### Conforms To

[`NSSecureCoding`](/documentation/Foundation/NSSecureCoding)

[`Equatable`](/documentation/Swift/Equatable)

[`Hashable`](/documentation/Swift/Hashable)

[`NSCoding`](/documentation/Foundation/NSCoding)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`NSCopying`](/documentation/Foundation/NSCopying)

[`CVarArg`](/documentation/Swift/CVarArg)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

### Inherited By

[`AMAppleScriptAction`](/documentation/Automator/AMAppleScriptAction)

[`AMShellScriptAction`](/documentation/Automator/AMShellScriptAction)

### Inherits From

[`AMAction`](/documentation/Automator/AMAction)

---

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)