Manage an event in a bot as described in the following sections:
- What is an event?
- Externally triggered events
- Add an event to a bot
- Configure an app event
- Configure an AppSheet database event
- Configure a scheduled event
- Configure a Chat event
- Configure a Forms event
- Configure a Gmail event (beta)
- Copy an existing event
- View events
- Edit an event
- Delete an event
- Example: Trigger a schedule event on a specific date
What is an event?
An event defines the activity or schedule that triggers a process. You can configure the types of events summarized in the following table.
Event type | What triggers this event type? |
App | Data is added, modified, or deleted through the app. For example, the status of a service ticket is changed through the app. See Configure an app event . |
AppSheet database | Data is added, modified, or deleted in one or more columns in an AppSheet database. For example, the status of a service ticket is changed directly in the AppSheet database. See Configure an AppSheet database event . |
Scheduled | Set to occur periodically at a specific time. For example, every Monday morning at 9 AM. See Configure a scheduled event . |
Google Chat app | Chat interactions, including interacting with a slash command in a Chat space, or adding or removing a Chat app in a Chat space. See Configure a Chat event . |
Google Forms | Response for a form from Google Forms is received. For example, a travel request is sent for approval. See Configure a Google Forms event . |
Gmail (beta) | Label is added or removed from an email message in Gmail. See Configure a Gmail event (beta) . Gmail events are triggered by external sources. See Externally triggered events . |
Externally triggered events
Most events are triggered by some change in the app data. For example, the Status
column in an Orders
table is changed to Complete
.
Some events are triggered by an activity that occurs external to the app, and don't rely on an AppSheet table from a predefined data source to trigger a process. For example, a Gmail event (beta) that triggers a process when a label is added or removed from an email message.
Externally triggered events:
- Only appear in the Automation tab of the editor
- Don't appear as tables in the Data tab
Note: When you add an externally triggered event to an automation, a data source is added to your account which can be used in your automations, but no table is added to your app. - Don't require system views, actions, and so on
- Don't support AI tasks or data actions (such as delete row, set row values, and so on) that require access to data in a table
For Gmail events, you can access and save email content to an existing table in your app, as described in Build an automation using Gmail .
For data change events that are triggered externally in Sheets or Salesforce data sources, external configuration is necessary. See Sheets and Salesforce , respectively.
Add an event to a bot
To add an event to a bot:
- Add a bot .
-
In the center panel, click Configure event.
-
In the Event namefield, enter a name for the event.
-
Do one of the following:
- To reuse an existing event
, select an event under From this App.
For more information, see Reuse automation components. - To create a new event, do one of the following:
- Click Create a new event .
- Select an event from the list of Suggestions.
AppSheet Automation is an intent-aware platform. The platform understands user intent and recommends configuration options that align with what you are trying to achieve. For example, selecting the following suggestion would configure a process and Send an email task for you:
When Available record is updated, send an email
- To reuse an existing event
, select an event under From this App.
- Select and configure one of the following event sources:
-
Save the app.
Configure an app event
To add an app event, configure the following settings:
Setting
Description
Event name
Name of the event.
Event source
Select App .
Data change type
Select the data change types made through the app that trigger the event. Select one or more of the following options: Adds, Deletes, Updates.
Table
Select the table whose data changes trigger the event.
To view or edit the structure of the selected table, position your cursor in the field and click . See Tables: The Essentials
for more information.
Condition
Condition to check before triggering the event.
Bypass Security Filters?
Enable or disable reuse of this component by expanding the Linking panel and toggling the Linking setting. See Reuse automation components .
The following shows an example of an App change event that is triggered by any change (add, delete, or update) to the Inventory table.
Configure an AppSheet database event
Before you can add an AppSheet database event, you must:
- Create an AppSheet database. See Create and copy databases .
- Add the AppSheet database to your app by creating an app from the AppSheet database or adding the AppSheet database to an existing app . In each case, select AppSheet databases as the data source and then navigate to the database.
Add an event to a bot , and configure the settings for an AppSheet database event, as follows:
Setting
Description
Event name
Name of the event.
Event source
Select AppSheet database .
Table
Select the table whose data changes trigger the event.
To view or edit the structure of the selected table, position your cursor in the field and click . See Tables: The Essentials
for more information.
Data change type
Select the data change types made to the AppSheet database that trigger the event. Select one or more of the following options: Adds, Deletes, Updates.
Note: This field is displayed only when Updatesis selected for Data change type.
Columns from the selected table whose data updates trigger the event. Open the drop-down and select one or more columns.
For example:
Make sure you select only those columns that you want to trigger the event. For example, you might want to be notified when the status or due date is changed, but not for other changes. In this example, you'd select only the Status and Due Date columns, but not the other column to avoid excessive or unnecessary notifications.
Condition
Condition that must be true to trigger the event.
Note: To trigger an event based on the time that any data is updated in a row of the AppSheet database, do one of the following:
- Select all columns in the Column to watch for updates field.
- Add a column of type
Update row timestamp
to track updates made to any row. For more information, see Track changes made through an AppSheet database or the app .
Enable or disable reuse of this component by expanding the Linking panel and toggling the Linking setting. See Reuse automation components .
Configure a scheduled event
Add an event to a bot , and configure the settings for a scheduled event, as follows
Setting
Description
Event name
Name of the event.
Event source
Select Scheduled .
Schedule
Set the schedule and time for the event.
Set the time zone for the schedule event.
For Each Row In Table
Flag that specifies whether to operate on each row in the specified table.
Table
- This field only displays if For Each Row In Table is enabled.
- If you have partitioned the data , only one partition will be evaluated, based on the Filter Condition.
Table referenced by the event. Select an existing table in the list.
Click View definition to view the structure of the selected table. See Tables: The Essentials for more information about adding tables.
Filter Condition
Filter condition to use to identify which rows in table are impacted.
Condition
Condition that must be true to trigger the event.
Bypass Security Filters?
Toggle to indicates whether to execute as though there are no security filters on the data sources.
Enable or disable reuse of this component by expanding the Linking panel and toggling the Linking setting. See Reuse automation components .
The following shows an example of a Scheduled event that is triggered every day at 12:00 PM UTC.
Configure a Chat event
Add an event to a bot , and configure the settings for a Chat event, as follows
Setting
Description
Event name
Name of the event.
Event source
Select Chat .
Chat interaction
Chat interaction that triggers the event:
- Slash command- Slash command is issued in the Chat space.
- Added to space- Chat app is added to a Chat space.
- Removed from space- Chat app is removed from the Chat space.
Name
Note: Valid only if Slash commandis selected as the Chat interaction.
Slash command that triggers the event.
Description
Note: Valid only if Slash commandis selected as the Chat interaction.
Description of the slash command that triggers the event.
The following shows an example of a Chat event.
Configure a Google Forms event
You must be a Google Workspace userto build AppSheet automations with Google Forms. See Add AppSheet to Google Workspace .
If you are using your Google Workspace account, the Google Workspace Terms of Service govern your use of Google Forms. Otherwise, refer to the Google Terms of Service .
Actions that are triggered by a Google Forms event can rely only on read-only data.
Before you can add a Google Forms event, you must:
- Create a form in Google Forms. See How to use Google Forms .
-
Do one of the following:
- Create an app from the form
- Add the form to an existing app
In each case, select Google Formsas the data source, navigate to the form, and click Select.
See also Build an automation using Google Forms .
Add an event to a bot , and configure the settings for a Google Forms event, as follows
Setting |
Description |
Event name |
Name of the event. |
Event source |
Select Forms . |
Form |
Select the form from Google Forms that triggers the event. Note: You need to ensure that the form is added as a table to your app before you use it in a Google Forms event. |
Condition |
Condition that must be true to trigger the event. |
Bypass Security Filters? | Not supported for Google Forms events.Triggers from event sources that are external to the app can only be run as the app owner. |
Event icon | Expand the Displaysection and select an icon for the event. |
Descriptive comment | Expand the Documentationsection and enter a comment that describes the purpose of the event. |
The following shows an example of a Forms event that is triggered when a Travel Request form is submitted.
Configure a Gmail event (beta)
This is a beta release of building automations using Gmail events. See Track and manage feature releases . Preview offerings are intended for use in test environments only. This feature is not recommended for use in production apps. For questions or assistance with this feature, contact AppSheet Support .
You must be a Google Workspace userto build AppSheet automations with Gmail. See Add AppSheet to Google Workspace .
If you are using your Google Workspace account, the Google Workspace Terms of Service govern your use of Gmail. Otherwise, refer to the Google Terms of Service .
Gmail events can be triggered when you add or remove a label from an email message in Gmail.
You can create a new label to trigger the Gmail event, as described in Create labels to organize Gmail . Alternatively, you can use one of the default Gmail labels (Inbox, Unread, Starred, and so on). You can apply a label automatically using a filter, as described in Create rules to filter your emails . See also How to support collaborative or delegated email sources .
After the Gmail event is triggered, you can access content in the email message associated with the event using the available message column values. See How to access content in the email messages . All email message content is read-only.
Note: When a Gmail event is triggered for a message on an email thread, the automation is also triggered for each subsequent reply in the thread.
See also: Build an automation using Gmail
Add an event to a bot , and configure the settings for a Gmail event, as follows:
Setting
Description
Event name
Name of the event.
Event source
Select Gmail .
Authorize
If no Gmail account has been authorized and connected as a data source, do the following:
- Click Authorize.
The Add a new data source dialog displays. - Click Gmail (beta).
The Choose an account dialog displays. - Choose an account or click Use another accountand respond to the prompts to allow access to the Gmail account.
Note: Gmail events are tableless . When you connect a Gmail account to your AppSheet app when adding a Gmail event to an automation, it is added as a data source but no table is added to your app. For more information, see What is a tableless event? To view or delete the Gmail data source, see Use multiple data sources .
Account
Select the Gmail account in the drop-down that you want to use to trigger this event. To authorize a new Gmail account, select Connect another accountand follow the prompts.
Define the email label and label interactions that trigger the event.
- Select a label from the list associated with the Gmail account in the drop-down.
- Select one or both of the following label interactions:
- Added label to email
- Removed label from email
The following shows an example of a Gmail event that is triggered when the Urgentlabel is added to or removed from an email message in the user@altostrat.com
Gmail account.
Copy an existing event
When you copy an event, the name of the new event defaults to the name of the current event followed by a unique number (starting with 1 and incrementing), such as My Event 1 .
To copy an existing reusable event:
- Open the app in the editor.
- Go to Automation
> Events .
- Select the event you want to copy in the Events panel.
- Select More
> Duplicate.
We've made some improvements to the app editor
.
You are opted in to the new editorby default, but you can switch back to the legacy editor
at any time.
If you are using the legacy editor
To copy an existing event:
- Select Automation > Events .
- Select the event you want to copy.
- Click Copy in the event heading.
View events
To view an event in a bot, select Automation
> Bots
, select the bot in the Bots panel, and click the event in the main panel.
To view all events by table, select Automation
> Events
. By default, only reusable (linkable) events
are shown. To view all events, turn on Show all automation components, as described in Configure app editor settings
.
You are opted in to the new editorby default, but you can switch back to the legacy editor at any time.
If you are using the legacy editor
To view all events, select Automation > Events . Events are organized based by table.
If an event is used by one or more bots, it displays a reusability indicator (number adjacent to the event name) to indicate the number of bots using the event. In the example below, the Scheduled: Every day event is a reusable component that is used in two bots.
Click the number to view the list of bots that are using the event. For more information, see Reuse automation components .
Edit an event
To edit an event, view the event in the app editor, edit the configuration, and save your changes.
Delete an event
To remove an event from a bot in the editor, select Remove in the drop-down menu. It is removed from the bot but retained on the Events tab.
- Select Automation
> Events .
- Select the event you want to delete in the Events panel.
- Select More
> Delete.
You are opted in to the new editorby default, but you can switch back to the legacy editor at any time.
If you are using the legacy editor
To delete a reusable event:
- Select Automation > Events .
- Expand the event you want to delete.
- Click Delete in the event heading.
Example: Trigger a schedule event on a specific date
Trigger a schedule event automatically at predetermined dates obtained from the app's data. This can be done using the Condition
setting of the scheduled report.
For example, suppose you have a table called Tasks
. Each row in this table is a task that you have to perform, and each task has a Date
column that stores the date when you have to perform the task. You can set up a scheduled report that will automatically send you an alarm
message to remind you of the task at 7:00 am on the day the task is supposed to be carried out.
To do this, in the app editor, configure the schedule event as follows:
Setting |
Setting |
Event name |
Any event name |
Event source |
Schedule |
Schedule |
Daily |
Time |
7:00 am |
Time zone |
Set according to your time zone |
For EachRowInTable |
Enable |
Table |
Tasks |
Filter Condition |
|
Here's how the schedule works. Every day, at 7:00 am, the schedule will go through each task in the Tasks table and check the date of the task. If the date of the task is the current date, the schedule will be triggered, and an alert message will be sent.
Note : This design will not work if you want to trigger reports at specific times (hours and minutes) obtained from the app's data.