1. A non-transitory computer-readable storage medium having instructions embodied thereon, the instructions being executable by a processor to perform a method for generating an automatic search query for an electronic mail application integrating an electronic calendar system, the method comprising: monitoring documents with which a user has interacted; obtaining content data and metadata from the monitored documents; obtaining an index of documents with which the user has interacted by indexing the content data and metadata obtained from the monitored documents; receiving an input comprising a user-selected calendar entry from the electronic calendar system; in response to receiving the user-selected calendar entry, generating a search query from the user-selected calendar entry to search the index of documents with which the user has interacted for one or more documents related to the selected calendar entry; executing the search query by locating one or more documents in the index of documents with which the user has interacted that are related to the selected calendar entry; and providing search results to the user, wherein the search results include the one or more documents located during the execution of the search query.