You can use Google Calendar data in your AppSheet apps.
You should first add Google Calendar as a data source via the Account > Data Sources page on the AppSheet web site. Once you do this, your Google Calendar account becomes another data source for tables in any of your apps. Note that the typical Google user account actually has multiple calendars: a primary calendar as well as several secondary calendars (e.g. US National Holidays calendar). Each calendar is modeled in AppSheet as a table whose entries have a predetermined column structure.
To use Google Calendar data in your app, simply choose to add a new table to your app, select the Google Calendar data source you previously added, and then select one of the calendars in your account.
Like all other tables, calendar entries may be added, updated, or deleted depending on the table permissions chosen.
Typical Usage Patterns
- Most users will use the "primary" Google Calendar
- To view calendar data, it's common to use add a virtual Thumbnail column to create a text icon image, using the app formula, TEXT_ICON(LEFT(CONCATENATE([Start]), 10)). AppSheet doesn't have a traditional calendar view of data; however, a deck view sorted by the Start column may be appropriate.
- AppSheet apps are best suited for viewing and modifying calendar entries that are associated with existing data in other tables; they are not meant to replace custom calendaring applications.
The most common associations between another table and a calendar table are via the Creator and Attendees columns. For example, consider an app with two tables: Customers (with a column called Email) and Calendar. We have provided two built-in formula functions to easily construct virtual columns in the Customer table that model related Calendar entries.
- GCAL_MEETINGS_FROM("Calendar", [Email]): use in the app formula of a virtual column to find meeting requests sent by each customer. The generic structure is GCAL_MEETINGS_FROM(CalendarTable, SenderEmail).
- GCAL_MEETINGS_WITH("Calendar", [Email]): use this in the app formula of a virtual column to find meeting requests where the customer is an attendee. The generic structure is GCAL_MEETINGS_WITH(CalendarTable, AttendeeEmail).
The Google Calendar API always provides dates and times in US/English locale, in the form, MM/DD/YYYY. Consequently, it's important to ensure the AppSheet table for the Google calendar is also marked as having the US/English locale. This has no effect on how dates are shown in the app; the format of dates in the app depends only on the locale of the user's device or browser.