Create a Teams Connector
A Teams connector enables you to ingest messages from your Microsoft Teams instance into the Zeta Alpha platform. This guide shows you how to create and configure a Teams connector for your data ingestion workflows.
Info: This guide presents an example configuration for a Teams connector. For a complete set of configuration options, see the Teams Connector Configuration Reference.
Prerequisites
Before you begin, ensure you have:
- Access to the Zeta Alpha Platform UI
- A tenant created
- An index created
- Microsoft Teams credentials (refer to the PDF tutorial "Connecting Microsoft Teams to Zeta Alpha.pdf" for detailed instructions)
Step 1: Create the Teams Basic Configuration
To create a Teams connector, define a configuration file with the following basic fields:
is_document_owner
: (boolean) Indicates whether this connector "owns" the crawled documents. When set totrue
, other connectors cannot crawl the same documents.content_source_name
: (string, optional) The name that identifies the content source in the UI. Defaults to "Teams".access_credentials
: (object) The credentials required to access Microsoft Teams:client_id
: The client ID of the Azure AD applicationclient_secret
: The client secret of the Azure AD applicationtenant_id
: The tenant ID of the Azure AD
logo_url
: (string, optional) The URL of a logo to display on document cards
Example Configuration
{
"name": "My Teams Connector",
"description": "My Teams connector",
"is_indexable": true,
"connector": "teams",
"connector_configuration": {
"is_document_owner": true,
"content_source_name": "Microsoft Teams",
"access_credentials": {
"client_id": "your-client-id",
"client_secret": "your-client-secret",
"tenant_id": "your-tenant-id"
},
"logo_url": "https://example.com/logo.png"
}
}
Step 2: Add Field Mapping Configuration
When crawling Teams, the connector extracts document metadata and content as described in the Teams Connector Configuration Reference. You can map these Teams fields to your index fields using the field_mappings
configuration.
Example Field Mappings
The following example shows field mappings for the default index fields:
{
...
"connector_configuration": {
...
"field_mappings": [
{
"content_source_field_name": "formatted_id",
"index_field_name": "DCMI.title"
},
{
"content_source_field_name": "created_date_time",
"index_field_name": "DCMI.created"
},
{
"content_source_field_name": "last_modified_date_time",
"index_field_name": "DCMI.modified"
},
{
"content_source_field_name": "author.display_name",
"index_field_name": "DCMI.creator"
},
{
"content_source_field_name": "content_source_name",
"index_field_name": "DCMI.source"
},
{
"content_source_field_name": "uri",
"index_field_name": "uri"
},
{
"content_source_field_name": "document_content_type",
"index_field_name": "document_content_type"
},
{
"content_source_field_name": "document_content",
"index_field_name": "document_content"
}
],
...
}
}
Step 3: Specify What to Crawl
You can configure the Teams connector to crawl specific content using the following options:
team_name_inclusion_regex_patterns
: (array of strings, optional) Teams whose names match any of the regular expressions in the list will be crawled. If a team name matches both an include and exclude pattern, the exclude pattern takes precedence and the team is not crawled. If not passed, all teams are crawled.team_name_exclusion_regex_patterns
: (array of strings, optional) Teams whose names match any of the regular expressions in the list will not be crawled. If a team name matches both an include and exclude pattern, the exclude pattern takes precedence and the team is not crawled.channel_name_inclusion_regex_patterns
: (array of strings, optional) Channels whose names match any of the regular expressions in the list will be crawled. If a channel name matches both an include and exclude pattern, the exclude pattern takes precedence and the channel is not crawled. If not passed, all channels are crawled.channel_name_exclusion_regex_patterns
: (array of strings, optional) Channels whose names match any of the regular expressions in the list will not be crawled. If a channel name matches both an include and exclude pattern, the exclude pattern takes precedence and the channel is not crawled.
Example Configuration
{
...
"connector_configuration": {
...
"team_name_inclusion_regex_patterns": [
"Engineering.*",
"Product.*"
],
"channel_name_exclusion_regex_patterns": [
".*Test.*",
".*Archive.*"
],
...
}
}
Step 4: Create the Teams Content Source
To create your Teams connector in the Zeta Alpha Platform UI:
- Navigate to your tenant and click View next to your target index
- Click View under Content Sources for the index
- Click Create Content Source
- Paste your JSON configuration
- Click Submit
Crawling Behavior
The connector crawls messages from Teams channels based on your configuration, extracting:
- Message content (text or HTML)
- Message author information
- Creation and modification timestamps
- Team and channel context
- Reply thread relationships
- Message type information
Access rights are automatically extracted from team membership, ensuring that only authorized users can access the messages in Zeta Alpha.