Skip to main content

llama-index readers microsoft outlook integration

Project description

Outlook Local Calendar Loader

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 import download_loader

OutlookCalendarReader = download_loader("OutlookLocalCalendarReader")

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

Example

This loader is designed to be used as a way to load data into LlamaIndex and/or subsequently used as a Tool in a LangChain Agent.

LlamaIndex

from llama_index import VectorStoreIndex, download_loader

OutlookCalendarReader = download_loader("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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Built Distribution

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page