Skip to main content
Record actions are rendered:
  • on Record pages in Attio
  • in the CMD+K quick action palette.
Register a record action by creating an App.Record.Action and adding it to the record.actions array of your app.ts file.

Example

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

export const sendInvoiceAction: App.Record.Action = {
  id: "send-invoice",
  label: "Send Invoice",
  icon: "Sales",
  onTrigger: async ({recordId}) => {
    // Run code here
  },
  objects: "people",
}
app.ts
import type {App} from "attio"

import {sendInvoiceAction} from "./send-invoice"

export const app: App = {
  record: {
    actions: [sendInvoiceAction],
    // ...
  },
  // ...
}

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 ({ recordId: string }) => Promise<void>
The function to run when the action is triggered. You’ll likely want to show a dialog or run a server function here.
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