# Add AI prompt buttons to tables, lists and details

> Add an AI Prompts button to a Table, List or Details component, or an AI Prompt component, so people can run prompts on the records they see.

Source: https://tadabase.com/docs/ai-features/using-ai-prompts-in-data-components  
Status: Verified Nov 17, 2026. Checked against the current product

Add an **AI Prompts** dropdown button to a Table, List or Details component so the people using your app can run a prompt on the records they are looking at, for example "Summarize these jobs". The answer is shown in a panel under the button; it is not saved to a record.

You need at least one AI prompt in **Automation** > **AI Prompts** first. See [Create an AI prompt](https://tadabase.com/docs/ai-features/adding-ai-prompts-in-tadabase).

## Add the AI Prompts button to a component

1. **Open the component** In the Page Builder, open the page and edit the Table, List or Details component.
2. **Open the AI Prompts tab** Click the **AI Prompts** tab in the component's settings.
3. **Add a prompt** Click **Setup New AI Prompt**. A row is added with the first prompt in your app selected.
4. **Choose the prompt and name the item** Under **Choose AI Prompt**, pick the prompt. **Name** fills in with the prompt's name; change it to the text people should see in the dropdown.
5. **Let people type a question (optional)** Under **Map Input**, choose the prompt variable that should receive what the person types. Leave it on **No Input** to run the prompt with one click.
6. **Send the records (optional)** Under **Map Component Data**, choose the prompt variable that should receive the records shown in this component. Leave it on **No Component** if the prompt does not need them.
7. **Choose the answer** Under **Response**, choose the response to show. Only this one response is displayed.
8. **Style the button** **Button Title** is the text on the dropdown button (default `AI Prompts`). **Button CSS Class** is its style class (default `btn-ai-prompts`).
9. **Save** Save the component.

Add one row per prompt. The trash button removes a row. To group items in the dropdown, click the **+** button (**Add Group**) on a row: a group row is inserted above it, and the text in its **Name** box is shown as a heading that cannot be clicked.

> **Note:** The **AI Prompts** tab is shown only when your plan includes AI prompts. On a Table used in a PDF page, the tab is not shown.

## What the prompt receives

| Setting | Value sent to the variable |
| --- | --- |
| **Map Input** | The text the person types in the **Type your prompt here...** box. |
| **Map Component Data** | The records currently shown in the component, as a JSON list. Each record uses the column or field labels as keys and the displayed text as values. Only what is on the screen is sent: the current page of results, after any filter or search, and only the columns the component shows. |

Variables you do not map use the **Default Value** set on the prompt's **Dynamic Variables** tab.

## What people see in the app

1. The component shows a dropdown button with your **Button Title**.
2. The person opens it and clicks a prompt name.
3. If the prompt has a **Map Input** variable, a text box with the placeholder **Type your prompt here...** opens. The person types a question and presses Enter. Otherwise the prompt runs right away.
4. While it runs, a spinner shows. The answer then appears in a panel under the button, with **Copy** and **Close** buttons. **Copy** copies the answer; **Close** hides the panel.
5. For a prompt with a question box, the box stays open under the answer: the person can type another question and press Enter to run the prompt again.

![A Jobs table in the live app with the AI Prompts dropdown open, listing two prompts](https://tadabase.com/docs-shots/ai-features-table-ai-button.webp)

The answer is shown only to the person who ran it and is not saved. To store AI answers on records, run the prompt in a workflow instead. See [Use an AI prompt in a workflow](https://tadabase.com/docs/ai-features/use-an-ai-prompt-in-a-workflow).

## Add an AI Prompt component to a page

The **AI Prompt** component is a standalone AI Prompts button. Use it when one prompt should read the records of several components on the same page, such as a table of open jobs and a list of technicians.

1. **Add the component** In the Page Builder, drag **AI Prompt** from **Data Components** onto the page. It is listed only when your plan includes AI prompts.
2. **Set up the prompts** The settings open on the **AI Prompts** tab. Click **Setup New AI Prompt** and fill in **Choose AI Prompt**, **Name**, **Map Input** and **Response** as for a table.
3. **Pick the components to read** Under **Map Component Data**, click **Set New**. Choose a component in **Select Component** and the prompt variable that receives its records in **Select Field**. Repeat for each component. Only Table, List and Details components on the same page are listed.
4. **Name the button** On the **General** tab, set **Button Title** and **CSS Class**.
5. **Save** Click **Update & Save**.

In the app it works like the button on a table: a dropdown of prompt names, an optional question box, and a panel with the answer.

## Plans and limits

- AI prompts are a plan feature.
- Every run counts toward your account's daily AI token limit. Sending many records with **Map Component Data** uses more tokens; use filters or a smaller page size to send fewer.
- When the daily limit is used up, the prompt returns no answer until the next day. See [How AI prompts work](https://tadabase.com/docs/ai-features/ai-prompts-complete-guide).

## If it does not work

| What you see | Check |
| --- | --- |
| No button on the component | At least one row on the **AI Prompts** tab has a prompt selected, and the component was saved. |
| The spinner stops but no panel opens | A **Response** is chosen, and the prompt returns a value for it. Test the prompt on its own in the **Test Playground**. Also check whether the daily token limit has been reached. |
| The answer does not mention the records | **Map Component Data** is set, and the prompt text uses that variable in curly brackets, for example `{records}`. |
