Load Outlook Calendar Data into LlamaIndex
Windows-only LlamaIndex loader that parses local Outlook .ost/.pst calendar events into queryable Documents.
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
Extract calendar events from local .ost or .pst files.
Parse event details (Subject, Location, Organizer, etc.) into LlamaIndex Documents.
Index calendar data for efficient querying within LlamaIndex.
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 parses a local Outlook .ost/.pst file's calendar events into Documents for indexing and natural-language querying. Use on Windows to index a local Outlook calendar for Q&A; not for hosted/cloud Outlook or Exchange calendars.
What it does
Outlook Local Calendar Loader reads past and upcoming calendar events directly from a local Outlook .ost or .pst file and parses them into LlamaIndex Documents. It runs on Windows only and has only been tested on Windows 11, and it is designed to be a superset of the Google Calendar reader's functionality.
pip install llama-index-readers-microsoft-outlook
When to use - and when NOT to
Use it when an application needs to index and query someone's local Outlook calendar - for example answering natural-language questions about past or upcoming meetings. By default it retrieves up to 100 future events, though number_of_results raises that cap, start_date extends retrieval into the past, and end_date (default 2199-01-01) bounds how far into the future it looks. It is not usable outside Windows, and it is not a reader for hosted/cloud Outlook or Exchange calendars - it reads the local .ost/.pst file directly.
Inputs and outputs
Input is the local Outlook data file plus optional filtering parameters. Every returned event always includes Start, End, Subject, Location, and Organizer attributes; additional fields can be requested via more_attributes (a list of strings, e.g. ['Body', 'someotherattribute']) and any requested attribute missing from a given entry is silently skipped rather than raising an error. A typical LlamaIndex integration:
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?")
The source itself notes that answer quality improves with a more structured prompt that makes today's date explicit and clarifies whether the model should use information beyond the indexed calendar data.
Integrations
Designed to load directly into a LlamaIndex VectorStoreIndex for natural-language querying over calendar history and upcoming events - the kind of question the source's own example targets, e.g. asking when the user last saw George Guava and when they'll see them again.
Who it's for
Developers on Windows building LlamaIndex applications that need to answer questions grounded in a user's local Outlook calendar history and upcoming schedule, as a superset alternative to the Google Calendar reader.
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.