- 29 Feb 2024
- 3 Minutos para leer
- Impresión
- OscuroLigero
- PDF
Airtable automation trigger: When a button is clicked
- Actualizado en 29 Feb 2024
- 3 Minutos para leer
- Impresión
- OscuroLigero
- PDF
Learn how the "When a button is clicked" automation trigger can allow you to connect an automation to a button element in interfaces. This powerful connection means that users collaborating in interfaces can cause an automation to run at the click of a button.
Introduction
All plan types/levels | |
"Owner" or "Creator" permissions are needed to create automations as described in the article below. | |
Platform(s) | Web/Browser, Mac app, and Windows app |
Related reading | Interface element: Button - In order to use an automation containing the "When a button is clicked" trigger, you'll need to connect it to an interface via the "Button element" in an interface. |
Airtable terminology | Interface - An interface is a curated representation of base data created using Interface Designer. Interfaces are fully customizable and can contain various visual elements, data sources, and permissions. Element - Elements are the essential building blocks of interfaces. Builders can add visual elements like grids and timelines, design elements like text and dividers, and functional elements like buttons and comments, to present their base data in a customized way. |
Creating a button-triggered automation
Navigate to the "Automations" tab in the base where you would like to create the automation.
NOTE
Keep in mind that incompatible automations can't be selected. Hover move your cursor over the automation(s) to learn why they aren't compatible.
Add a new automation or choose a previously configured automation.
Choose the "When a button is clicked" trigger from the drop-down list.
At this point, you'll see that the "Configuration" section has additional instructions.
To configure an automation containing this trigger type you will need to navigate to the "Interfaces" tab in the top left section of an open base and create a new interface or edit a previously created interface.
Connect the automation to an interface
Enter editing mode in the interface of your choosing. There are two options for adding a button to an interface that will run an automation:
Button element
Add a button element or navigate to an interface page that contains the button element you want to configure. More information on button elements can be found here.
Choose the "Run automation" action type within the button element you are configuring. Next, choose a source for the button element. This step allows Airtable to determine which table the interface and automation will be using as a source. The interface page you added the button element to must contain either a Record picker element or the Record list element from the Record review layout.
Now, you will choose the automation that you began setting up in steps 1-3 above.
At this point, you can return to the automation to continue the configuration process there by clicking the box and arrow icon.
Configure one or more automation actions, test the automation, and then turn it on.
Once the automation has been turned on, you'll need to return to the interface and publish it before users interacting in the interface will be able to click the button you've created. Here, you can also make any adjustments to the button's name, appearance, and position on the interface page before publishing.
NoteIt's worth knowing that the user who clicked on a button in an interface can be referenced in later automation steps via tokens that reference the "When a button is clicked" trigger. This is extremely helpful when adding dependencies or follow-up communications to a workflow.
A button in a record detail layout
Open up or create a record detail page and add a button under the “User actions” section.
Then click the square and arrow icon to navigate to the button’s properties.
Under the “Action” section, click the Run automation option.
Under the “Automation” section select the automation that you began setting up in steps 1-3 in the section above.
Click the “Turn on in Automations” link to continue configuring the automation.
From here continue configuring the automation by adding one or more actions.
Once you’ve configured, tested, and turned on the automation, remember that you will need to return to the interface setup and publish the interface before end-users will be able to click the button and run the automation.
NoteIt's worth knowing that the user who clicked on a button in an interface can be referenced in later automation steps via tokens that reference the "When a button is clicked" trigger. This is extremely helpful when adding dependencies or follow-up communications to a workflow.
FAQs
What happens when a button element source changes?
The automation source will be automatically updated if your connected automation isn't connected to other button elements. But if your automation is enabled, any unpublished changes must be applied to the live automation.
Applying these changes may require the automation actions to be reconfigured to use the new source. Airtable recommends publishing the interface simultaneously to avoid source incompatibility between the published version of the interface and the automation.