Tool

Load Outlook Calendar Data into LlamaIndex

Load past and upcoming events from a local Outlook calendar into LlamaIndex, Windows only.

Works with microsoft outlook

78
Spark score
out of 100
Updated 2 days ago
Version 0.14.23

Add to Favorites

Why it matters

Integrate your local Outlook calendar data with LlamaIndex for powerful querying and analysis. Access past and future events to enrich your AI applications.

Outcomes

What it gets done

01

Extract calendar events from local .ost or .pst files.

02

Parse event details (Subject, Location, Organizer, etc.) into LlamaIndex Documents.

03

Index calendar data for efficient querying within LlamaIndex.

04

Retrieve specific events based on date ranges and event counts.

Install

Add it to your toolbox

Run in your project directory:

curl -fsSL https://spark.entire.vc/get/li-reader-readers-microsoft-outlook | bash

Overview

Outlook Local Calendar Loader

A Windows-only LlamaIndex reader that loads past and upcoming events from a local Outlook .ost/.pst file, tested on Windows 11. Use on Windows for local Outlook calendar retrieval, structuring query prompts with an explicit current date.

What it does

The Outlook Local Calendar Loader reads past and upcoming calendar events directly from a local Outlook .ost or .pst file and parses the relevant information into LlamaIndex documents. It runs on Windows only, and has only been tested on Windows 11 - the source explicitly notes this platform limitation. It is designed to have a superset of the functionality of the Google Calendar reader.

By default, the loader retrieves up to 100 future events, though a number_of_results argument can raise or lower that cap. It also defaults to future-only events unless a start_date is passed, and an end-date parameter (defaulting to 2199-01-01, effectively unbounded) can restrict results to events occurring on or before a specific date. Every returned event always carries Start, End, Subject, Location, and Organizer attributes, and a more_attributes list of strings (for example ['Body', 'someotherattribute']) can request additional fields beyond those defaults - any requested attribute that doesn't actually exist on a given calendar entry is silently skipped rather than raising a warning.

The source's own worked example builds a VectorStoreIndex from the loaded events and queries it with a natural-language question about a specific person, then adds a usability note: results are better when the query prompt is structured explicitly, making clear what today's date is and whether any information beyond the indexed calendar data should be used in answering.

When to use - and when NOT to

Use it when you need a Windows machine's local Outlook calendar history and upcoming events loaded into LlamaIndex for retrieval or question-answering - for example finding when you last met someone or what's coming up. Use more_attributes when the default Start/End/Subject/Location/Organizer set isn't enough, keeping in mind any attribute name that doesn't exist on a given entry is dropped silently rather than flagged. Do not assume a missing more_attributes value means something is wrong with the loader - the source designed that behavior deliberately, not as an error condition.

Capabilities

load_data reads events from a local Outlook .ost/.pst file with configurable result count, start date, and end date, returning Start/End/Subject/Location/Organizer plus any requested additional attributes.

How to install

pip install llama-index-readers-microsoft-outlook

Requires a local Outlook .ost or .pst file.

Who it's for

Developers on Windows who need their local Outlook calendar history and upcoming events loaded into LlamaIndex for retrieval or question-answering.

Source README

Outlook Local Calendar Loader

pip install llama-index-readers-microsoft-outlook

This loader reads your past and upcoming Calendar events from your local Outlook .ost or .pst and parses the relevant info into Documents.

It runs on Windows only and has only been tested with Windows 11. It has been designed to have a supoerset of the functionality of the Google Calendar reader.

Usage

Here's an example usage of the OutlookCalendar Reader. It will retrieve up to 100 future events, unless an optional number_of_results argument is passed. It will also retrieve only future events, unless an optional start_date argument is passed. Optionally events can be restricted to those which occur on or before a specific date by specifying the optional end-date parameter. By default, end-date is 2199-01-01.

It always returns Start, End, Subject, Location, and Organizer attributes and optionally returns additional attributes specified in the more_attributes parameter, which, if specified, must be a list of strings eg. ['Body','someotherattribute',...]. Attributes which don't exist in a calendar entry are ignored without warning.

from llama_index.readers.microsoft_outlook import OutlookLocalCalendarReader

loader = OutlookCalendarReader()
documents = loader.load_data()

Example

This loader is designed to be used as a way to load data into LlamaIndex.

LlamaIndex

from llama_index.core import VectorStoreIndex, download_loader

from llama_index.readers.microsoft_outlook import OutlookLocalCalendarReader

loader = OutlookCalendarReader(
    start_date="2022-01-01", number_of_documents=1000
)

documents = loader.load_data()
index = VectorStoreIndex.from_documents(documents)
index.query("When did I last see George Guava? When do I see him again?")

Note: it is actually better to give a structured prompt with this data and be sure to it is clear what today's date is and whether you want any data besides the indexed data used in answering the prompt.

FAQ

Common questions

Discussion

Questions & comments · 0

Sign In Sign in to leave a comment.