Skip to main content
Bulk record actions are rendered when multiple record rows are selected in Attio. Register a bulk record action by creating an App.Record.BulkAction and adding it to the record.bulkActions array of your app.ts file.

Example

send-invoices.ts
import type {App} from "attio"

export const sendInvoicesAction: App.Record.BulkAction = {
  id: "send-invoices",
  label: "Send Invoices",
  icon: "Sales",
  onTrigger: async ({runRecordBatches}) => {
    // Run code here
  },
  objects: "people",
}
app.ts
import type {App} from "attio"

import {sendInvoicesAction} from "./send-invoices"

export const app: App = {
  record: {
    bulkActions: [sendInvoicesAction],
    // ...
  },
  // ...
}

Arguments

id
string
required
The unique identifier for this action.It is only used internally; never shown to the user.
label
string
required
The human readable label for the record action.
icon
AttioIcon | string
An icon to display in the action, either an AttioIcon or a string .png referencing a file in your app’s assets directory.
If no icon prop is provided, it will default to your app’s icon that you set up in the Developer dashboard.
onTrigger
async ({ runRecordBatches<TWorkerResult>( options: RunRecordBatchesOptions, worker: (batch: RecordBatch) => Promise<TWorkerResult> ): Promise<BulkRecordActionBatchRunOutcome<Exclude<TWorkerResult, void>>>, object: ObjectSlug }) => Promise<void>
The function to run when the action is triggered. It receives an object with:
  • runRecordBatches — Processes the selected records in batches (up to 250 per batch). Call it with options (batchSize, and optional onStart, onProgress, onComplete, and onError lifecycle hooks) and a worker function that receives each RecordBatch and returns a promise. Returns a BulkRecordActionBatchRunOutcome with either success: true and results, or success: false with partialResults and error.
  • object — The object slug being processed (e.g. "people", "companies").
You might run a server function inside the worker for each batch, and/or show a dialog or toast based on the outcome of runRecordBatches.
objects
ObjectSlug | Array<ObjectSlug>
A single slug or an array of slugs to select which types of record the record action will apply to.Defaults to undefined, which will cause the action to show on all types of records.The built-in slugs are