> ## 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.

# Add records to lists

> Add Apollo contacts or accounts to one or more named lists.

`addRecordsToList` adds contacts or accounts to named Apollo lists, creating
missing lists when Apollo permits.

```ts automations/add-apollo-list-members.automation.ts theme={null}
import { addRecordsToList } from "automate.ax/apollo"
import { automation, onHttpRequest } from "automate.ax"

export default automation("Add contacts to Apollo lists", () => {
  onHttpRequest({ scope: "automation" })
  addRecordsToList({
    recordType: "contacts",
    records: ["ada@example.com", "grace@example.com"],
    listNames: ["Event Leads"],
  })
})
```

`recordType` is `"contacts" | "accounts"`; `records` and `listNames` are
non-empty arrays. Set `async: true` for background processing of a large change.
Optional `account` selects the Apollo binding.

Returns `{ lists, job?, message? }`. Synchronous changes return affected lists;
asynchronous changes return a job with `jobId`, entity IDs, progress, type, and
optional batch/user metadata.
