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

# Import contacts

> Import contacts through the Brevo API.

`brevo.importContacts` import contacts through the Brevo API.

## Example

```ts theme={null}
import { automation, onDashboardRun } from "automate.ax"
import { brevo } from "automate.ax/brevo"

export default automation("Import contacts", () => {
  onDashboardRun({ title: "Import contacts" })

  brevo.importContacts({
    fileUrl: "https://example.com/contacts.csv",
    listIds: [12],
  })
})
```

## Inputs and output

Inputs:

```ts theme={null}
{
  fileBody?: string
  fileUrl?: string
  jsonBody?: Array<{
    email?: string
    attributes?: Record<string, unknown>
  }>
  listIds?: number[]
  newList?: { folderId: number; listName: string }
  consentGroupIds?: number[]
  disableNotification?: boolean // default: false
  emailBlacklist?: boolean // default: false
  emptyContactsAttributes?: boolean // default: false
  notifyUrl?: string
  smsBlacklist?: boolean // default: false
  updateExistingContacts?: boolean // default: true
}
```

Provide exactly one source: `fileBody` (at most 10 MB), absolute `fileUrl`, or `jsonBody`. Provide either non-empty `listIds` or `newList`, not both. IDs must be positive integers, `listName` must be non-empty, and `notifyUrl` must be absolute. Every JSON row needs an email or attributes.

Returns `{ processId }` for tracking with `brevo.getProcess`. Provide exactly one of `fileBody`, `fileUrl`, or `jsonBody`, and either existing `listIds` or `newList`. Each JSON row needs an email or provider-recognized attributes, allowing SMS-only contacts. By default, Brevo updates existing contacts, keeps contacts unblocked, and sends import notifications. Pass `{ account }` as the second argument to select a named Brevo account binding.
