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

# Call recording summary text selection action

> Call recording summary text selection actions are a way to perform an action based on a text selection on a call recording summary.

<img className="dark:hidden" width="720" height="440" noZoom src="https://mintcdn.com/attio/2EyaTyByKNPeSVcd/images/text-selection-summary.png?fit=max&auto=format&n=2EyaTyByKNPeSVcd&q=85&s=0bfd063131a03d2565000dec5cd3dd21" data-path="images/text-selection-summary.png" />

<img className="hidden dark:block" width="720" height="440" noZoom src="https://mintcdn.com/attio/2EyaTyByKNPeSVcd/images/text-selection-summary-dark.png?fit=max&auto=format&n=2EyaTyByKNPeSVcd&q=85&s=da5b3773807e93b911240999d71dd927" data-path="images/text-selection-summary-dark.png" />

```ts theme={"system"}
import type {App} from "attio"
```

Register a call recording summary text selection action by creating an
`App.CallRecording.Summary.TextAction` and adding it to the `callRecording.summary.textActions`
array of your [`app.ts`](./app-ts) file.

## Example

```tsx process-call-summary.ts theme={"system"}
import type {App} from "attio"
import {showDialog} from "attio/client"
import {ProcessCallSummaryDialog} from "./your-code"

export const processCallSummaryAction: App.CallRecording.Summary.TextAction = {
  id: "process-call-summary",
  label: "Process summary",
  onTrigger: async ({markdown, text}: {markdown: string; text: string}) => {
    await showDialog({
      title: "Process call summary",
      Dialog: ({hideDialog}: {hideDialog: () => void}) => {
        return <ProcessCallSummaryDialog markdown={markdown} text={text} onDone={hideDialog} />
      },
    })
  },
}
```

```tsx app.ts theme={"system"}
import type {App} from "attio"

import {processCallSummaryAction} from "./process-call-summary"

export const app: App = {
  callRecording: {
    summary: {
      textActions: [processCallSummaryAction],
    },
    // ...
  },
  // ...
}
```

## Arguments

<ParamField path="id" type="string" required>
  The unique identifier for this call recording summary selection action.

  It is only used internally; never shown to the user.
</ParamField>

<ParamField path="label" type="string" required>
  A human-readable label of the call recording summary selection action that will be shown to the
  user when they make a text selection on a call recording summary.
</ParamField>

<ParamField path="icon" type="string">
  An [`AttioIcon`](../icons) to display beside the label.

  <Tip>
    If no `icon` prop is provided, it will default to your app's icon that you set up in the
    [Developer dashboard](https://build.attio.com).
  </Tip>
</ParamField>

<ParamField path="onTrigger" type="async (selection: {text: string; markdown: string}) => Promise<void>">
  The function to run when the action is triggered. You'll likely want to [show a
  dialog](../dialogs/show-dialog) or run a [server function](../server/server-functions) here.

  The function will be given an object containing:

  * `markdown` – a markdown respresentation of the text selected (e.g. may include bullet points)
  * `text` – the plain text of the text selected
</ParamField>
