Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

Connecting Amazon Q Business to Google Calendar using APIs

Focus mode
Connecting Amazon Q Business to Google Calendar using APIs - Amazon Q Business

You use the CreateDataSource action to connect a data source to your Amazon Q application.

Then, you use the configuration parameter to provide a JSON blob that conforms the AWS-defined JSON schema.

For an example of the API request, see CreateDataSource in the Amazon Q API Reference.

Google Calendar configuration properties

The following table provides information about configuration properties required in the schema.

Configuration Description Type Required
connectionConfiguration Configuration information for the data source.

object

This property has the following sub-property: repositoryEndpointMetadata.

Yes
repositoryEndpointMetadata The endpoint information for the data source. This data source doesn't specify an endpoint. You choose your authentication type: serviceAccount and OAuth2. The connection information is included in an AWS Secrets Manager secret that you provide the secretArn.

object

This property has the following sub-property: authType.

Yes
authType Choose between serviceAccount and OAuth2, based on your use case.

string

Yes
repositoryConfigurations Configuration information for the content of the data source. For example, configuring specific types of content and field mappings.

object

This property has the following sub-properties: file and comment.

Yes
  • 1) Calendar

  • 2) Event

A list of objects that map the attributes or field names of your Google alendar to Amazon Q index field names.

object

object

These properties have the following sub-properties.

  • indexFieldName

  • indexFieldType

  • dataSourceFieldName

  • dateFieldFormat

No

indexFieldName

The field name of your Google Drive to Amazon Q index field names.

string

Yes

indexFieldType

The field type of your Google Drive to Amazon Q index field names.

string

The allowed values are STRING, STRING_LIST, and DATE.

Yes

dataSourceFieldName

The data source field name of your Google Calendar to Amazon Q index field names.

string

Yes

dateFieldFormat

The date format of your Google Calendar to Amazon Q index field names.

string

Specify the date format in the form yyyy-MM-dd'T'HH:mm:ss'Z'

No
additionalProperties Additional configuration options for your content in your data source

object

This property has the following sub-properties.

  • isCrawlAcl

  • fielForUserId

  • InclusionUserList

  • exclusionUserList

  • enableDeletionProtection

  • DeletionProtectionThreshold

Yes
isCrawlAcl Specify true to crawl access control information by default from documents.
Note

Amazon Q Business crawls ACL information to ensure responses are generated only from documents your end users have access to. See Authorization for more details.

boolean

No
fieldForUserId Specify field to use for UserId for ACL crawling.

string

No
inclusionUsersList exclusionUsersLists

A list of email IDs to exclude specific users from your Google Calendardata source. Users whose email IDs match these will be excluded from the index, while users whose email IDs do not match will be included. If a file matches both an exclusion and an inclusion, the exclusion takes precedence, and the file will not be included in the index.

array

No
  • type

The type of source. We recommend GOOGLECALENDAR as your data source type.

string

Valid values are GOOGLECALENDAR.

No
  • enableIdentityCrawler

true to activate identity crawler. Identity crawler is activated by default. Crawling identity information on users and groups with access to certain documents is useful for user context filtering. Search results are filtered based on the user or their group access to documents.
Note

Amazon Q Business crawls ACL information to ensure responses are generated only from documents your end users have access to. See Authorization for more details.

boolean

Yes
  • syncMode

Specify whether Amazon Q should update your index by syncing all documents or only new, modified, and deleted documents.

string

You can choose between the following options: Use FORCED FULL CRAWL to freshly re-crawl all content and replace existing content each time your data source syncs with your indexUse.Use FULL CRAWL to incrementally crawl only new, modified, and deleted content each time your data source syncs with your index

Yes
  • SecretARN

The Amazon Resource Name (ARN) of an AWS Secrets Manager secret that contains the key-value pairs required to connect to your Google Drive.

.

string

The secret must contain a JSON structure with the following keys:

If using Google Service Account authentication: {"clientEmail": "user account email","adminAccountEmail": "service account email","privateKey": "private key"}If using OAuth 2.0 authentication:{"clientID": "OAuth client ID","clientSecret": "client secret","refreshToken": "refresh token"}

No
  • version

The version of this template that's currently supported.

string

No

Google Calendar JSON schema

The following is the Google Calendar JSON schema:

