> ## Documentation Index
> Fetch the complete documentation index at: https://docs.automate.ax/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Automate.ax automations are TypeScript programs.
> Use Bun for installation and command examples.
> Use Automate.ax for the product name and automate.ax for the package, CLI, and domain.
> Treat documented public APIs as current; do not invent transitional or deprecated names.

# Attach item file

> Attaches binary content to a file field on an existing item.

`onePassword.attachItemFile` attaches binary content to a file field on an existing item.

This action requires a service-account connection.

## Example

```ts automations/onepassword-attach-item-file.automation.ts theme={null}
import { automation, onSchedule } from "automate.ax"
import { onePassword } from "automate.ax/onepassword"

export default automation("Attach item file", () => {
  onSchedule({ schedule: "0 * * * *" })

  const item = onePassword.getItem({
    itemId: "item-id",
    vaultId: "vault-id",
  })
  onePassword.attachItemFile({
    item,
    file: {
      content: new Uint8Array([1, 2, 3]),
      fieldId: "field-id",
      name: "document.pdf",
      sectionId: "section-id",
    },
  })
})
```

## Inputs

Provide the complete decrypted `item` and a `file` with `Uint8Array` content, name, section ID, and field ID. Every input accepts a compatible signal. Account-backed actions accept an optional second argument `{ account }` to select a named binding.

## Output

Returns the updated decrypted item. The output is sensitive.
