Create Outlook Email Feed
User Intent
Operation
Code Example (TypeScript)
import { Graphlit } from 'graphlit-client';
import { FeedTypes, FeedServiceTypes, EmailListingTypes } from 'graphlit-client/dist/generated/graphql-types';
const graphlit = new Graphlit();
const feed = await graphlit.createFeed({
name: 'Outlook Inbox',
type: FeedTypes.Email,
email: {
type: FeedServiceTypes.MicrosoftEmail,
microsoft: {
type: EmailListingTypes.Past,
clientId: process.env.MICROSOFT_CLIENT_ID!,
clientSecret: process.env.MICROSOFT_CLIENT_SECRET!,
refreshToken: process.env.MICROSOFT_REFRESH_TOKEN!,
readLimit: 100,
inboxOnly: true,
excludeSentItems: true
},
includeAttachments: true,
},
// Optional: add workflow for content processing
// workflow: { id: workflow.createWorkflow.id }
});
console.log(`Created Outlook feed: ${feed.createFeed.id}`);Configuration
Microsoft OAuth Setup
What Gets Synced
Filtering Examples
Related
Last updated