Specialized11 min read

Calendar & Event Processing: Outlook, Google Calendar

Process calendar events and extract insights. Connect Outlook Calendar and Google Calendar, extract attendees and topics, and query event data.

Calendar events contain meeting metadata, attendees, and context. Graphlit syncs Google Calendar and Outlook Calendar—making events searchable and extracting attendees as entities.

What You'll Learn

  • Google Calendar integration
  • Outlook Calendar integration
  • Attendee extraction
  • Event search patterns
  • Building meeting analytics

Google Calendar

import { FeedServiceTypes } from 'graphlit-client/dist/generated/graphql-types';

const calendarFeed = await graphlit.createFeed({
  name: 'My Calendar',
  type: FeedServiceTypes.GoogleCalendar,
  googleCalendar: {
    token: google_oauth_token,
    calendarId: 'primary',  // 'primary' = main calendar
    readLimit: 100
  }
});

What syncs:

  • Event titles
  • Descriptions
  • Attendees (emails, names)
  • Start/end times
  • Locations

Outlook Calendar

const outlookCalFeed = await graphlit.createFeed({
  name: 'Outlook Calendar',
  type: FeedServiceTypes.OutlookCalendar,
  outlookCalendar: {
    token: microsoft_oauth_token,
    readLimit: 100
  }
});

With Entity Extraction

import {
  FilePreparationServiceTypes,
  EntityExtractionServiceTypes,
  ObservableTypes
} from 'graphlit-client/dist/generated/graphql-types';

// Extract attendees and topics from event descriptions
const eventWorkflow = await graphlit.createWorkflow({
  name: "Event Entities",
  preparation: {
    jobs: [{
      connector: {
        type: FilePreparationServiceTypes.Event
      }
    }]
  },
  extraction: {
    jobs: [{
      connector: {
        type: EntityExtractionServiceTypes.ModelText,
        extractedTypes: [
          ObservableTypes.Person,        // Attendees
          ObservableTypes.Organization,  // Companies
          ObservableTypes.Product       // Topics
        ]
      }
    }]
  }
});

const feedWithEntities = await graphlit.createFeed({
  name: 'Calendar with Entities',
  type: FeedServiceTypes.GoogleCalendar,
  googleCalendar: {
    token: google_oauth_token,
    calendarId: 'primary',
    readLimit: 100
  },
  workflow: { id: eventWorkflow.createWorkflow.id }
});

Search Events

import { ContentTypes } from 'graphlit-client/dist/generated/graphql-types';

// Search calendar events
const results = await graphlit.queryContents({
  search: 'quarterly planning',
  filter: {
    types: [ContentTypes.Event]
  }
});

results.contents.results.forEach(event => {
  console.log(event.event?.title);
  console.log('Start:', event.event?.startDateTime);
  console.log('Attendees:', event.event?.attendees?.length);
});

Meeting Analytics

// Get all meetings from last month
const meetings = await graphlit.queryContents({
  filter: {
    types: [ContentTypes.Event],
    creationDateRange: {
      from: new Date(Date.now() - 30 * 24 * 60 * 60 * 1000).toISOString()
    }
  }
});

// Analyze meeting load
console.log('Total meetings:', meetings.contents.results.length);

// Extract frequent attendees
const attendeeCount = new Map<string, number>();

for (const meeting of meetings.contents.results) {
  const details = await graphlit.getContent(meeting.id);
  
  details.content.observations
    ?.filter(obs => obs.type === ObservableTypes.Person)
    .forEach(person => {
      const name = person.observable.name;
      attendeeCount.set(name, (attendeeCount.get(name) || 0) + 1);
    });
}

// Top attendees
const sorted = Array.from(attendeeCount.entries())
  .sort((a, b) => b[1] - a[1])
  .slice(0, 10);

console.log('Most active meeting participants:');
sorted.forEach(([name, count]) => {
  console.log(`  ${name}: ${count} meetings`);
});

Related Guides

Ready to Build with Graphlit?

Start building AI-powered applications with our API-first platform. Free tier includes 100 credits/month — no credit card required.

No credit card required • 5 minutes to first API call

Calendar & Event Processing: Outlook, Google Calendar | Graphlit Developer Guides