Button
Use the Button Field to add interactive buttons to your tables. A button starts a specific action, so workflows need fewer steps. With one click on a button, you can open an external URL, run a custom webhook, run a custom script or run an automation.
The Button Field supports these actions:
- Open URL: Opens a new tab with a URL. A formula in the button field makes the URL. The URL can be static, or dynamic from the data of the current record.
- Run Webhook: Starts a webhook with the configured URL and custom payload. The payload can include data from the current record.
- Run Script: Runs a custom script. The script can do different operations on the current record or on the full table. In the script, use the
rowvariable to get the data of the current record. - Run automation: Runs an automation in the project. The automation starts with the When a button is clicked trigger and receives the current record.
Create a Button Field
- Click the
+icon to the right of theFieldsheader. - In the dropdown modal, enter the field name (optional).
- In the dropdown, select the field type
Button. - Configure the button appearance settings: the button text, color and icon.
- In the dropdown, select the action type.
- Configure the button action settings. The settings depend on the action:
- Open URL: Use the formula editor to create dynamic URLs.
- Run Webhook: Select a webhook in the dropdown. Or, to create a new webhook, click the
+icon. - Run Script: Select a script in the dropdown.
- Run automation: Select an automation in the dropdown, or select Create new automation.
- Click
Save Field.
Button URL

Button Webhook

Edit Webhook
To edit a webhook:
- In the Button field settings, click the
Editicon next to the webhook name. The webhook settings modal opens. - Edit the webhook URL, method, headers and payload.
- Click
Save changes.

To open a webhook after you create it, use the Webhook section in the details tab. For more details, refer to these articles:
Button Script ☁

Button Scripts are also called "Row Actions". Use them to start pre-configured actions directly from a record in Grid, Kanban or Gallery views. You do not have to edit fields manually to update values like status or stage. You can do repetitive updates with one click.
Each button runs a Frontend Script. The script updates the record or does other automated actions. When a user clicks the button, the script runs in the context of that record.
Sample script that updates a field value:
const recordID = cursor?.row?.id;
const table = await base.getTable("Table-1");
if(recordID) {
// Perform operations if recordID is valid
console.log(`Record ID is: ${recordID}`);
// You can add more logic here based on your requirements
await table.updateRecordAsync(recordID, {
"Status": "Completed",
"Title": "Default Title"
})
} else {
// Handle the case where recordID is undefined or null
console.error('Record ID is not defined');
}Button Automation ☁
Select Run automation under On click to run one of the project's automations from the record. Under Automation, select an automation that starts with the When a button is clicked trigger.
An automation runs from one button only. An automation that another Button field or an interface button already runs cannot be selected.
Select Create new automation to start from an empty automation that has the trigger in place. NocoDB creates it when you save the field, then opens it so you can add the rest of the steps.
The automation must be turned on before the button runs it. Each click counts as one automation run against the limit of your plan. For what the automation receives from the click, refer to When a button is clicked.
Conditional Buttons ☁
By default, a button is always enabled for every record in the table. Use Visibility Conditions to control when a button is active, row by row. If a record does not meet the conditions, the button is disabled and shows a "Conditions not met" tooltip. This prevents accidental clicks.
Use this when a button action must be available only in some conditions. For example, enable an "Approve" button only when a status field is "Pending". Or allow a "Send Invoice" button only when the amount is more than a threshold.
Visibility conditions work with all button action types: Open URL, Run Webhook, Run Script and Run automation.

Setting up visibility conditions
- Open the button field configuration. Create a new button field, or edit an existing one.
- Scroll down to the Visibility condition section.
- Expand the section.
- Click Add filter. Define one or more conditions on fields in the current table.
- To combine many conditions with AND/OR logic, use Add filter group.
- Click Save Field.

NocoDB then checks each row in the table against the conditions:
| Result | Button |
|---|---|
| Condition met | The button is enabled, and you can click it. |
| Condition not met | The button is disabled. When you hover over it, it shows a "Conditions not met" tooltip. |

Editing or removing visibility conditions
To change the conditions, open the button field configuration. Then update the filters in the Visibility condition section. To remove all conditions, clear all filters and save the field. The button is then always active.
Availability
- The Run Script and Run automation actions are available on all NocoDB Cloud plans and licensed self-hosted deployments.
Last updated on