Create Microsoft Teams Feed
User Intent
"How do I sync messages from Microsoft Teams channels? Show me how to create a Teams feed with OAuth."
Operation
SDK Method: createFeed() with FeedTypes.MicrosoftTeams
OAuth: Required via Developer Portal
Code Example (TypeScript)
import { Graphlit } from 'graphlit-client';
import { FeedListingTypes, FeedTypes } from 'graphlit-client/dist/generated/graphql-types';
const graphlit = new Graphlit();
const feed = await graphlit.createFeed({
name: 'Engineering Team',
type: FeedTypes.MicrosoftTeams,
microsoftTeams: {
type: FeedListingTypes.Past,
clientId: process.env.MICROSOFT_CLIENT_ID!,
clientSecret: process.env.MICROSOFT_CLIENT_SECRET!,
refreshToken: process.env.MICROSOFT_REFRESH_TOKEN!,
teamId: 'team-id',
channelId: 'channel-id',
readLimit: 1000,
},
// Optional: add workflow for content processing
// workflow: { id: workflow.createWorkflow.id }
});
console.log(`Created Teams feed: ${feed.createFeed.id}`);Configuration
Channels: Specify channels or leave empty for all readLimit: Messages per channel (default: 100) includeAttachments: Sync file attachments includeThreads: Include threaded replies
OAuth Setup
Developer Portal → Connectors → Messaging
Authorize Microsoft Teams
Copy OAuth token
Use in feed creation
What Gets Synced
Channel messages
Thread replies (if enabled)
Mentions
File attachments (if enabled)
Message metadata (author, timestamp)
Last updated
Was this helpful?