<!--
{
  "availability" : [
    "macCatalyst: 14.0.0 -",
    "macOS: 10.5.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Automator",
  "identifier" : "/documentation/Automator/AMAction/init(contentsOf:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Automator"
    ],
    "preciseIdentifier" : "c:objc(cs)AMAction(im)initWithContentsOfURL:error:"
  },
  "title" : "init(contentsOf:)"
}
-->

# init(contentsOf:)

Loads an Automator action from a file URL.

```
init(contentsOf fileURL: URL) throws
```

## Parameters

`fileURL`

URL that specifies the location of an action file.

## Return Value

The initialized action.

## Discussion

This method is typically invoked by app that use the [`AMWorkflow`](/documentation/Automator/AMWorkflow) class to embed Automator workflows. It is used to allow creation of actions for a workflow.

---

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)