Button clicked

The When a button is clicked trigger starts a workflow when a user clicks a Run automation button in an interface, or a Button field in a table. What the workflow gets depends on where the button is:

Button locationWhat the workflow getsExample actions
Button field in a tableThe record of the clicked button. The workflow runs on that record."Send contract", "Escalate ticket", "Generate invoice"
Record sheet, record pane, or field groupThe clicked record. The workflow runs on the record that the user looks at."Send contract", "Escalate ticket", "Generate invoice"
Table page header, record review toolbar, or dashboard groupNo record"Generate weekly report"

When a button is clicked trigger node

Ask NocoAI

Copy a prompt, paste it into NocoAI in any base, and replace the words in [brackets] with your own.

  • Build a workflow that runs when someone clicks [a button] on a [Deals] record and [emails the customer]
  • Build a workflow that runs from a button on [Orders] and [sets Status to Shipped]
  • Build a workflow that runs from a button on [Candidates] and [creates an Interview record]

Configuration

The When a button is clicked trigger has no settings of its own. You connect it to a Button field in a table, or to a button in an interface.

To connect it to a Button field:

  1. Open the table and add a Button field, or edit an existing one.
  2. For its On click action, select Run automation.
  3. Under Automation, select this workflow.
  4. Click Save Field.

To connect it to a button in an interface:

  1. In the interface builder, open the button settings of the placement that you want:
    • On a record detail page, record pane, or field group: Page › Record › User actions › Buttons.
    • On a table page, record review list, or dashboard group: User actions › Buttons.
  2. Add a button.
  3. For its Action, select Run automation.
  4. Under Automations, select this workflow. A workflow that is already connected to another button, in an interface or in a Button field, cannot be selected.

You can also select Create new automation from the same list:

  1. Give the automation a name. NocoDB creates a workflow with this trigger already connected to the button.
  2. Click Continue in Workflows to finish the workflow now, or click Finish later.

The trigger panel in the workflow editor shows where the trigger is connected: the table and the Button field, or the table, interface page, and button. To change the connection, edit the button that it names. For an interface button, the panel shows a warning when the button is not yet configured in the published version of the interface.

A workflow can be bound to one button. The workflow must be enabled before the button runs it. An interface button also needs the interface published.

How it works

  • A user clicks the Run automation button on a record or page. Users with the Editor role or above can use the button.
  • The workflow starts once for each click. An Automation started toast shows.
  • For record buttons and Button fields, the trigger outputs the clicked record (record.id and record.fields). It also outputs the table, button, and the user who clicked. An interface button also outputs the page.
  • For page-level buttons, the trigger outputs only the page, button, user, and time.
  • A Button field with a visibility condition runs the workflow only for the records that meet the condition.
  • Each click counts as one workflow run against the run limit of your plan.

Use cases

  • Send a document or email for the record on demand
  • Escalate a ticket or hand it off to another team
  • Start a multi-step process, such as onboarding, from a single button

Availability

  • Available on NocoDB Cloud (all plans) and licensed on-premise deployments. The button itself is configured in the Button field or in Interfaces.

Last updated on

Latest product updates?See Changelog
Stay in the loop? Follow us onLinkedInLinkedInYouTubeYouTubeXX