{ { "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", "properties": { "connectionConfiguration": { "type": "object", "properties": { "repositoryEndpointMetadata": { "type": "object", "properties": { "authType": { "type": "string", "enum": [ "OAuth2", "serviceAccount" ] } }, "required": [ "authType" ] } }, "required": [ "repositoryEndpointMetadata" ] }, "repositoryConfigurations": { "type": "object", "properties": { "calendar": { "type": "object", "properties": { "fieldMappings": { "type": "array", "items": [ { "type": "object", "properties": { "indexFieldName": { "type": "string" }, "indexFieldType": { "type": "string", "enum": [ "STRING", "DATE", "STRING_LIST", "LONG" ] }, "dataSourceFieldName": { "type": "string" }, "dateFieldFormat": { "type": "string", "pattern": "yyyy-MM-dd'T'HH:mm:ss'Z'" } }, "required": [ "indexFieldName", "indexFieldType", "dataSourceFieldName" ] } ] } } }, "event": { "type": "object", "properties": { "fieldMappings": { "type": "array", "items": [ { "type": "object", "properties": { "indexFieldName": { "type": "string" }, "indexFieldType": { "type": "string", "enum": [ "STRING", "DATE", "STRING_LIST" ] }, "dataSourceFieldName": { "type": "string" }, "dateFieldFormat": { "type": "string", "pattern": "yyyy-MM-dd'T'HH:mm:ss'Z'" } }, "required": [ "indexFieldName", "indexFieldType", "dataSourceFieldName" ] } ] } } } } }, "additionalProperties": { "type": "object", "properties": { "fieldForUserId": { "type": "string" }, "isCrawlAcl": { "anyOf": [ { "type": "boolean" }, { "type": "string", "enum": [ "true", "false" ] } ] }, "inclusionUsersList": { "type": "array", "items": { "type": "string" } }, "exclusionUsersList": { "type": "array", "items": { "type": "string" } }, "enableDeletionProtection": { "type": "boolean", "default": false }, "deletionProtectionThreshold": { "type": "string", "default": "15" } } }, "enableIdentityCrawler": { "type": "boolean" }, "syncMode": { "type": "string", "enum": [ "FULL_CRAWL", "FORCED_FULL_CRAWL" ] }, "secretArn": { "type": "string", "minLength": 20, "maxLength": 2048 }, "type": { "type": "string", "pattern": "GOOGLECALENDAR" }, "version": { "type": "string", "anyOf": [ { "pattern": "1.0.0" } ] } }, "required": [ "connectionConfiguration", "repositoryConfigurations", "syncMode", "additionalProperties", "secretArn", "type" ] }

Google Calendar JSON schema example

The following is the Google Calendar JSON schema example:

{ { "connectionConfiguration": { "repositoryEndpointMetadata": { "authType": "serviceAccount" } }, "repositoryConfigurations": { "calendar": { "fieldMappings": [ { "indexFieldName": "_category", "indexFieldType": "STRING", "dataSourceFieldName": "category" }, { "indexFieldName": "_source_uri", "indexFieldType": "STRING", "dataSourceFieldName": "sourceUrl" } ] }, "event": { "fieldMappings": [ { "indexFieldName": "_category", "indexFieldType": "STRING", "dataSourceFieldName": "category" }, { "indexFieldName": "gcal_location", "indexFieldType": "STRING", "dataSourceFieldName": "location" }, { "indexFieldName": "_created_at", "indexFieldType": "DATE", "dateFieldFormat": "yyyy-MM-dd'T'HH:mm:ss'Z'", "dataSourceFieldName": "created" }, { "indexFieldName": "_last_updated_at", "indexFieldType": "DATE", "dateFieldFormat": "yyyy-MM-dd'T'HH:mm:ss'Z'", "dataSourceFieldName": "updated" }, { "indexFieldName": "gcal_event_start_time", "indexFieldType": "DATE", "dateFieldFormat": "yyyy-MM-dd'T'HH:mm:ss'Z'", "dataSourceFieldName": "eventStartTime" }, { "indexFieldName": "gcal_event_end_time", "indexFieldType": "DATE", "dateFieldFormat": "yyyy-MM-dd'T'HH:mm:ss'Z'", "dataSourceFieldName": "eventEndTime" }, { "indexFieldName": "_source_uri", "indexFieldType": "STRING", "dataSourceFieldName": "htmlLink" }, { "indexFieldName": "gcal_organizer", "indexFieldType": "STRING", "dataSourceFieldName": "organizer" }, { "indexFieldName": "gcal_attendees", "indexFieldType": "STRING", "dataSourceFieldName": "attendees" }, { "indexFieldName": "gcal_recurrence", "indexFieldType": "STRING", "dataSourceFieldName": "recurrence" } ] } }, "additionalProperties": { "fieldForUserId": "email", "isCrawlAcl": true, "inclusionUsersList": [ "ABC" ], "exclusionUsersList": [ "TEST" ], "enableDeletionProtection": true, "deletionProtectionThreshold": "2" }, "type": "GOOGLECALENDAR", "syncMode": "FORCED_FULL_CRAWL", "enableIdentityCrawler": true, "secretArn": "arn:aws::secretsmanager:us-west-2:123:secret:AmazonKendra-GoogleCalendar", "version": "1.0.0" }
PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.