To set up a bot that triggers a process when a user changes data in a Google Sheet, perform the following steps:
- Configure AppSheet Events on Google Sheets to allow a data change event to be sent to your app when a user changes data.
- Create the data change events in your AppSheet app that are triggered by Google Sheets.
See Troubleshoot for tips on resolving issues.
Get started
The following video demonstrates how to set up external eventing with Google Sheets, as described in this section.
AppSheet Automation: External eventing with Google Sheets
Configure AppSheet events on Google Sheets
To configure AppSheet Events on Google Sheets to allow a data change event to be sent to your app from the sheets when a user changes data:
- Install the AppSheet Events Add-Onfrom the Add-On marketplace.
- Open a spreadsheet and select Extensions > AppSheet Events > Enable for document to enable the add-on.
- Enable Add-ons> AppSheet Events > Turn events on/off > sheet for each sheet from which you want to send events.
In addition, you can enable the add-on for response sheets from Google Forms.
Create the data change events in your AppSheet app
To create the data change events in your AppSheet app to be triggered by Google Sheets:
- Open the app in the editor.
- Go to Data, click + in the top header of the Data panel, and add tables for the Google Sheets that you enabled to send events in the previous section.
-
We've made some improvements to the app editor.
You are opted in to the new editor by default, but you can switch back to the legacy editor at any time.If you are using the legacy navigation
Go to Data > Tables, click + New Table, and add tables for the Google Sheets that you enabled to send events in the previous section. - Select Data > Table and add tables for the Google Sheets that you enabled to send events in the previous section.
- Select Automation > Events and create an event that triggers on Data Change.
You can configure the event for adds or deletions only, as required. For example, the following event triggers when content is added to the employees table.
- Create a bot that uses that event.
-
When you modify the sheet in Google Sheet, you should see the event trigger after a few seconds. For Google Forms, new rows added to the response sheet through direct interaction with the Google Form can also trigger events.
Note: Third-party (like IFTTT) or scripted interactions will not trigger events.
To learn more about events, see Events: The Essentials.
Troubleshoot
If the event hasn't triggered the bot after a few seconds, check that the event was received in the Automation Monitor. See Monitor automation for more information. You can also try removing and re-adding the event in the automation.
If the event doesn't show up, verify your table selection in Google Sheets and that you are logged into a Google account that has access to both the Google spreadsheet and the AppSheet app (from the Users tab).
If the event did show up but did not run, check that your Table, Condition, and data change type are all correct in the event configuration in AppSheet.